PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Operating mode
  • Application in the background: Android 10 specific case
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Initializes the parameters of speech synthesis for the current application.
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.
Versions 18 and later
Android Widget This function is now available in Android Widget mode.
New in version 18
Android Widget This function is now available in Android Widget mode.
Android Widget This function is now available in Android Widget mode.
Versions 21 and later
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
iPhone/iPad This function is now available for iPhone/iPad applications.
New in version 21
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
iPhone/iPad This function is now available for iPhone/iPad applications.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
iPhone/iPad This function is now available for iPhone/iPad applications.
Example
IF NOT SpeechSynthesisInitialize(NationToLanguage(Nation())) THEN
        Error("Failure initializing the speech synthesis.", ErrorInfo())
END
Syntax
<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 find out the error details, 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 device
    • English
    • Default language of engine for speech synthesis.
  • 0 to use the current application language.
The available constants are as follows:
Versions 16 and later
languageAfrikaans
New in version 16
languageAfrikaans
languageAfrikaans
Afrikaans
languageAlbanianAlbanian
languageGermanGerman
languageEnglishEnglish
languageArabicArabic
languageArmenianArmenian
Versions 16 and later
languageBengali
New in version 16
languageBengali
languageBengali
Bengali
languageBelarusianBelorussian
languageBulgarianBulgarian
Versions 16 and later
languageCatalan
New in version 16
languageCatalan
languageCatalan
Catalan
languageChineseChinese
languageKoreanKorean
languageCroatianCroatian
languageDanishDanish
languageSpanishSpanish
languageEstonianEstonian
languageFinnishFinnish
languageFrenchFrench
languageGeorgianGeorgian
languageGreekGreek
languageHebrewHebrew
Versions 17 and later
languageHindi
New in version 17
languageHindi
languageHindi
Hindi
languageHungarianHungarian
Versions 16 and later
languageIndonesian
New in version 16
languageIndonesian
languageIndonesian
Indonesian
languageIcelandicIcelandic
languageItalianItalian
languageJapaneseJapanese
languageLatvianLatvian
languageLithuanianLithuanian
languageMacedonianMacedonian
languageDutchDutch
languageNorwegianNorwegian
languageUzbekUzbek
Versions 16 and later
languagePunjabi
New in version 16
languagePunjabi
languagePunjabi
Punjabi
languagePolishPolish
languagePortuguesePortuguese
languageRomanianRomanian
languageRussianRussian
languageSerbianSerbian
Versions 16 and later
languageSindhi
New in version 16
languageSindhi
languageSindhi
Sindhi
languageSlovakSlovakian
languageSlovenianSlovenian
languageSwedishSwedish
languageCzechCzech
languageThaiThai
languageTurkishTurkish
languageUkrainianUkrainian
languageVietnameseVietnamese
<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).
Versions 21 and later
Universal Windows 10 App This parameter is ignored. The reading speed can be defined in the parameters of the mobile device used ("Parameters .. Time and language .. Voice").
New in version 21
Universal Windows 10 App This parameter is ignored. The reading speed can be defined in the parameters of the mobile device used ("Parameters .. Time and language .. Voice").
Universal Windows 10 App This parameter is ignored. The reading speed can be defined in the parameters of the mobile device used ("Parameters .. Time and language .. Voice").
Remarks

Operating mode

  • AndroidAndroid Widget If no engine for speech synthesis is installed on the device, its download will be automatically proposed.
    If the language to be used for speech synthesis is not the system language, this language must be specified in Android's "Text-to-speech Engine" settings. In "Language", replace "Use system language" with the desired language.
  • To synthesize a character string or a text file, use SpeechSynthesisReadText and SpeechSynthesisReadFile respectively.
  • Versions 21 and later
    Universal Windows 10 App Only the engine for speech synthesis corresponding to the default system language is installed. To install another engine for speech synthesis, use the parameter of the device ("Parameters .. Time and language .. Language").
    New in version 21
    Universal Windows 10 App Only the engine for speech synthesis corresponding to the default system language is installed. To install another engine for speech synthesis, use the parameter of the device ("Parameters .. Time and language .. Language").
    Universal Windows 10 App Only the engine for speech synthesis corresponding to the default system language is installed. To install another engine for speech synthesis, use the parameter of the device ("Parameters .. Time and language .. Language").
  • AndroidAndroid Widget The functions for speech synthesis are available for the devices running Android version 1.6 or later (api level 4).
    A fatal error occurs if the function is used with an earlier system version.
    To know the Android version on which the application is running, use SysAndroidVersion.
  • Versions 21 and later
    iPhone/iPad The functions for speech synthesis are available for the devices running iOS version 6 or later. The speech synthesis does not operate on the iOS 8 emulators.
    New in version 21
    iPhone/iPad The functions for speech synthesis are available for the devices running iOS version 6 or later. The speech synthesis does not operate on the iOS 8 emulators.
    iPhone/iPad The functions for speech synthesis are available for the devices running iOS version 6 or later. The speech synthesis does not operate on the iOS 8 emulators.
Versions 21 and later
Universal Windows 10 App Required application feature
The use of this function triggers the declaration of an application feature in the wizard for generating the application.
Required feature: Microphone: This feature allows the applications to perform audio recordings.
New in version 21
Universal Windows 10 App Required application feature
The use of this function triggers the declaration of an application feature in the wizard for generating the application.
Required feature: Microphone: This feature allows the applications to perform audio recordings.
Universal Windows 10 App Required application feature
The use of this function triggers the declaration of an application feature in the wizard for generating the application.
Required feature: Microphone: This feature allows the applications to perform audio recordings.
Versions 25 and later
AndroidAndroid Widget

Application in the background: Android 10 specific case

From Android 10, it is no longer possible to open a window when the application is in the background.
SpeechSynthesisInitialize can open a window. If this function is used while the application is in the background, a fatal error will occur.
Tips:
  • It is possible to determine if the application is in the background using InBackgroundMode.
  • If an application needs to interact with the user while it is in the background, the solution is to display a notification (via the Notification type). When the notification is clicked on, the application will be brought back to the foreground if ..ActivateApplication is set to True. It is also possible to open a window from the procedure passed to ..ActionClick.
New in version 25
AndroidAndroid Widget

Application in the background: Android 10 specific case

From Android 10, it is no longer possible to open a window when the application is in the background.
SpeechSynthesisInitialize can open a window. If this function is used while the application is in the background, a fatal error will occur.
Tips:
  • It is possible to determine if the application is in the background using InBackgroundMode.
  • If an application needs to interact with the user while it is in the background, the solution is to display a notification (via the Notification type). When the notification is clicked on, the application will be brought back to the foreground if ..ActivateApplication is set to True. It is also possible to open a window from the procedure passed to ..ActionClick.
AndroidAndroid Widget

Application in the background: Android 10 specific case

From Android 10, it is no longer possible to open a window when the application is in the background.
SpeechSynthesisInitialize can open a window. If this function is used while the application is in the background, a fatal error will occur.
Tips:
  • It is possible to determine if the application is in the background using InBackgroundMode.
  • If an application needs to interact with the user while it is in the background, the solution is to display a notification (via the Notification type). When the notification is clicked on, the application will be brought back to the foreground if ..ActivateApplication is set to True. It is also possible to open a window from the procedure passed to ..ActionClick.
Component : wd250android.jar
Minimum version required
  • Version 17
This page is also available for…
Comments
Click [Add] to post a comment