<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to create a multiple locale menu? in Discussion Forum</title>
    <link>https://community.sinch.com/t5/Discussion-Forum/How-to-create-a-multiple-locale-menu/m-p/16040#M712</link>
    <description>&lt;P&gt;Hi Etienne,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The &lt;STRONG&gt;runMenu&lt;/STRONG&gt; &lt;STRONG&gt;mainPrompt&lt;/STRONG&gt; field supports using SSML, so you could mix two different languages in the same prompt.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;ace = %{
        action: %{
          name: "runMenu",
          mainPrompt: "#ssml[&amp;lt;speak&amp;gt;&amp;lt;lang xml:lang='fr-FR'&amp;gt;Bonjour ceci est un appel de #{caller}. Pour le service en français faite le 1.&amp;lt;/lang&amp;gt;&amp;lt;lang xml:lang='en-UK'&amp;gt;This a call from #{caller}. For service in English press 2.&amp;lt;/lang&amp;gt;&amp;lt;/speak&amp;gt;]"
          menus: [
            %{
              id: "main",
              options: [
                %{dtmf: 1, action: "menu(fr)"},
                %{dtmf: 2, action: "menu(en)"}
              ]
            },
            # The rest of the menus definition.
          ]
        }
      }&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This should work for you. You can read more about how to use SSML &lt;A href="https://developer.amazon.com/en-US/docs/alexa/custom-skills/speech-synthesis-markup-language-ssml-reference.html#lang" target="_self"&gt;here&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Let me know if you have any other questions!&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;</description>
    <pubDate>Mon, 09 Sep 2024 21:39:30 GMT</pubDate>
    <dc:creator>Alex_Sberna</dc:creator>
    <dc:date>2024-09-09T21:39:30Z</dc:date>
    <item>
      <title>How to create a multiple locale menu?</title>
      <link>https://community.sinch.com/t5/Discussion-Forum/How-to-create-a-multiple-locale-menu/m-p/16037#M711</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I'm trying to make a multiple locale menu with the voice API&amp;nbsp; using TTS and SVAML. This is something pretty typical, the call start with a message in french that prompt the user to press 1 to continue in french and then a message in english that prompt the user to press 2 to continue in english. In order for the voice to be understandable i have to use two locale, so i tried something like this:&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="ruby"&gt;ace = %{
        instructions: [
          %{name: "say", text: "Bonjour ceci est un appel de #{caller}.", locale: locale_fr},
          %{name: "say", text: "This a call from #{caller}.", locale: locale_en},
          %{name: "say", text: "Pour le service en français faite le 1.", locale: locale_fr},
          %{name: "say", text: "For service in English press 2.", locale: locale_en}
        ],
        action: %{
          name: "runMenu",
          locale: locale_fr,
          menus: [
            %{
              id: "main",
              options: [
                %{dtmf: 1, action: "menu(fr)"},
                %{dtmf: 2, action: "menu(en)"}
              ]
            },
            # The rest of the menus definition.
          ]
        }
      }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;This is elixir code but&amp;nbsp; should be easy to understand. `%{}` are map ( object )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is working fine except for one major issue, if we press a number before the "say" instructions are finish, the call end.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;So if we press 1 as soon as we here to press 1 for service in french the call hang up.&lt;BR /&gt;&lt;BR /&gt;I'm guessing this is because we are not yet in the `runMenu` action. Is there a way to prevent this?&amp;nbsp;&lt;BR /&gt;I can't really put all of my text in the `mainPrompt` field of the "main" menu because i can only choose one locale and it will be either incomprehensible in french or in english.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Sep 2024 20:52:19 GMT</pubDate>
      <guid>https://community.sinch.com/t5/Discussion-Forum/How-to-create-a-multiple-locale-menu/m-p/16037#M711</guid>
      <dc:creator>Etienne</dc:creator>
      <dc:date>2024-09-09T20:52:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a multiple locale menu?</title>
      <link>https://community.sinch.com/t5/Discussion-Forum/How-to-create-a-multiple-locale-menu/m-p/16040#M712</link>
      <description>&lt;P&gt;Hi Etienne,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The &lt;STRONG&gt;runMenu&lt;/STRONG&gt; &lt;STRONG&gt;mainPrompt&lt;/STRONG&gt; field supports using SSML, so you could mix two different languages in the same prompt.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;ace = %{
        action: %{
          name: "runMenu",
          mainPrompt: "#ssml[&amp;lt;speak&amp;gt;&amp;lt;lang xml:lang='fr-FR'&amp;gt;Bonjour ceci est un appel de #{caller}. Pour le service en français faite le 1.&amp;lt;/lang&amp;gt;&amp;lt;lang xml:lang='en-UK'&amp;gt;This a call from #{caller}. For service in English press 2.&amp;lt;/lang&amp;gt;&amp;lt;/speak&amp;gt;]"
          menus: [
            %{
              id: "main",
              options: [
                %{dtmf: 1, action: "menu(fr)"},
                %{dtmf: 2, action: "menu(en)"}
              ]
            },
            # The rest of the menus definition.
          ]
        }
      }&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This should work for you. You can read more about how to use SSML &lt;A href="https://developer.amazon.com/en-US/docs/alexa/custom-skills/speech-synthesis-markup-language-ssml-reference.html#lang" target="_self"&gt;here&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Let me know if you have any other questions!&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;</description>
      <pubDate>Mon, 09 Sep 2024 21:39:30 GMT</pubDate>
      <guid>https://community.sinch.com/t5/Discussion-Forum/How-to-create-a-multiple-locale-menu/m-p/16040#M712</guid>
      <dc:creator>Alex_Sberna</dc:creator>
      <dc:date>2024-09-09T21:39:30Z</dc:date>
    </item>
  </channel>
</rss>

