How Tos
Last reviewed: 8/4/2002
Article ID: H080201
HOW: Developing PowerBuilder applications that speak and listen
The information in this article applies to:
- SpeechKit 3
Summary
How do I use SpeechKit with PowerBuilder?
PowerBuilder supports ActiveX components so you may use the ChantSR and ChantTTS ActiveX components to be able recognize and synthesize speech.
More Information
To add speech recognition to a PowerBuilder application, add the ChantSR component to your application as follows:
- Select View/Layout menu item to display the application form
- Select Insert/Control/Ole... menu item to display the Insert Object Dialog
- Select Insert Control tab to display the list of controls
- Scroll and select the Chant SpeechKit Speech Recognition Component and click OK
- Declare an instance variable as the object instance variable (e.g., OLEObject ChantSR1)
- Declare enumeration constants you need (i.e., copy declarations provided in the Chant\SpeechKit 3.0\ActiveX\Samples\PowerBuilder\SpeechKit3Constants.txt file)
- Instantiate the component in your code initialization (e.g., ChantSR1 = ole_1.Object)
- Invoke the methods you need in your application script (e.g., ChantSR1.RegisterCallback(ChantHasPhrase))
To add text-to-speech to a PowerBuilder application, add the ChantTTS component to your application as follows:
- Select View/Layout menu item to display the application form
- Select Insert/Control/Ole... menu item to display the Insert Object Dialog
- Select Insert Control tab to display the list of controls
- Scroll and select the Chant SpeechKit Text-to-Speech Component and click OK
- Declare an instance variable as the object instance variable (e.g., OLEObject ChantTTS1)
- Declare enumeration constants you need (i.e., copy declarations provided in the Chant\SpeechKit 3.0\ActiveX\Samples\PowerBuilder\SpeechKit3Constants.txt file)
- Instantiate the component in your code initialization (e.g., ChantTTS1 = ole_2.Object)
- Invoke the methods you need in your application script (e.g., ChantTTS1.RegisterCallback(ChantTextToSpeechAudioStop))
The SpeechKit SR-5 installation ActiveX feature installs the PowerBuilder constants declaration file, Number, and Saythis samples.