textToSpeech with other language of Polly

(ilker Aktuna) #1


I am trying to get Turkish responses/announcements on my Sonos speakers.
I’ve learnt that Amazon’s Polly supports Turkish text-to-speech.
And the command textToSpeech can take a second parameter as the language.

For example, following command in ST makes TTS of text “merhaba” in Turkish with voice of Filiz.

textToSpeech(“merhaba.”, “Filiz”)

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”)

This seems to be a problem of signing the URL request when we use the command textToSpeech .
How can we solve this issue ?