Jens Kohl
Jens Kohl

Reputation: 5969

Alexa skill responses in different languages

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

Upvotes: 5

Views: 1379

Answers (3)

wayglem
wayglem

Reputation: 81

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

Upvotes: 3

M Sandler
M Sandler

Reputation: 11

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.

Upvotes: 0

Jens Kohl
Jens Kohl

Reputation: 5969

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

Upvotes: 2

Related Questions