5

Here is what i want to do:

  1. I want to put/run Orca as an idle process in background after booting into Ubuntu. (No problem there so far.)

  2. Now when I open up a text file or website in my [web]browser; I want to be able, to highlight text and use a keyboard-shortcut in order to invoke Orca process [see step 1], to read the selected text back to me.

My problem is, that Orca, once initialized as a running process permanently reads back everything, from mouse-over actions of buttons, to system related actions etc.. and orca-preferences doesn't come with options, to reduce and suppress this. Orca might not be the right application at all for this and a common speech-synthesis application might be even better.

  • If someone knows how to make it work that way, please help.
  • An alternative speech-synthesis "read back" option/function, like Apple offers in OS X would even be better, since there one can simply "selected text", that is invoked with Ctrl+# shortcut, or simply use say, or for text files say -f ~/input.txt -o ~/output.aiff-command to have text red back instantly!
v2r
  • 9,707

3 Answers3

3

I found the answer here, in this comment, which does the trick in combination with festival:
(Although, these "free" speech synthesis are not even close to be as good as they ought to be!!)


wizo chocs says: March 2, 2012 at 12:49 pm

create this script xtalk

#!/bin/bash
xsel | festival --tts --pipe
  • set it executable chmod 755 xtalk
  • create a new custom keyboard shortcut, any key combo, i use ALT+X and the prog to run is your xtalk script
  • select the text u want read press ALT+X
v2r
  • 9,707
1

Would Festival do what you want? http://www.ghacks.net/2010/10/09/linux-text-to-speech-with-festival/

You also have http://clickspeak.clcworld.net/index.html or http://www.firevox.clcworld.net/installation_linux.html wich is a plugin for firefox

LnxSlck
  • 12,456
1

Based on v2r's answer I made this script:

#!/bin/bash

ID=$(pgrep -x "espeak")
if $ID >/dev/null 2>&1
  then
    xsel | espeak -vmb-en1
  else
    kill $ID
fi

This script will stop reading when you push the key combo a second time while it is reading.

I installed

 espeak
 espeak-ng-espeak
 xsel
 mbrola 

and the some mbrola voices :

mbrola-de1
mbrola-de2
mbrola-de3
mbrola-de4
mbrola-de5
mbrola-de6
mbrola-de7
mbrola-en1
mbrola-sw1
mbrola-sw2
mbrola-us1
mbrola-us2
mbrola-us3

I made a separate script and key combo for every language. like Pause for English and Shift + Pause for German.

I use Ubuntu 18.04

For Firefox I would recommend the Talkie extension. It reads very fine and automatically detects languages.