5

Is it possible and if so how to respond within a skill with different languages? For example I'm developing a skill for the German skill store which reads various texts from the internet. Those can be any in language and I can determine the language when I'm about to emit the response.

From what I can see the SSML subset Alexa implements does not specify the language in which the response is given. But Alexa's own Kindle skill is able to read me eBooks in either German or English (perhaps Amazon's own skills are special).

Jens Kohl
  • 5,899
  • 11
  • 48
  • 77
  • There is a feature request at alexa.uservoice.com: https://alexa.uservoice.com/forums/906892-alexa-skills-developer-voice-and-vote/suggestions/35061139-add-multi-language-compatibility-in-the-same-speec You can vote for the request and maybe it will be implemented in future – Alex Fire Sep 20 '18 at 14:21

3 Answers3

3

As said in other answers the right way is to use the <lang> tag in SSML. However since the english voice do not speak German it is quite weird. The right solution is to change the voice using <voice> tag.

Here is an example in German

<speak>
 <voice name="Hans"><lang xml:lang="de-DE">Ich bin ein Berliner</lang></voice>.
I am a Berliner.
</speak>

It is described in this doc https://developer.amazon.com/fr/docs/custom-skills/speech-synthesis-markup-language-ssml-reference.html#examplefrench-content-in-an-english-skill

wayglem
  • 81
  • 1
  • 1
2

It looks like this is not possible at the moment: https://forums.developer.amazon.com/questions/55086/specify-output-language-per-intent.html

Jens Kohl
  • 5,899
  • 11
  • 48
  • 77
0

You can use the <lang> tag in SSML for this.
Here is an example in German.

<speak>
 <lang xml:lang="de-DE">Mein Luftkissenfahrzeug ist voller Aale</lang>.
Hello in the default language.
</speak>

Here is a list of supported Amazon Polly languages for Alexa.

M Sandler
  • 11
  • 4
  • Does this work now? It did not the last time I checked. – Jens Kohl May 18 '18 at 14:24
  • When was the last time you checked, as of yesterday (May-18-2018) it worked. – M Sandler May 19 '18 at 16:55
  • So I tried it today. It's still not working, yes it read the german sentence, but with the englisch voice (and it's worse than an actual American tries to speak german). So the `` tag is just ignored. You can try it by yourself. Omit the the `` tag and you will hear the same voice. – Jens Kohl May 22 '18 at 06:39
  • this is correct. The accent will be changed with the lang tag and it will be pronounced slightly better, but the actual voice (tag is in beta now) will remain unchanged. – M Sandler May 23 '18 at 13:44