Text to speech for Manjaro. Like we have David and Zira voice in Windows 10.

I'm new to Linux world and trying to figure out the all the necessary packages that i may need for python programming. One of them is Speech recognition and Text-to-speech. In windows 10 I'd Microsoft's David and Zira voice to use it for TTS but in linux I didn't find any but espeak which is not understandable and accurate. Suggest me some good TTS for Manjaro and instruction on how to get it to work with python. Any help will be appreciated.

                                         Thank you!

The best free TTS engine is probably eSpeak-NG.

Although I have no idea how to actually get it working.

1 Like

No open source TTS engine is as good as the commercial stuff. However, Festival is fairly good.

You can

K = "Listen up!"
os.system('echo %s | festival --tts' % K)

in python, which is inelegant, but it works.

2 Likes

orca can provide a set of options trough Settings > Accessibility > Screen Reader tab once is installed.

For me the best text to speech is svox-pico. It is available in AUR. You can also look for PicoTTS on the net.

How to install it via command line?

Uhm.. you don't, really.

Use "Add/Remove Software" in your menu (or start pamac-manager from the command line), and make sure you have AUR enabled in the settings:
pamac-manager settings

Then search for "svox" and there you have it. Click on the Build-button, and hopefully all goes well :slight_smile:

:fireworks: :fireworks: :fireworks: Welcome to the Manjaro forum :fireworks: :fireworks: :fireworks:

1 Like

@Kartik: If you want to use svox-pico with Orca, you must modify the following file:

/etc/speech-dispatcher/speechd.conf with the following command line: sudo nano /etc/speech-dispatcher/speechd.conf

Then change the following lines:

DefaultModule espeak-ng --> DefaultModule pico-generic
Uncomment the line: AddModule "pico-generic" "sd_generic" "pico_generic.conf"
LanguageDefaultModule "en" "pico-generic"

Note: "en" if you use english for your language, "fr" for french language, ....

Save (CTRL+o). Exit (CTRL+x) under nano editor.

1 Like

@AlanP, do you get svox to work?

I get this:

$ pico2wave -w test.wav "This is a test"
Segmentation fault (core dumped)
$ picospeaker "This is a test"
munmap_chunk(): invalid pointer
/usr/bin/play FAIL formats: can't open input file `/tmp/picospeaker-ferdinand.wav': No such file or directory
$ picospeaker "This is a test"
munmap_chunk(): invalid pointer

The third command produces sound, but after a minute or so without using picospeaker, I get the situation from the second command again. At no time outside of execution does that '/tmp/picospeaker-ferdinand.wav' exist, though it does exist during execution.

I tried svox-pico with Libreoffice and ORCA, and it works well.

To try svox-pico with Libreoffice, you must install the extension read-text available here.

For Orca, you must modify the lines I indicated above, and then you launch Orca.

Otherwise, you've got qpicospeaker in the AUR repository.

Thank's!

I get it to work with LibreOffice, which seems to call it through Python, and I haven't checked how it's called exactly.

Anyway, in QPicoSpeaker it works too - although with a little fiddling, which may be just glitches in the GUI - but in Orca it's silent entirely.

For your reference, here's the relevant lines in speechd.conf:

#AddModule "espeak-ng"                "sd_espeak-ng" "espeak-ng.conf"
#AddModule "pico-generic"             "sd_generic"   "pico-generic.conf"
#DefaultModule espeak-ng
#DefaultModule pico-generic
#LanguageDefaultModule "en"  "pico-generic"

The "espeak-ng" module line has never been uncommented, and "espeak-ng" doesn't have a language line. Otherwise I uncomment either only the DefaultModule line for espeak-ng, or both the DefaultModule line for pico-generic and the LanguageDefaultModule line for pico-generic.

Doing this, pico-generic does not produce sound and espeak-ng does. It's a bit strange to me, but I'll dig more into it :slight_smile:

Forum kindly sponsored by