PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Phonetic recognition
  • Special cases
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
Adds a voice command into the current window. The command is automatically disabled when closing the window. This voice command can be deleted by SpeechRecognitionDeleteCommand.
Notes:
  • WINDEVReports and QueriesWindowsUser code (UMC) A speech recognition program must be installed on the runtime computer. A speech recognition program is supplied with Windows Vista. For the other systems, "Dragon Naturally Speaking" must be installed (tests run with version 9 "Preferred" or "standard").
  • AndroidiPhone/iPad The service for speech recognition must be installed on the phone. The recognition of voice commands must be triggered by SpeechRecognitionTrigger.
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 23 and later
iPhone/iPad This function is now available for the iPhone/iPad applications.
New in version 23
iPhone/iPad This function is now available for the iPhone/iPad applications.
iPhone/iPad This function is now available for the iPhone/iPad applications.
Example
// Starts the "Proc_Anim_Window" procedure if the voice command is recognized
Voice1ID is int
Voice1ID = SpeechRecognitionAddCommand("Proc_Anim_Window", "Animate the window")
// Starts the "Find" procedure if the voice command is recognized
VoiceID is int = SpeechRecognitionAddCommand("Find", "Finds the form of")
Voice2ID is int = SpeechRecognitionAddCommand("Find", "Displays the form of")
Voice3ID is int = SpeechRecognitionAddCommand("Find", "Seeks the form of")
PROCÉDURE Find(Param1)
sCustomer is string = Param1[[21 to ]]
HReadSeekFirst(sCustomer, LastName_FirstName, sCustomer)
Syntax
<Result> = SpeechRecognitionAddCommand(<Procedure Name> , <Sentence to Recognize>)
<Result>: Integer
Identifier of voice command.
<Procedure Name>: Character string (with quotes)
Name of the procedure that will be run when the voice command is heard. This procedure has the following format:
PROCEDURE <Procedure Name>(<Parameter Name>)
<Parameter Name> is a character string parameter. At run time, <Parameter Name> corresponds to the sentence that is recognized.
<Sentence to Recognize>: Character string (with quotes)
Sentence used to trigger the execution of the procedure. If this parameter corresponds to an empty string (""), the specified procedure will be run for each sentence spoken.
Remarks

Phonetic recognition

If <Sentence to Recognize> corresponds to an empty string (""), the procedure will be run for each sentence pronounced. This enables you to process the sentenced spoken in the procedure in order to recognize the voice command that was used.
You can for example store in an array (associative array for example) all the available voice commands (phonetically) and the procedure associated with each one of these commands.
To do so, pass each word of the sentence phonetically and compare the sentence with the array of voice commands. If the command is recognized, the associated procedure can be run.
To improve the understanding, you also have the ability to delete the unnecessary words found at the beginning and at the end of sentence.

Special cases

  • WINDEVReports and QueriesWindowsiPhone/iPadUser code (UMC) SpeechRecognitionAddCommand must be used in the initialization code of window or control. This function is not recognized if it is used in the initialization code of project.
  • AndroidAndroid Widget SpeechRecognitionAddCommand can be used from any process of a window (or window controls).
  • Versions 23 and later
    iPhone/iPad This function can be used from iOS 10.
    New in version 23
    iPhone/iPad This function can be used from iOS 10.
    iPhone/iPad This function can be used from iOS 10.
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.
Components
WINDEVReports and Queries wd230obj.dll
Android wd230android.jar
Minimum required version
  • Version 17
This page is also available for…
Comments
Click [Add] to post a comment