- Operating mode
- Application in the background: Specific case from Android 10
SpeechSynthesisInitialize (Function) In french: SynthèseVocaleInitialise Initializes the parameters of speech synthesis for the current application. You can initialize: - Only the language used (syntax 1).
- All the voice characteristics via a SpeechSynthesisVoice variable (syntax 2).
Remark: The use of SpeechSynthesisInitialize is optional. The default parameters will be used if SpeechSynthesisReadText or SpeechSynthesisReadFile is called while the parameters of speech synthesis have not been specified in SpeechSynthesisInitialize.
IF NOT SpeechSynthesisInitialize(NationToLanguage(Nation())) THEN Error("Failure initializing the speech synthesis.", ErrorInfo()) END
Syntax
Initializing the language only Hide the details
<Result> = SpeechSynthesisInitialize(<Language> [, <Speed>])
<Result>: Boolean - True if the initialization was performed,
- False in case of failure. In this case, the ErrorOccurred variable is set to True. To get more details on the error, use ErrorInfo.
<Language>: Integer or Integer constant - Language that will be used to read the text. If the specified language is not supported by the engine for speech synthesis, the function will return False and the first available language will be used according to the following sequence :
- Language of the application (default language or language defined by Nation).
- Language of the device
- English
- Default language of engine for speech synthesis.
- 0 to use the current application language.
The available constants are as follows:
| | languageAfrikaans | Afrikaans | languageAlbanian | Albanian | languageArabic | Arabic | languageArmenian | Armenian | languageBelarusian | Belorussian | languageBengali | Bengali | languageBulgarian | Bulgarian | languageCatalan | Catalan | languageChinese | Chinese | languageCroatian | Croatian | languageCzech | Czech | languageDanish | Danish | languageDutch | Dutch | languageEnglish | English | languageEstonian | Estonian | languageFinnish | Finnish | languageFrench | French | languageGeorgian | Georgian | languageGerman | German | languageGreek | Greek | languageHebrew | Hebrew | languageHindi | Hindi | languageHungarian | Hungarian | languageIcelandic | Icelandic | languageIndonesian | Indonesian | languageItalian | Italian | languageJapanese | Japanese | languageKorean | Korean | languageLatvian | Latvian | languageLithuanian | Lithuanian | languageMacedonian | Macedonian | languageNorwegian | Norwegian | languagePolish | Polish | languagePortuguese | Portuguese | languagePunjabi | Punjabi | languageRomanian | Romanian | languageRussian | Russian | languageSerbian | Serbian | languageSindhi | Sindhi | languageSlovak | Slovakian | languageSlovenian | Slovenian | languageSpanish | Spanish | languageSwedish | Swedish | languageThai | Thai | languageTurkish | Turkish | languageUkrainian | Ukrainian | languageUzbek | Uzbek | languageVietnamese | Vietnamese |
<Speed>: Optional integer Speed for reading the text, included between 0 (very slow) and 10 (very fast). If this parameter is not specified, its value will be set to 5 (average speed).
Initializing all the voice characteristics Hide the details
<Result> = SpeechSynthesisInitialize(<Voice> [, <Speed>])
<Result>: Boolean - True if the initialization was performed,
- False in case of failure. In this case, the ErrorOccurred variable is set to True. To get more details on the error, use ErrorInfo.
<Voice>: SpeechSynthesisVoice variable Name of the SpeechSynthesisVoice variable to be used for reading the text. <Speed>: Optional integer Speed for reading the text, included between 0 (very slow) and 10 (very fast). If this parameter is not specified, its value will be set to 5 (average speed). Business / UI classification: UI Code Component: wd280android.aar
This page is also available for…
|
|
|
|