Skip to main content

Peter Vágner

Peter Vágner

Peter Vágner

Peter Vágner

Braille typing on an #Android device

4 min read

A lot of blind people like to accelerate their typing skills on their smart phones by using eyes free methods. Typing in braille is the most popular of these I think.
Many of us like it and some more would like to get used to this too. It's why questions like what is the best braille keyboard for android, and how to type in braille on androidareasked very frequently.

I have just answered such a question so I'm publishing my current answers.

This is about Soft braille keyboard which is free and open-source published on github although I don't know if it's still available to download from the Google play.

I think details related to device positioning, finger placement and similar will also apply to any other braille keyboard on the planet, e.g. MBraille is working fine too.

Okay so first about Soft braille keyboard setup.  I like these settings in theKeyboard Settings Rotate keyboard with device   check box unchecked Invert keyboard   check box checked All other keyboard settings are on their defaults. When its configured like this then you should be holding your device in landscape with home button to the left screen facing away of you.  Again slowly explaining each suggestion: * device should be in landscape * home button should be on your left hand side * you should hold it in a way so device screen is turned away from you. Imagine if you wanted to use device's front camera to take pictures.  Now position of your hands. Index, middle and ring fingers ofboth your hands are reserved for typing on the braille keyboard displayed on the screen. Thumb fingers are touching the device back cover gently meaning there is nothing to hold the device is just sitting put on your thumb fingers. Pinky fingers are touching the device side on the bottom. You should be able to touch your-self using your pinkies when holding the device like this if you really wanted to do so.  And now final puzzle the braille dots: I imagine you know an ordinary braille type writer such as Perkins or even Picht type writer. If you look at the type writer keyboard you can realize it is not all horizontal meaning keys are not positioned exactly one next to another. Dot three and dot six keys are a bit smaller and slightly pointed to the sides. So by knowing this and considering how little space you have on your device screen you are trying to fit your fingers to the screen as much as possible in order to resemble the braille type writer keyboard layout. Your index fingers are close to each other near the device side at the top, Your ring fingers are far from each other on the device side on the bottom, And your middle fingers are well in the middle. Your left index types dot 1, Your left middle types dot 2, Your left ring types dot 3, Your right index types dot 4, Your right middle types dot 5, And your right ring types dot 6. When you start typing you can callibrate the keyboard. That's easiest done when you put your left hand fingers to the screen and hold down all three for more than a second. If you lift them you will receive a prompt saying put next three fingers on the screen or such. So do the same thing with your right hand and you should be all setup.  This is everything you need to know in order to become productive with soft braille keyboard. Choosing your braille table is just a personal preference.

Peter Vágner

Editing text with Commentary #ScreenReader on #Android

5 min read

Commentary screen reader is a modern and trendy app for android that adds some inovative and usefull features on the top of the necessary screen reading features.
It's worth noting that as compared to Talkback it is very very responsive and feels snappy.

Lets look at how Commentary screen reader (CSR for short) handles text editing.

Imagine we are writing a message using the Gmail app. We can open the app, locate the Compose button somewhere at the top of the screen, bring up the compose screen, tap message text field in the center of the compose screen. All this is a standard screen reader interaction.
Keyboard such as Google keyboard (GBoard for short) opens and we can begin typing.
Let's write at least two sentences so you have a bit of text to practice editing with.
If you are done typing, touch the text box you have just been typing into. You will receive feetback from CSR stating you can use left and right arrows to navigate over the text.
If you want to make simple changes to your text near the start of your text navigating letter by letter and using backspace key on the keyboard is enough however if you need to edit parts of your text in the middle or near the end of the text it would not be very practical to navigate character by character there.

CSR has an editing entry in the actions menu. So either flick right then up and execute editing from the action menu or flick right then down to open the same editing menu, the choice is yours. It's best to inwoke this after touching or navigating to text box where the editing makes sense. When using the Action menu you can open the editing menu for just any content on the screen even buttons, checkboxes and similar. That way you can review the content, copy parts of it or use it to your heart's imagination, of course editing won't work in that case.
When the editing menu is displayed on the screen it has row of buttons on the bottom and most of the screen space is taken by the list. By using the buttons on the bottom you can configure the list to split the text into characters, words or paragraphs. If you tap the Char button, the list will have as many items as there are characters in your text. If you choose words then the number of items in the list relates to how many words there are in your text. If you choose paragraphs it will split your text by end of line character so wrapped lines don't count. The buttons currently say Char, Sentence and Paragraph. Perhaps that's minor translation discrepancy while translating from chinese to english as the text is clearly divided to the individual words rather than sentences when the Sentence button is pressed.
If you have a large text you can start by splitting that to paragraphs. Find the paragraph you are interested in and reconfigure the list to split text into words if the paragraph is very long and continue navigating word by word just by browsing the list.
When you double tap an entry in the list, only the chosen part of text is shown in a simple text box dialog. This dialog is the most simple dialog you can get. It has a title a text box and OK and Cancel buttons. It only displays your chosen part of the text in the box so you can double tap it and edit it as a simple short text by navigating character by character and deleting using keyboard backspace / delete button.
It is even possible to call editing from this dialog again if you have clever use case for that. So you may use this split editing feature recursivelly and focus on the text you wish to work with. This way it is helping you to prevent accidental keypresses that may introduce typos and other unwanted edits.
This editing menu can split text up to 100 characters in the free CSR version, so if you would like to use it for serious editing you will have to activate the premium version.

It is also possible to work with the text the traditional way when using CSR. There is so called Word by word mode. Actually there are two modes Word by word mode and Focus browsing mode. We can toggle these two modes by swiping left then down.
In focus browsing mode you are navigating from item to item on the screen by swiping either up or down. Left or right swipes can be used to skip a group of items such as scroll to next page, move past a list and similar. This is also working on the web.
In word by word mode up and down swipes move line by line and left or right swipes move a character. When you cross an item boundary for example moving from button to button or out of a text box, CSR beeps or vibrates according to the configured preferences.
There are additional word by word mode specific gestures:
Swipe left then right - Skip to previous paragraph.
Swipe right then left - Skip to next paragraph.
Swipe up then down -
Swipe down then up -
Swipe left then up -
Swipe right then down -

I am not sure what exactly are these four gestures supposed to do. They are moving to the start or to the end of a text. But they are duplicated for a reason I would say.

Feel free to experiment with these features and be sure to discuss how it affects your productivity with your Android device.
The official SCR Telegram group is at https://t.me/jieshuochat

Peter Vágner

Building eSpeak-ng for Android with libsonic built-in

2 min read

By a popular demand I have written a few steps how I am building espeak-ng for android.
ESpeak-ng has a optional dependency on a library called libsonic.
It's not critical for its functionality but it allows speeding up synthesised voice so we can get eSpeak-ng speaking at very very fast speech rates.
On linux the build system is configured to take advantage of system wide installation of all the required libraries. This does not nicely apply to the cross compilation for Android as all the libraries have to be prebuilt for the target platform.
And since there is no other distribution channel for the libsonic library other than its git repository with its source code, there are no prebuilt libraries for android.
To workaround this I am cloning libsonic repository, linking its files to the eSpeak-ng source tree and then patching eSpeak-ng source code to include the libsonic files as if these were part of eSpeak-ng it-self.

I am running all this on arch linux, but debian, ubuntu and any other linux distro with gradle, Android-SDK 26, android-sdk-build-tools 28.0.3, recent enough version of android-ndk will work fine.
I like to install all these components via the linux distro package manager.
Espeak-ng Readme has even more details I can write here. There are also some android specific dependencies

If everything is installed here are the commands I can run from the terminal:
mkdir ~/espeak # create a working folder
cd ~/espeak # enter that folder
git clone https://github.com/espeak-ng/espeak-ng.git # clone espeak-ng git repo
git clone https://github.com/espeak-ng/sonic.git # clone libsonic repository
ln -s ../../../sonic/sonic.{c,h} espeak-ng/src/libespeak-ng/ # link sonic files to eSpeak-ng source tree
wget https://files.pvagner.tk/f/e9c6874015fd4241b6c2/?dl=1 -O espeak-ng-libsonic-android.patch # download a patch
cd espeak-ng # change directory to the espeak-ng repo
patch -p1 < ../espeak-ng-libsonic-android.patch # apply the changes from the patch
./autogen.sh # prepare the configure script
./configure --prefix=/usr --with-gradle=gradle --with-extdict-ru --with-extdict-zh --with-extdict-zhy # run the configure script
make apk-debug # build the actual apk

The resulting app is placed in the path android/build/outputs/apk/debug/espeak-debug.apk
You can install this on your device and enjoy fast rates up to 800 WPM.

Peter Vágner

Essential reading if you can dive more into reproducible builds https://nico.dorfbrunnen.eu/posts/2019/reproducibility-fdroid/

Peter Vágner

radio app for is now at v3.2.0. Except of things listed in the changelog it features a few improvements and slovak translation. Enjoy a simple but powerfull app with Talkback or any other screen reader of choice. Gplay: https://play.google.com/store/apps/details?id=org.y20k.transistor F-Droid (coming soon): https://f-droid.org/repository/browse/?fdid=org.y20k.transistor

Peter Vágner

hmmm. I feel we all users relying on its shal start looking for a different platform of choice to the future. https://gitlab.gnome.org/GNOME/gtk/issues/1739

Peter Vágner

oh damn! v18 does not handle keyboard input when playing games via built-in https://forum.kodi.tv/showthread.php?tid=340080