How do I listen and speak in different languages?

Last reviewed: 2/19/2021

HOW Article ID: H112001

The information in this article applies to:

  • SpeechKit 9

Summary

Listening and speaking in different languages is easy with SpeechKit classes for managing speech recognition and speech synthesis.

More Information

Developing applications that speak and listen is easy with SpeechKit classes since applications do not have to handle the low-level activities of managing speech recognizers and synthesizers.

Language defaults in most cases to the platform language selected by the user for their device. In application scenarios where language selection is applicable, SpeechKit classes provide a ChantEngine object to represent a recognizer and synthesizer for a specific language. Applications can select a language by selecting an engine using its Name, ID, ISO5Language, or LanguageName property with the SetEngine method.


_Recognizer.setEngine(nameOrISO5Language);

_Synthesizer.setEngine(nameOrISO5Language);
        

_Recognizer.SetEngine(nameIdISO5LanguageOrLanguageName);

_Synthesizer.SetEngine(nameIdISO5LanguageOrLanguageName);
        

_Recognizer->SetEngine(nameIdISO5LanguageOrLanguageName);

_Synthesizer->SetEngine(nameIdISO5LanguageOrLanguageName);
    

_Recognizer->SetEngine(nameIdISO5LanguageOrLanguageName);

_Synthesizer->SetEngine(nameIdISO5LanguageOrLanguageName);

_Recognizer.SetEngine(nameIdISO5LanguageOrLanguageName);

_Synthesizer.SetEngine(nameIdISO5LanguageOrLanguageName);
    

_Recognizer.setEngine(nameIdISO5LanguageOrLanguageName);

_Synthesizer.setEngine(nameIdISO5LanguageOrLanguageName);
    

_Recognizer.SetEngine(nameIdISO5LanguageOrLanguageName)

_Synthesizer.SetEngine(nameIdISO5LanguageOrLanguageName)

The property options vary by Speech API as follows:

Speech APIProperties
Acapela TTSName, ID, LanguageName
Apple AVFoundationName, ISOLanguage5
Apple SpeechName, ISOLanguage5
Cepstral SwiftName, ID, LanguageName
CereProc CereVoiceName, ID, ISOLanguage5
Google android.speechName, ISOLanguage5
Google android.speech.ttsName, ISOLanguage5
Microsoft SAPI 5Name, ID, ISOLanguage5
Microsoft Speech PlatformName, ID, ISOLanguage5
Microsoft .NET System.SpeechName, ID, ISOLanguage5
Microsoft .NET Microsoft.SpeechName, ID, ISOLanguage5
Microsoft WindowsMedia (UWP)Name, ID, ISOLanguage5
Microsoft WindowsMedia (WinRT)Name, ID, ISOLanguage5
Nuance Dragon NaturallySpeakingName, ID, ISOLanguage5
Nuance VocalizerName, ID, LanguageName

Language availability and settings for speech recognizers and synthesizers vary by platform.

Android

Google speech recognition and speech synthesis languages default on Android to the system locale setting of the device. Additional languages can be selected and used for network connected devices.

The SpeechKit Recognition and Synthesis samples enumerate the ChantEngine objects to illustrate available languages. For speech synthesis engines, the ChantEngine object Installed and NetworkConnectionRequired properties optionally may be used to determine which voices and languages an application uses.

iOS

Apple speech recognition and speech synthesis languages default on iOS to the system locale setting of the device. Additional languages can be selected and used for network connected devices.

The SpeechKit Recognition and Synthesis samples enumerate the ChantEngine objects to illustrate available languages.

Windows 10

Windows 10 speech recognition and speech synthesis languages depend on the recognizers and synthesizers installed on the platform.

Most Windows 10 editions have a Microsoft desktop recognizer and synthesizer installed for the preferred language of the platform. Additional languages can be access by installing them on the system via Settings->Time&Language->Language->Add a language. Once the language is installed, speech engines enumerate and are available.

Microsoft Speech Platform recognizers and synthesizers are language-specific and must be installed to support the desired language:

Cepstral synthesizers are language-specific and must be licensed and installed to support the desired language.

CereProc CereVoice synthesizers are language-specific and must be licensed and installed to support the desired language.

Nuance Dragon NaturallySpeaking recognizers are language-specific and must be licensed and installed to support the desired language.

Nuance Vocalizer synthesizers are language-specific and must be licensed and installed to support the desired language.

The SpeechKit Command, Dictation, Grammar, Recognition, and Synthesis samples enumerate the ChantEngine objects to illustrate using available languages.