Reputation: 75
[][1]I'm trying to do a siri-like application in Vala language. However I cannot find any speech recognition or text-to speech libraries for vala, which are essential for this purpose. So, is there a speech recognition and a text-to-speech for vala? And if yes, then could you name them?
BTW, I'm new to vala programming, so please also make some examples...
Thank you!!!
Upvotes: 0
Views: 108
Reputation: 14883
Text to speech is not very hard, you can just pipe a text to one of the TTS engine binaries like:
echo "Just what do you think you're doing, Dave?" | festival --tts
or:
espeak -ven+f3 -k5 -s150 "I've just picked up a fault in the AE35 unit"
If you don't find an API you can probably just spawn a process (see also BasiSamples).
Speech recognition is a completely different beast. You can try pocketsphinx (based on CMU Sphinx), but I doubt there is a vala binding for that readily available (so you'd have to write a vapi file yourself).
Other speech recoginition engines are available, just search for "Linux speech recognition" using your favorite web search.
Another approach would be to actually call some web API that does the heavy work for you, but then you'd have to tell your users that their data is send to the internet (privacy concerns come into play here).
PS: On stackoverflow questions about libraries are discouraged (so you might want to carefully read the tour again). I'd normally voted to close your question (which is also too broad for a precise answer). On the other hand I wanted to give you some pointers.
Upvotes: 1