Getting Started Table of Contents || Prev | Next || [?]

 
Before getting started, you'll need to make sure your speech preferences are set-up correctly. See the Speech Setup file that came with the SUI Pack download package for more information.

First, you'll need to decide how you want to be notified of speech recognition events. You can call SUI_GetStatus in a loop, as shown below:

Repeat `Loop until we hear from the user.
  DELAY PROCESS (Current process ;6)
Until (SUI_GetStatus=1) | (bQuit))

Under Mac OS X, you can also specify a project method to be called whenever valid speech is spoken using SUI_SetNotifyMethod. This may be the preferred approach, because it avoids the constant polling of the plug-in:

SUI_SetNotifyMethod ("MySpeechNotificationMethod")

Next, you'll need to decide what to voice-enable as soon as the database is launched. One useful practice is to voice-enable menus. There's no one command in SUI Pack that will do this, but you can create a language model for menu items. For an example, see the project method HandleMenus in the SUI Pack demo application. SUI_AddGroupCommand is the main method for creating general language models. To later identify what was spoken, each phrase can be assigned a numeric ID, or reference constant ("refcon").
To activate speech recognition, call SUI_InitializeSR. You can choose to display the PlainTalk feedback window, or use your own custom feedback system. The SUI Pack demo application uses it's own floating window (see project method SUI_FeedbackWindow).

When valid speech is detected, in most cases you must write code to perform the desired operation. You can retrieve the text (SUI_GetSpoken) or the numeric ID (SUI_GetRefcon) of the phrase to help decide what 4D code to run. Commands for voice-enabled output and input provide some automatic actions.

If at any time you need assistance, send your questions to: support@inquire4d.com