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
Reads the content of the specified file by using the engine for speech synthesis found on the device.
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
SpeechSynthesisReadFile("/sdcard/email.txt")
Syntax
<Result> = SpeechSynthesisReadFile(<Name and path of text file> [, <Locking>])
<Result>: Boolean
  • True if the file content was read (locking mode) or if the file content was added to the reading queue (non-locking mode),
  • False in case of failure. The ErrorOccurred variable is set to True if an error occurs. To find out the error details, use ErrorInfo.
<Name and path of text file>: Character string (with quotes)
Name and full (or relative) path of text file to read.
<Locking>: Optional boolean
  • True: the function is run in locking mode. The code following the call to the function will be run once the entire file is read or when the function fails. An hourglass will be displayed during the read operation. Use NextTitle to customize the message displayed by the hourglass.
    Versions 21 and later
    iPhone/iPad This runtime mode is not available.
    New in version 21
    iPhone/iPad This runtime mode is not available.
    iPhone/iPad This runtime mode is not available.
  • False (default value): the function is run in non-locking mode. The code following the call to the function will be run as soon as the reading of the file starts or when the function fails.
Remarks

Operating mode

  • 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.
  • 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 find out whether a read operation is in progress on the speech synthesis engine, use SpeechSynthesisInProgress.
    To stop the current read operations, use SpeechSynthesisStop.
  • To define the parameters that will be used by the engine for speech synthesis (language, reading speed, etc.), use SpeechSynthesisInitialize.
    If the parameters of speech synthesis have not been previously defined with SpeechSynthesisInitialize,, the default parameters will be used and the language for text reading will be the first language available for the speech synthesis engine 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.
  • To read the content of a character string, use SpeechSynthesisReadText.
  • AndroidAndroid Widget To define the volume of reading, use VolumeModify associated with the volumeMusic constant.
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.
SpeechSynthesisReadFile 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.
SpeechSynthesisReadFile 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.
SpeechSynthesisReadFile 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