2021-04-02 21:15:09

hi,
I am searching for the best way to output text to speech on linux using python3,
I have tryed a library called pyttsx3, it does the job but its problom is it pauses the intire programme while its speaking and I dont think it supports anything other than espeak
I need something that could passes speech to orka like the nvda controller client dll for windows, and if its not possible, just a way to speek using speech dispatcher so the user could select the voice that the programme uses

2021-04-02 21:52:50

There is no way to interface with Orca. The best you can do is something like this:

import speechd
client = speechd.SSIPClient("")
# Say something
# Optionally interrupt/stop speech
client.cancel()
client.speak(text)
# Shutdown
client.close()
"On two occasions I have been asked [by members of Parliament!]: 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out ?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question."    — Charles Babbage.
My Github

2021-04-02 22:01:24

Building on that, using Python3-speechd seems to be a generalized way of accessing TTS in general on a linux based platform. Its built on top of [speechd], you can find an overview [here] which lists the supported TTS engines, sound output subsystems, languages, and screen readers, which includes orca.

-BrushTone v1.3.3: Accessible Paint Tool
-AudiMesh3D v1.0.0: Accessible 3D Model Viewer