I want to use Amazon Polly TTS engine for text-to-speech resulting in mp3 file.
On the documentation, I can find example codes to use with Java, PHP, ruby or phyton. But of course there is no groovy example.
I couldn’t figure out how to write something to produce sound from the amazon Polly TTS API.
Any ideas ?
When I was setting up Ask Alexa, there was a page that you could goto that you could type into a box and then it would say what you typed in the Alexa voice. You could use that and audio recorder on a PC or Mac…
Don’t know where the page is located but it’s out there.
Amazon Polly is doing that in more than 20 languages.
but I need a web service that my smart app will call and get the sound file dynamically.
so a form with textbox will not help me.
Poly’s deprecated parent is Ivona.
Actually I need Turkish language TTS. And currently only Ivona, Polly and Ispeech suppports Turkish TTS. Google does not.
Since Ivona is deprecated, I am left with ispeech and Polly.
Ispeech is easily called with a web url. No libraries are needed. But it is very expensive. Smaller package is 200 usd.
I had thought same would be possible for Polly. That I would be able to call it with a simple URL including a key or user.
is that not possible ?
I sent the code as an example of how third party TTS is done withing SmartThings custom code. You’ll need to modify to fit the Polly (or other) API calls/urls.
great !! that really works.
but I have a problem using it.
if I pass a text with special Turkish characters to this command, it fails with following error:
1:05:24 AM: error com.amazonaws.services.s3.model.AmazonS3Exception: The request signature we calculated does not match the signature you provided. Check your key and signing method. (Service: Amazon S3; Status Code: 403; Error Code: SignatureDoesNotMatch; Request ID: 83E07B6C8684F4E1), S3 Extended Request ID: Cnh3ckkGNuKXH8QD6dux2JzTEeBAJz7mNBQDNs0+ciYR9SoOOcyqQGSRavZEu6RfxtKrOa0JS/s= @ line 521
if I remove Turkish characters , it works.
for example;
this one works:
state.sound = textToSpeech(“Bugun, 17 Agustos Persembe . Hava durumu Sabah saatlerinde gok gurultulu saganak yagisli.”, “Filiz”)
this one does not:
state.sound = textToSpeech(“Bugün, 17 Ağustos Perşembe . Hava durumu Sabah saatlerinde gök gürültülü sağanak yağışlı.”, “Filiz”)