ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Mobile specific functions / Speech Synthesis functions
  • Overview
  • How to?
  • Necessary conditions
  • Using the speech synthesis in the application
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Overview
The phones can talk!
WINDEV Mobile proposes several functions to easily use this feature in your applications for Android, iOS or Universal Windows 10 App devices.
How to?

Necessary conditions

AndroidAndroid Widget Speech synthesis functions are only available on devices with Android 1.6 or higher (API level 4).
A fatal error occurs if the function is used with an earlier system version.
To determine the version of Android the application is running on, use SysAndroidVersion.
iPhone/iPadIOS WidgetMac Catalyst Speech synthesis functions are only available on devices with iOS 7 and higher. The speech synthesis does not operate on the iOS 8 emulators.

Using the speech synthesis in the application

To use the speech synthesis in the application:
  1. Initialize the options for managing the voice synthesis with SpeechSynthesisInitialize.
    Remark: This function is optional. If the parameters of speech synthesis have not been defined beforehand, the default parameters will be used and the language for text reading will be the first language available for the engine of speech synthesis according to the following sequence:
    • Application language (default language or language defined by Nation),
    • Language of device,
    • English,
    • Default language of engine for speech synthesis.
  2. AndroidAndroid Widget Define (if necessary) the reading volume with VolumeModify (volumeMusic constant>.
  3. Start the reading with the following functions:
    SpeechSynthesisReadFileReads the content of the specified file by using the engine for speech synthesis found on the device.
    SpeechSynthesisReadTextReads the specified text using the device's text-to-speech engine.
Remarks:
  • AndroidAndroid Widget If no engine for speech synthesis is installed on the device, its download will be automatically proposed.
  • If a new read operation is triggered while another read operation is in progress, the new read operation will start once the first one is over.
    To know whether a read operation is in progress on the speech synthesis engine, use SpeechSynthesisInProgress.
    To stop the current read operations, use SpeechSynthesisStop.
Related Examples:
Android Speech Synthesis Android (WINDEV Mobile): Android Speech Synthesis
[ + ] This educational example explains how to manage the recognition and the speech synthesis Android.
The speech synthesis is performed by using either the WLanguage functions, or an external JAR file included in the WINDEV Mobile project.
Minimum version required
  • Version 17
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 06/22/2023

Send a report | Local help