How do I listen and speak in different languages?
Last reviewed: 8/7/2021
HOW Article ID: H072118
The information in this article applies to:
- SpeechKit 10
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:nameOrISO5Language];
[_synthesizer setEngine:nameOrISO5Language];
_Recognizer!.setEngine(name: nameOrISO5Language)
_Synthesizer!.setEngine(name: nameOrISO5Language)
_Recognizer.SetEngine(nameIdISO5LanguageOrLanguageName)
_Synthesizer.SetEngine(nameIdISO5LanguageOrLanguageName)
The property options vary by Speech API as follows:
Speech API | Properties |
---|---|
Acapela TTS | Name, ID, LanguageName |
Apple AVFoundation | Name, ISOLanguage5 |
Apple Speech | Name, ISOLanguage5 |
Cepstral Swift | Name, ID, LanguageName |
CereProc CereVoice | Name, ID, ISOLanguage5 |
Google android.speech | Name, ISOLanguage5 |
Google android.speech.tts | Name, ISOLanguage5 |
Microsoft SAPI 5 | Name, ID, ISOLanguage5 |
Microsoft Speech Platform | Name, ID, ISOLanguage5 |
Microsoft .NET System.Speech | Name, ID, ISOLanguage5 |
Microsoft .NET Microsoft.Speech | Name, ID, ISOLanguage5 |
Microsoft WindowsMedia (UWP) | Name, ID, ISOLanguage5 |
Microsoft WindowsMedia (WinRT) | Name, ID, ISOLanguage5 |
Nuance Dragon NaturallySpeaking | Name, ID, ISOLanguage5 |
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.
The SpeechKit Command, Dictation, Grammar, Recognition, and Synthesis samples enumerate the ChantEngine objects to illustrate using available languages.