Alexa Voice Service now Supports Hindi; US Spanish and Multilingual Mode Coming Soon!
Ludo Goarin Sep 25, 2019
Share:
Alexa Voice Service International Multilingual News
Blog_Header_Post_Img

Alexa now supports voice interactions in Hindi in addition to other supported languages (click here for the full list). Starting early October, we will support US Spanish and enable Multilingual Mode, which allows Alexa to switch between two languages. Alexa will automatically understand the language from user-spoken utterances and respond in the same language.

Multilingual Mode

Customers in multilingual households are used to naturally switching between languages and Multilingual Mode enables you to do just that - ask for the weather in English, and Alexa will reply in English. If you or someone else in your household asks for the weather in Spanish, Alexa will understand and respond in Spanish. Multilingual Mode will be available in three pairs: English and Spanish in the US, Indian English and Hindi in India, and Canadian English and French in Canada.

Enabling Multilingual Mode on your Device

To enable Multilingual Mode, we recommend that you use AVS Device SDK 1.15 (or higher), which can be downloaded from GitHub. If you use the AVS SDK 1.15+, support for Multilingual Mode is already built in, and you only need to declare the language pairs. Language pairs are set via the localeCombinations field that has been added to the AlexaClientSDKConfig.json configuration file. See the example below:

"deviceSettings":{
    // Path to Device Settings database file. e.g. /home/ubuntu/Build/deviceSettings.db
    // Note: The directory specified must be valid.
    // The database file (deviceSettings.db) will be created by SampleApp, do not create it yourself.
    // The database file should only be used for device settings (don't use it for other components of SDK)
    "databaseFilePath":"${SDK_SQLITE_DEVICE_SETTINGS_DATABASE_FILE_PATH}",
    // The list of supported locales on this device.
    "locales":["en-US","en-GB","de-DE","en-IN","en-CA","ja-JP","en-AU","fr-FR","it-IT","es-ES","es-MX","es-US","fr-CA"],
    // The default locale of this device.
    "defaultLocale":"en-US",
    // The list of locale combinations supported on this device.
    "localeCombinations":[
        ["en-US", "es-US"],
        ["es-US", "en-US"]
    ]
}
Using the System 2.0 API

If you are planning to continue to use AVS Device SDK 1.14, please use the System 2.0 API to manage settings such as the language locale. The System 2.0 API will allow your device to receive directives, as well as issue events for the purpose of managing common Alexa settings such as the language locale. It is required that you implement the System 2.0 API to support the Dynamic Language Switching feature.

In order to use the System 2.0 API to manage language locales for your device, you must first declare support for this API using the Capabilities API. Here is an excerpt of the Capabilities Request Body that demonstrates how to declare support for US English, US Spanish, IN English and IN Hindi, as well as the supported locale pairs:

{
"type": "AlexaInterface",
"interface": "System",
"version": "2.0",
"configurations": {
"locales": [
"en-US",
"es-US",
"en-IN",
"hi-IN",
"fr-CA",
"en-CA"
],
"localeCombinations": [
["en-US", "es-US"],
["es-US", "en-US"],
["en-IN", "hi-IN"],
["hi-IN", "en-IN"],
["fr-CA", "en-CA"],
["en-CA", "fr-CA"]
]
}
}

Note: the order of locales in localeCombinations matters. The first value determines the primary locale and the second value determines the secondary locale. The WakeWord Model and earcons on the device are determined by the Primary Locale.

System 2.0 is required to support Multilingual Mode, and you will also be required to implement the following new events and directives also included in the System 2.0:

  • Directives: SetLocales, ReportState
    • The SetLocales directive is sent by the Alexa service to the AVS device to inform of the updated language settings.
    • The ReportState directive is sent by the Alexa service to inquire about the state of the device.
  • Events: LocalesChanged, LocalesReport, StateReport
    • Your device must send a LocalesChanged event to the Alexa service to update the language settings.
    • Your device must respond with a LocalesReport event when the language settings have been updated on your device.
    • Upon receiving the ReportState directive, your device must issue a StateReport event with the information on the locale(s) currently active on the device along with other current settings. See here for more information on ReportState and StateReport.

Here is the flow expected from a language change initiated by the device or companion application:

Here is the flow expected from a language change initiated by voice, in other words by the Alexa Service:

Certification

If you are certifying your device for the first time:

  • Follow the already published checklists for Functional, UX, Acoustic and Music and go through security review.
  • Tests were added to Functional checklist to check primary and secondary language pair setting using device companion app, voice and multi-modal, which include sanity checks on switching languages on different domains like flash briefing, sports update, weather etc.
  • There is no additional testing needed for acoustic, music certification and there is no change in security review.

If the device is already certified but being considered for Multilingual Mode incremental feature certification, you will only need additional tests for Functional.

Additional Resources

We hope you are as excited as our customers are by the Multilingual Mode feature, and will be implementing this in your device soon. You can learn more about Multilingual Mode and System 2.0 through our online technical documentation.