Is There A Cross Platform Module In Python For Text To Speach?
Back to Computers and Technology#1 GraceDontmindbeingblind
Basically, I was wondering if there is tts in Python that works with all platforms.
#2 Seedy-Threepio Archived
Try the accessible-output2 library.
#3 bomberman29
accessible_output2 for screenreaders and sapi. but there is also gtts. (google tts).
#4 GraceDontmindbeingblind
Thank you. Whair would I find documentation to make it speak?
#5 nikolai
I couldn't find any docs for it besides basic functionality which is really bad in my opinion. Even the readme.md on github was basically the same as the description in pypi.
Here is the code to initialize it though.
import accessible_output2.outputs.auto
o=accessible_output2.outputs.auto.Auto()
#o.speak("Testface")
If this is the package you want to be using, I'd take a look at it's source files to make sure you arn't missing stuff.
#6 Seedy-Threepio Archived
Basic docs? What do you want to do with it besides producing speech (and maybe braille) output?
#7 GraceDontmindbeingblind
I need it to give speach and speak a variable
#8 zywek
accessibleoutputs2 does not support linux now. It wants to install espeak module which is not available in python3 version. Remake it to use speechd instead of espeak.
#9 bomberman29
hmmmmmm. why espeak? espeak is very bad for selfvoiced apps and games.
#10 zywek
Look at the code, so you will know why espeak. You want to use another synthesizer? Write module for it and use.
#11 GraceDontmindbeingblind
well, I need something that is going to work on all platforms correctly, so that is a problem
#12 zywek
So get ao2 from my github
https://github.com/zywek123/accessible_output2
It should work with speech dispatcher, but voice selection is not pssible now.
#13 nikolai
Or just write a wrapper module that you can adapt for each platform.
#14 destructatron
I use plain old accessible_output2 from pip and stick it in a virtual environment. Then, I cd into /usr/lib/python3.10/site-packages and copy the speechd packages to the site packages directory of the virtual environment.
#15 zywek
But speechd is not implemented in old versions of ao3, tere's e_speak which was available in python2