2

I'm building a simple alexa skill.

I'm trying to output a text message (in italian) with some english word in it, but i don't found how let it works..

1 try

return github.getFollowersCount(search)
  .then((count) => {
    const speechOutput = `${search} ha ${count} <lang xml:lang="en-GB">follower</lang>`;
    return handlerInput.responseBuilder
      .speak(speechOutput);
  })

2 try

return {
  ssml: `<speak>Hai ${count} <lang xml:lang="en-GB">follower</lang></speak>`,
  type: 'SSML',
};

3 try

const speechOutput = `${search} ha ${count} <lang xml:lang="en-GB">follower</lang>`;
        return handlerInput.responseBuilder
          .speak(escaleTag(speechOutput));

I don't find any docs or way to make it works. Also ssml-builder seems doesn't support the lang tag..

Do you have any suggestions? What the handler function should return?

Thank you

Manuel Spigolon
  • 11,003
  • 5
  • 50
  • 73

2 Answers2

3

SSML does support the lang tag, but am not sure if it'll take it with the default voice. Here is an SSML snippet that I use that seems to be working fine.

<voice name="Brian"><lang xml:lang="en-GB">Hello there</lang>.</voice>

According to the official documentation, the following voices are supported for their respective languages:

English, American (en-US): Ivy, Joanna, Joey, Justin, Kendra, Kimberly, Matthew, Salli

English, Australian (en-AU): Nicole, Russell

English, British (en-GB): Amy, Brian, Emma

English, Indian (en-IN): Aditi, Raveena

German (de-DE): Hans, Marlene, Vicki

Spanish, Castilian (es-es): Conchita, Enrique

Italian (it-IT): Carla, Giorgio

Japanese (ja-JP): Mizuki, Takumi

French (fr-FR): Celine, Lea, Mathieu

bal simpson
  • 186
  • 8
0

That should totally work. Have you tried with <lang xml:lang="en-US"> or with another language?

niccord
  • 764
  • 4
  • 20