As it's quite hard to use a screen reader when you have never done so before, I added a guide on how to visually review the spoken text instead.
Debugging Orca's Output
We can visually review everything the screen reader says by hacking together a real-time transcript of Orca's speech.
To do so, run orca in a CLI window telling it to write a temporary debug log (without Braille to reduce noise)
orca --disable braille --debug-file=/tmp/orca-log.txt
Tip: The screen reader will still be audible. You can reduce its volume at orca -s
-> Voice
-> Volume
.
Orca will now write a live log where the spoken text is formatted in the Speech Synthesis Markup Language Show archive.org snapshot :
09:39:40.659002 - SPEECH DISPATCHER: Speaking '<speak...
<speak>
<mark name="0:8" />
makandra
<mark name="9:12" />
dev
<mark name="13:14" />
-
<mark name="15:21" />
Memory
<mark name="22:27" />
usage
<mark name="28:29" />
-
<mark name="30:34" />
59.9
<mark name="35:37" />
MB
<mark name="38:42" />
page
<mark name="43:47" />
tab.
</speak>
In a second terminal, run the script below. It reads the raw log file, filters it, removes all the technical markup, and prints only the clean text that you would hear.
# This script tails the Orca debug log and cleans it in real-time.
tail -f /tmp/orca-log.txt \
| grep --line-buffered "^[0-9:.\-]* - SPEECH DISPATCHER: Speaking" \
| sed -u -e 's/.*SPEECH DISPATCHER: Speaking .//' -e "s/'[[:space:]]*$//" \
| sed -u 's/<[^>]*>//g' \
| uniq
You will now see a clean, real-time transcript in your second terminal.
Example output:
makandra dev - Google Chrome - Default Profile frame.
main content
Card text. Press Escape for next field. Press Ctrl+S to save entry Example output:
Focus mode
makandra dev - Memory usage - 59.9 MB page tab.
Changes
- Orca is a Linux screen reader. Since it is part of the GNOME project it should come preinstalled with Ubuntu installations.
-To turn on the screen reader you can either go to Settings > Accessibility and then activate Screen Reader in the "Seeing" section or you can simply type `orca` in your terminal.- +
- +## Getting started
- +To turn on the screen reader you can either go to Settings > Accessibility and then activate Screen Reader in the "Seeing" section or you can simply type `orca` in your terminal. Alternatively you can use the default keyboard shortcut `super` + `alt` + `s` to toggle the screen reader.
- +
- > [NOTE]
- > It may feel quite strange in the beginning to use a screen reader. It is constantly commenting on everything you do and every application you visit will be read aloud.
- Once you started your screen reader you can simply navigate to whatever application you want to test and the screen reader will start to do its thing. If your screen reader isn't starting to read out the content, you may need to restart the application. If that still does not work, then the application you want to test may not be supported. Since we are usually building websites though, that should not pose a problem.
- If you wish to customize your screen reader you can do so by typing `orca -s` into the console. That should open a settings window where you can adjust your screen reader. I would recommend turning down the "Rate" in the "Voice" tab as the screen reader is reading things quite fast.
- > [NOTE "Handling"]
-> I have noticed, while testing my application, that the screen reader sometimes behaves a bit weirdly if you are using the mouse to navigate the page. It would swallow sentences that I would expect to be read out. That did not happen when I was using the keyboard though, which should be the expected tool anyway.- +> I have noticed, while testing my application, that the screen reader sometimes behaves a bit weirdly if you are using the mouse to navigate the page. It would swallow sentences that I would expect to be read out. That did not happen when I was using the keyboard though, which should be the expected tool anyway.
- +
- +## Debugging Orca's Output
- +
- +We can visually review everything the screen reader says by hacking together a real-time transcript of Orca's speech.
- +
- +To do so, run orca in a CLI window telling it to write a temporary debug log (without Braille to reduce noise)
- +
- +```sh
- +orca --disable braille --debug-file=/tmp/orca-log.txt
- +```
- +Tip: The screen reader will still be audible. You can reduce its volume at `orca -s` -> `Voice` -> `Volume`.
- +
- +Orca will now write a live log where the spoken text is formatted in the [Speech Synthesis Markup Language](https://en.wikipedia.org/wiki/Speech_Synthesis_Markup_Language):
- +
- +> 09:39:40.659002 - SPEECH DISPATCHER: Speaking '<speak...
- +
- +```html
- +<speak>
- + <mark name="0:8" />
- + makandra
- + <mark name="9:12" />
- + dev
- + <mark name="13:14" />
- + -
- + <mark name="15:21" />
- + Memory
- + <mark name="22:27" />
- + usage
- + <mark name="28:29" />
- + -
- + <mark name="30:34" />
- + 59.9
- + <mark name="35:37" />
- + MB
- + <mark name="38:42" />
- + page
- + <mark name="43:47" />
- + tab.
- +</speak>
- +```
- +
- +In a second terminal, run the script below. It reads the raw log file, filters it, removes all the technical markup, and prints only the clean text that you would hear.
- +
- +```sh
- +# This script tails the Orca debug log and cleans it in real-time.
- +tail -f /tmp/orca-log.txt \
- + | grep --line-buffered "^[0-9:.\-]* - SPEECH DISPATCHER: Speaking" \
- + | sed -u -e 's/.*SPEECH DISPATCHER: Speaking .//' -e "s/'[[:space:]]*$//" \
- + | sed -u 's/<[^>]*>//g' \
- + | uniq
- +```
- +
- +You will now see a clean, real-time transcript in your second terminal.
- +Example output:
- +
- +```
- +makandra dev - Google Chrome - Default Profile frame.
- +main content
- +Card text. Press Escape for next field. Press Ctrl+S to save entry Example output:
- +Focus mode
- +makandra dev - Memory usage - 59.9 MB page tab.
- +```
- +