# Application Programming Interface (API) Reference

Version 1.0 - April 1997

IBM VoiceType Developer's Toolkit for OS/2

Version 1.0

Application Programming Interface (API) Reference

## Table of Contents

IBM Speech API (SMAPI)

- Overview
- Format of the Function Call Descriptions
- Naming Conventions
- SMAPI Function Calls by Group
- Attribute Handling Functions
- Callback and Dispatching Functions
- Data Access Functions
- Connection Functions
- Session Functions
- Database Functions
- Speech Engine State Functions
- Vocabulary Functions
- Audio Functions
- Parallel Session API Calls

- Starter Set APIs

- Function Calls to the Engine
- SmAddCallback
- SmAddPronunciation
- SmAddToVocab
- SmApiVersionCheck
- SmCancelPlayback
- SmClose
- SmConnect
- SmCorrectText
- SmCorrectTextCancel
- SmDefineGrammar
- SmDefineVocab
- SmDetachSessions
- SmDisableVocab
- SmDiscardData
- SmDisconnect
- SmDispatch
- SmEnableVocab
- SmEventNotify
- SmHaltRecognizer
- SmMicOff
- SmMicOn
- SmNewContext
- SmOpen
- SmPlayMessage
- SmPlayUtterance
- SmPlayWords
- SmQuery
- SmQueryAddedWords
- SmQueryAlternates
- SmQueryDefault
- SmQueryEnabledVocabs
- SmQueryEnrollIds
- SmQueryLanguages
- SmQueryPronunciation
- SmQueryPronunciations
- SmQuerySessions
- SmQuerySpeechData
- SmQueryTasks
- SmQueryUserInfo
- SmQueryUsers
- SmQueryVocabs
- SmQueryWord
- SmReceiveMsg
- SmRecognizeNextWord
- SmReleaseFocus
- SmRemoveCallback
- SmRemoveFromVocab
- SmRemovePronunciation
- SmRequestFocus
- SmRequestMicOff
- SmRequestMicOn
- SmRestoreSpeechData
- SmSaveSpeechData
- SmSet
- SmSetArg
- SmSetDefault
- SmSetUserInfo
- SmUndefineVocab
- SmWordCorrection

- Data Access Functions
- SmGetAlphabets
- SmGetAlternates
- SmGetAnnotations
- SmGetApplication
- SmGetApplications
- SmGetAudioLevel
- SmGetDescriptions
- SmGetEngineState
- SmGetEnrollId
- SmGetEnrollIds
- SmGetEventId
- SmGetEventOptions
- SmGetFirmWords
- SmGetFocusState
- SmGetGrammarPath
- SmGetInfirmWords
- SmGetItemValue
- SmGetLanguages
- SmGetMicState
- SmGetMsgName
- SmGetMsgType
- SmGetNameValue
- SmGetNumberWordMsgs
- SmGetPercentages
- SmGetPhraseState
- SmGetPronunciations
- SmGetRc
- SmGetRcDescription
- SmGetRcName
- SmGetScripts
- SmGetService
- SmGetSessionId
- SmGetSeverity
- SmGetSpeechDataArchive
- SmGetSpeechDataOptions
- SmGetSpeechDataSize
- SmGetSpeechDataVersion
- SmGetSpelling
- SmGetSpellings
- SmGetStates
- SmGetStatus
- SmGetTags
- SmGetTask
- SmGetTasks
- SmGetTimes
- SmGetUserId
- SmGetUserIds
- SmGetUsers
- SmGetUtteranceNumber
- SmGetVocabList
- SmGetVocabName
- SmGetVocWords
- SmGetWords
- SmReturnRc
- SmReturnRcDescription
- SmReturnRcName

- Reply Message Structures and Callbacks
- Reply Message Structures Received from the Speech Engine
- Callbacks
- Reply Structure Functions for Unsolicited Callbacks

- Data Types
- SmArg
- SmArgVal
- caddr_t
- SmHandler
- SmMsg
- SM_VOCWORD
- SM_WORD

- SMAPI Attributes
- System Dependent Speech Manager Definition for Argument Lists
- Argument Attribute List

  Appendices

- Appendix A. SMAPI Return Codes and Messages
- SMAPI Return Codes and Messages
- Speech Manager Return Codes and Messages
- Status Codes and Messages
- SMAPI Message Explanations
- router.msg Log

- Appendix B. Speech Engine Error Messages

- Index

  Notices

  # Notices

  First Edition (April 1997)

  The following paragraph does not apply to the United Kingdom or any country where such provisions are inconsistent with local law:

  INTERNATIONAL BUSINESS MACHINES CORPORATION PROVIDES THIS PUBLICATION "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.

  Some states do not allow disclaimer of express or implied warranties in certain transactions, therefore, this statement may not apply to you.

  This publication could include technical inaccuracies or typographical errors. Changes are periodically made to the information herein; these changes will be incorporated in new editions of the publication. IBM may make improvements and/or changes in the product(s) and/or the program(s) described in this publication at any time.

  It is possible that this publication may contain reference to, or information about, IBM products (machines and programs), programming, or services that are not announced in your country. Such references or information must not be construed to mean that IBM intends to announce such IBM products, programming, or services in your country.

  Requests for technical information about IBM products should be made to your IBM reseller or IBM marketing representative.

  ## Copyright Notices

  © Copyright International Business Machines Corporation 1997. All rights reserved.

  Note to U.S. Government Users: Documentation related to restricted rights - use, duplication or disclosure is subject to restrictions set forth in GSA ADP Schedule Contract with IBM Corp.

  ## Disclaimers

  References in this publication to IBM products, programs, or services do not imply that IBM intends to make these available in all countries in which IBM operates. Any reference to an IBM product, program or service is not intended to state or imply that only that IBM product, program, or service may be used. Subject to IBM's valid intellectual property or other legally protectable rights, any functionally equivalent product, program, or service may be used instead of the IBM product, program, or service. The evaluation and verification of operation in conjunction with other products, except those expressly designated by IBM, are the responsibility of the user.

  IBM may have patents or pending patent applications covering subject matter in this document. The furnishing of this document does not give you any license to these patents. You can send license inquiries, in writing, to:

  IBM Director of Licensing
  IBM Corporation
  500 Columbus Avenue
  Thornwood, NY 10594
  U.S.A.

  Asia-Pacific users can inquire, in writing, to the IBM Director of Intellectual Property and Licensing, IBM World Trade Asia Corporation, 2-31 Roppongi 3-chome, Minato-ku, Tokyo 106, Japan.

  Licensees of this program who wish to have information about it for the purpose of enabling: (i) the exchange of information between independently created programs and other programs (including this one) and (ii) the mutual use of the information which has been exchanged, should contact IBM Corporation, Department LZKS, 11400 Burnet Road, Austin, TX 78758 U.S.A. Such information may be available, subject to appropriate terms and conditions, including in some cases, payment of a fee.

  The following terms are trademarks of the IBM Corporation in the United States or other countries or both:

  IBM

  Other company, product, and service names, which may be denoted by a double asterisk (**), may be trademarks or service marks of others.

  [ Top of Page | Next Page | Index ]