I open a new topic after a short discussion in private with one of you.
Apparently it exists alternatives to Google TTS engine like Cepstral or the OSX TTS engine that we could easily use in the plugin (in place of Google).
First I changed a little the code to make it more easy to add an alternative TTS engine (mainly put the specific code for Google in a function).
Google TTS is a free service available on the Internet.
We could imagine to use a TTS engine not directly on the Internet but running on a server in our LAN network.
I think this is what will be explained for example with the OSX TTS engine.
What we need here is an HTTP API to request the engine to produce the audio file.
The big benefits of using this are that it doesn’t require an internet connection, it will always exist (meaning google can’t just pull the plug), it’s customizeable (you can select from many voices and adjust the speech rate), and it’s just cool.
I have an implementation file for @lolodomo to review as I’m not sure of the best way to implement this in a way without my hardcoded values pointing at my server.
The big benefits of using this are that it doesn't require an internet connection, it will always exist (meaning google can't just pull the plug), it's customizeable (you can select from many voices and adjust the speech rate), and it's just cool.
I am curious to know if it exists available TTS engine, free if possible, that could be run for example on a raspberry Pi ?
I have an implementation file for @lolodomo to review as I'm not sure of the best way to implement this in a way without my hardcoded values pointing at my server.
I have to see your code but I think a simple variable to define the URL of the TTS server could probably solve this problem.
Cepstral works on a raspberry pi. They have a page on their website talking about this. It’s quite inexpensive from what I understand. The API could probably be put together in a few lines of python.
I just downloaded a French voice on my mac. If you choose “Audrey” from the list of available voices in that admin panel I linked you, you’ll get French support. I’ve set it up as the default just so you can hear it. Let me know if it works for you.
Some time ago, I built a TTS replacement using python’s SimpleHTTPServer and OSX’s say command, just in case google’s service ever went away. If anybody’s interested, I can find the code and post it.
I’m pretty sure that’s the same idea behind the one that I got working from this site → [url=http://wolfpaulus.com/jounal/mac/ttsserver/]http://wolfpaulus.com/jounal/mac/ttsserver/[/url] but I’m not sure exactly how he implemented it.
I just downloaded a French voice on my mac. If you choose “Audrey” from the list of available voices in that admin panel I linked you, you’ll get French support. I’ve set it up as the default just so you can hear it. Let me know if it works for you.[/quote]
Yes, it works and the quality is really excellent, maybe the best quality I have heard ! But the speech is just too fast and I cannot use any special characters (french accents). Difficult to find a long sentence without that Maybe there is a charset encoding for the text to setup on server side ?
Even if it is not a real problem (generally you need one language), can you confirm that with this solution, we can have only one language supported at a time. Because now, if I use en or fr for the language, I always get Audrey’s voice.
This can be changed through the admin panel (I think).
I’m not sure on the charset what our options are. Ideally, I’d like to get the TTSServer code on github and modify it to allow the voice to be set from the URL as well as make adjustments for speech speed and see what needs to be done for encoding. I’ve emailed the original author letting him know about our application here. If I hear back from him, I’ll ask about forking the project - otherwise I’ll look into writing from scratch or using a start from @SM2k.