ESpeak: Difference between revisions

Jump to navigation Jump to search
1,643 bytes added ,  15 January 2022
Use Espeak-ng to read text on your system from any application
m (Added category project.)
(Use Espeak-ng to read text on your system from any application)
Line 34: Line 34:
[[Category:TTS]]
[[Category:TTS]]
[[Category:Project]]
[[Category:Project]]
<references />
== '''KDE & gnome integration (eSpeak-NG)''' ==
This setup will let you read text with mimic tts from '''any application''' on your system simply by pressing a keyboard command.
After installing eSpeak-ng on your system adding this line to a custom keyboard shortcut in KDE or Gnome.
<code>xsel > /tmp/speak.txt | espeak-ng -f "/tmp/speak.txt" | pkill xsel</code>
Type <code>man espeak-ng</code> in your terminal to see a list of options for this speech engine.
To stop espeak-ng we can use the following command:
<code>pkill espeak-ng</code>
In gnome open system settings then go to: Keyboard » Customise Shortcuts » Custom Shortcuts » + and make two new shortcuts, one to start reading using the line above and another shortcut to stop reading with the <code>pkill espeak-ng</code> command.
In KDE open system settings then go to: Shortcuts » Custom Shortcuts and make to new shortcuts one to start reading using the line above and another shortcut to stop reading with the <code>pkill espeak-ng</code> command.
Create a file for xsel to store the text you want to read. In this example this file is in the /tmp directory and is called speak.txt (but you can use a different file name and directory if you like).
'''What do these commands and switch’s do:'''
<code>xsel > my_file_name.txt</code> (over rights the text in the file with highlighted text)
<code>espeak-ng -f</code> (calls the espeak-ng tts engine to start reading a file inside the "")
<code>pkill xsel</code> (stops the computer starting a new process for xsel every time this command is run).
<code>pkill espeak-ng</code> (stops espeak-ng).
8

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.

Navigation menu