Previous Book Contents Book Index Next

Inside Macintosh: Sound /
Chapter 4 - Speech Manager


Legacy Documentclose button

Important: Inside Macintosh: Sound is deprecated as of Mac OS X v10.5. For new audio development in Mac OS X, use Core Audio. See the Audio page in the ADC Reference Library.

Summary of the Speech Manager

Pascal Summary

Constants

CONST
   {Gestalt selector and response bits for speech attributes}
   gestaltSpeechAttr          = 'ttsc';   {speech attributes selector}
   gestaltSpeechMgrPresent    = 0;        {Speech Manager is present}
   gestaltSpeechHasPPCGlue    = 1;        {native glue for PowerPC present}
   
   {Operating System types}
   kTextToSpeechSynthType     = 'ttsc';   {synthesizer component type}
   kTextToSpeechVoiceType     = 'ttvd';   {voice resource type}
   kTextToSpeechVoiceFileType = 'ttvf';   {voice file type}
   kTextToSpeechVoiceBundleType
                              = 'ttvb';   {voice bundle file type}
   
   {masks for SpeakBuffer and text-done callback control flags}
   kNoEndingProsody        = 1;        {disable prosody at end of sentences}
   kNoSpeechInterrupt      = 2;        {do not interrupt current speech}
   kPreflightThenPause     = 4;        {compute speech without generating}
  
   {constants for StopSpeechAt and PauseSpeechAt}
   kImmediate              = 0;        {stop immediately}
   kEndOfWord              = 1;        {stop at end of word}
   kEndOfSentence          = 2;        {stop at end of sentence}
   
   {GetSpeechInfo and SetSpeechInfo selectors}
   soCharacterMode         = 'char';   {get or set character-processing mode}
   soCommandDelimiter      = 'dlim';   {set embedded command delimiters}
   soCurrentA5             = 'myA5';   {set A5 on callbacks}
   soCurrentVoice          = 'cvox';   {set speaking voice}
   soErrorCallBack         = 'ercb';   {set error callback}
   soErrors                = 'erro';   {get error information}
   soInputMode             = 'inpt';   {get or set text-processing mode}
   soNumberMode            = 'nmbr';   {get or set number-processing mode}
   soPhonemeCallBack       = 'phcb';   {set phoneme callback}
   soPhonemeSymbols        = 'phsy';   {get phoneme symbols and sample words}
   soPitchBase             = 'pbas';   {get or set baseline pitch}
   soPitchMod              = 'pmod';   {get or set pitch modulation}
   soRate                  = 'rate';   {get or set speech rate}
   soRecentSync            = 'sync';   {get most recent synchronization }
                                       { message information}
   soRefCon                = 'refc';   {set reference constant value}
   soReset                 = 'rset';   {set channel back to default state}
   soSpeechDoneCallBack    = 'sdcb';   {set speech-done callback}
   soStatus                = 'stat';   {get status of channel}
   soSyncCallBack          = 'sycb';   {set synchronization callback}
   soSynthExtension        = 'xtnd';   {get or set synthesizer-specific }
                                       { information}
   soSynthType             = 'vers';   {get synthesizer information}
   soTextDoneCallBack      = 'tdcb';   {set text-done callback}
   soVolume                = 'volm';   {get or set speech volume}
   soWordCallBack          = 'wdcb';   {set word callback}
   
   {input mode constants}
   modeText             = 'TEXT';
   modePhonemes         = 'PHON';
   {character and number mode constants}
   modeNormal           = 'NORM';
   modeLiteral          = 'LTRL';
   
   {GetVoiceInfo selectors}
   soVoiceDescription   = 'info';      {get basic voice information}
   soVoiceFile          = 'fref';      {get voice file reference information}
   
   {genders}
   kNeuter              = 0;
   kMale                = 1;
   kFemale              = 2;

Data Structures

Speech Channel Record

TYPE
   SpeechChannelRecord  = LongInt;                 {speech channel record}
   SpeechChannel        = ^SpeechChannelRecord;    {speech channel}
   SpeechChannelPtr     = ^SpeechChannel;          {speech channel pointer}

Voice Specification Record

   VoiceSpec =
   RECORD
      creator:          OSType;        {ID of required synthesizer}
      id:               OSType;        {ID of voice on the synthesizer}
   END;
   VoiceSpecPtr = ^VoiceSpec;

Voice Description Record

   VoiceDescription =
   RECORD
      length:           LongInt;       {size of record--set by application}
      voice:            VoiceSpec;     {voice synthesizer and ID info}
      version:          LongInt;       {version number of voice}
      name:             Str63;         {name of voice}
      comment:          Str255;        {text information about voice}
      gender:           Integer;       {neuter, male, or female}
      age:              Integer;       {approximate age in years}
      script:           Integer;       {script code of text voice can }
                                       { process}
      language:         Integer;       {language code of voice output}
      region:           Integer;       {region code of voice output}
      reserved1:        LongInt;       {always 0--reserved for future use}
      reserved2:        LongInt;       {always 0--reserved for future use}
      reserved3:        LongInt;       {always 0--reserved for future use}
      reserved4:        LongInt;       {always 0--reserved for future use}
   END;
   VoiceDescriptionPtr = ^VoiceDescription;

Voice File Information Record

   VoiceFileInfo =
   RECORD
      fileSpec:         FSSpec;        {volume, dir, and name of file}
      resID:            Integer;       {resource ID of voice in the file}
   END;
   VoiceFileInfoPtr = ^VoiceFileInfo;

Speech-Status Information Record

   SpeechStatusInfo =
   RECORD
      outputBusy:       Boolean;       {TRUE if audio is playing}
      outputPaused:     Boolean;       {TRUE if channel is paused}
      inputBytesLeft:   LongInt;       {bytes of text left to process}
      phonemeCode:      Integer;       {opcode for current phoneme}
   END;
   SpeechStatusInfoPtr = ^SpeechStatusInfo;

Speech Error Information Record

   SpeechErrorInfo =
   RECORD
      count:            Integer;       {number of errors since last check}
      oldest:           OSErr;         {oldest unread error}
      oldPos:           LongInt;       {character position of oldest error}
      newest:           OSErr;         {most recent error}
      newPos:           LongInt;       {character position of newest error}
   END;

Speech Version Information Record

   SpeechVersionInfo =
   RECORD
      synthType:        OSType;        {general synthesizer type}
      synthSubType:     OSType;        {specific synthesizer type}
      synthManufacturer:
                        OSType;        {synthesizer creator ID}
      synthFlags:       LongInt;       {synthesizer feature flags}
      synthVersion:     NumVersion;    {synthesizer version number}
   END;
   SpeechVersionInfoPtr = ^SpeechVersionInfo;

Phoneme Information Record

   PhonemeInfo =
   RECORD
      opCode:           Integer;       {opcode for the phoneme}
      phStr:            Str15;         {corresponding character string}
      exampleStr:       Str31;         {word that shows use of phoneme}
      hiliteStart:      Integer;       {offset from beginning of word }
                                       { to beginning of phoneme sound}
      hiliteEnd:        Integer;       {offset from beginning of word }
                                       { to end of phoneme sound}
   END;

Phoneme Descriptor Record

   PhonemeDescriptor =
   RECORD
      phonemeCount:     Integer;       {number of phonemes defined by }
                                       { current synthesizer}
                                       {list of phoneme information records}
      thePhonemes:      ARRAY[0..0] OF PhonemeInfo;
   END;

Speech Extension Data Record

   SpeechXtndData =
   RECORD
      synthCreator:     OSType;        {synthesizer creator ID}
                                       {data used by synthesizer}
      synthData:        PACKED ARRAY[0..1] OF Char;
   END;

Delimiter Information Record

   DelimiterInfo =
   RECORD
      startDelimiter:   PACKED ARRAY[0..1] OF Char;   {start delimiter}
      endDelimiter:     PACKED ARRAY[0..1] OF Char;   {end delimiter}
   END;

Speech Manager Routines

Starting, Stopping, and Pausing Speech

FUNCTION  SpeakString   (s: Str255): OSErr;
FUNCTION  SpeakText     (chan: SpeechChannel; textBuf: Ptr; 
                         byteLen:LongInt): OSErr;
FUNCTION  SpeakBuffer   (chan: SpeechChannel; textBuf: Ptr; 
                         byteLen:LongInt; controlFlags: LongInt): 
          OSErr;
FUNCTION  StopSpeech    (chan: SpeechChannel): OSErr;
FUNCTION  StopSpeechAt  (chan: SpeechChannel; whereToStop: LongInt): 
          OSErr;
FUNCTION  PauseSpeechAt (chan: SpeechChannel; whereToStop: LongInt): 
          OSErr;
FUNCTION  ContinueSpeech  (chan: SpeechChannel): OSErr;

Obtaining Information About Voices

FUNCTION  MakeVoiceSpec (creator: OSType; id: OSType; 
                         voice:VoiceSpecPtr): OSErr;
FUNCTION  CountVoices   (VAR numVoices: Integer): OSErr;
FUNCTION  GetIndVoice   (index: Integer; voice: VoiceSpecPtr): OSErr;
FUNCTION  GetVoiceDescription
                        (voice: VoiceSpecPtr; info:VoiceDescriptionPtr; infoLength:LongInt)
                       : OSErr;
FUNCTION  GetVoiceInfo  (voice: VoiceSpecPtr; selector:OSType; 
                         voiceInfo:Ptr): OSErr;

Managing Speech Channels

FUNCTION  NewSpeechChannel  
                        (voice: VoiceSpecPtr; VAR chan:SpeechChannel): 
          OSErr;
FUNCTION  DisposeSpeechChannel
                        (chan: SpeechChannel): OSErr;

Obtaining Information About Speech

FUNCTION  SpeechManagerVersion
                       : NumVersion;
FUNCTION  SpeechBusy    
                       : Integer;
FUNCTION  SpeechBusySystemWide
                       : Integer;

Changing Speech Attributes

FUNCTION  GetSpeechRate   (chan: SpeechChannel; VAR rate: Fixed): OSErr;
FUNCTION  SetSpeechRate   (chan: SpeechChannel; rate: Fixed): OSErr;
FUNCTION  GetSpeechPitch  (chan: SpeechChannel; VAR pitch: Fixed): OSErr;
FUNCTION  SetSpeechPitch  (chan: SpeechChannel; pitch: Fixed): OSErr;
FUNCTION  GetSpeechInfo   (chan: SpeechChannel; selector: OSType; 
                           speechInfo:Ptr): OSErr;
FUNCTION  SetSpeechInfo   (chan: SpeechChannel; selector: OSType; 
                           speechInfo:Ptr): OSErr;

Converting Text to Phonemes

FUNCTION  TextToPhonemes  (chan: SpeechChannel; textBuf:Ptr; 
                           textBytes:LongInt; phonemeBuf: Handle; 
                           VAR phonemeBytes: LongInt): OSErr;

Installing a Pronunciation Dictionary

FUNCTION  UseDictionary   (chan: SpeechChannel; dictionary: Handle)
                         : OSErr;

Application-Defined Routines

PROCEDURE MyTextDoneCallback
                            (chan: SpeechChannel; refCon: LongInt; VARnextBuf: Ptr; 
                             VAR byteLen: LongInt; VARcontrolFlags: LongInt);
PROCEDURE MySpeechDoneCallback
                            (chan: SpeechChannel; refCon: LongInt);
PROCEDURE MySynchronizationCallback
                            (chan: SpeechChannel; refCon: LongInt; syncMessage: OSType);
PROCEDURE MyErrorCallback   (chan: SpeechChannel; refCon: LongInt;
                             error: OSErr; bytePos: LongInt);
PROCEDURE MyPhonemeCallback
                            (chan: SpeechChannel; refCon: LongInt; phonemeOpcode: Integer);
PROCEDURE MyWordCallback    (chan: SpeechChannel; refCon: LongInt;
                             wordPos: LongInt; wordLen: Integer);

C Summary

Constants

/*Gestalt selector and response bits for speech attributes*/
#define gestaltSpeechAttr  'ttsc'   /*speech attributes selector*/
enum {
   gestaltSpeechMgrPresent    = 0   /*Speech Manager is present*/
   gestaltSpeechHasPPCGlue    = 1   /*native glue for PowerPC present*/
};
/*Operating System types*/
#define kTextToSpeechSynthType         'ttsc'   /*synthesizer component */
                                                /* type*/
#define kTextToSpeechVoiceType         'ttvd'   /*voice resource type*/
#define kTextToSpeechVoiceFileType     'ttvf'   /*voice file type*/
#define kTextToSpeechVoiceBundleType   'ttvb'   /*voice bundle file type*/
/*masks for SpeakBuffer and text-done callback control flags*/
enum {
   kNoEndingProsody        = 1,     /*disable prosody at end of sentences*/
   kNoSpeechInterrupt      = 2,     /*do not interrupt current speech*/
   kPreflightThenPause     = 4      /*compute speech without generating*/
};
/*constants for StopSpeechAt and PauseSpeechAt*/
enum {
   kImmediate        = 0,           /*stop immediately*/
   kEndOfWord        = 1,           /*stop at end of word*/
   kEndOfSentence    = 2            /*stop at end of sentence*/
};
/*GetSpeechInfo and SetSpeechInfo selectors*/
#define soCharacterMode       'char'   /*get or set character-processing */
                                       /* mode*/
#define soCommandDelimiter    'dlim'   /*set embedded command delimiters*/
#define soCurrentA5           'myA5'   /*set A5 on callbacks*/
#define soCurrentVoice        'cvox'   /*set speaking voice*/
#define soErrorCallBack       'ercb'   /*set error callback*/
#define soErrors              'erro'   /*get error information*/
#define soInputMode           'inpt'   /*get or set text-processing mode*/
#define soNumberMode          'nmbr'   /*get or set number-processing mode*/
#define soPhonemeCallBack     'phcb'   /*set phoneme callback*/
#define soPhonemeSymbols      'phsy'   /*get phoneme symbols and sample*/
                                       /* words*/
#define soPitchBase           'pbas'   /*get or set baseline pitch*/
#define soPitchMod            'pmod'   /*get or set pitch modulation*/
#define soRate                'rate'   /*get or set speech rate*/
#define soRecentSync          'sync'   /*get most recent synchronization */
                                       /* message information*/
#define soRefCon              'refc'   /*set reference constant value*/
#define soReset               'rset'   /*set channel back to default state*/
#define soSpeechDoneCallBack  'sdcb'   /*set speech-done callback*/
#define soStatus              'stat'   /*get status of channel*/
#define soSyncCallBack        'sycb'   /*set synchronization callback*/
#define soSynthExtension      'xtnd'   /*get or set synthesizer-specific */
                                       /* information*/
#define soSynthType           'vers'   /*get synthesizer information*/
#define soTextDoneCallBack    'tdcb'   /*set text-done callback*/
#define soVolume              'volm'   /*get or set speech volume*/
#define soWordCallBack        'wdcb'   /*set word callback*/
/*input mode constants*/
#define modeText        'TEXT'
#define modePhonemes    'PHON'
/*character and number mode constants*/
#define modeNormal      'NORM'
#define modeLiteral     'LTRL'
/*GetVoiceInfo selectors*/
enum {
   soVoiceDescription   = 'info',   /*get basic voice information*/
   soVoiceFile          = 'fref'    /*get voice file reference information*/
};
/*genders*/
enum {
   kNeuter = 0, 
   kMale, 
   kFemale
};

Data Types

Speech Channel Record

typedef struct SpeechChannelRecord {
   long data[1];                       /*used internally*/
} SpeechChannelRecord;
typedef SpeechChannelRecord *SpeechChannel;

Voice Specification Record

typedef struct VoiceSpec {
   OSType      creator;             /*ID of required synthesizer*/
   OSType      id;                  /*ID of voice on the synthesizer*/
} VoiceSpec;

Voice Description Record

typedef struct VoiceDescription {
   long        length;              /*size of structure--set by application*/
   VoiceSpec   voice;               /*voice synthesizer and ID info*/
   long        version;             /*version number of voice*/
   Str63       name;                /*name of voice*/
   Str255      comment;             /*text information about voice*/
   short       gender;              /*neuter, male, or female*/
   short       age;                 /*approximate age in years*/
   short       script;              /*script code of text voice can process*/
   short       language;            /*language code of voice output*/
   short       region;              /*region code of voice output*/
   long        reserved[4];         /*always 0--reserved for future use*/
} VoiceDescription;

Voice File Information Record

typedef struct VoiceFileInfo {
   FSSpec      fileSpec;            /*volume, dir, and name of file*/
   short       resID;               /*resource ID of voice in the file*/
} VoiceFileInfo;

Speech Status Information Record

typedef struct SpeechStatusInfo {
   Boolean     outputBusy;          /*TRUE if audio is playing*/
   Boolean     outputPaused;        /*TRUE if channel is paused*/
   long        inputBytesLeft;      /*bytes of text left to process*/
   short       phonemeCode;         /*opcode for current phoneme*/
} SpeechStatusInfo;

Speech Error Information Record

typedef struct SpeechErrorInfo {
   short       count;               /*number of errors since last check*/
   OSErr       oldest;              /*oldest unread error*/
   long        oldPos;              /*character position of oldest error*/
   OSErr       newest;              /*most recent error*/
   long        newPos;              /*character position of newest error*/
} SpeechErrorInfo;

Speech Version Information Record

typedef struct SpeechVersionInfo {
   OSType      synthType;           /*general synthesizer type*/
   OSType      synthSubType;        /*specific synthesizer type*/
   OSType      synthManufacturer;   /*synthesizer creator ID*/
   long        synthFlags;          /*synthesizer feature flags*/
   NumVersion  synthVersion;        /*synthesizer version number*/
} SpeechVersionInfo;

Phoneme Information Record

typedef struct PhonemeInfo {
   short       opcode;              /*opcode for the phoneme*/
   Str15       phStr;               /*corresponding character string*/
   Str31       exampleStr;          /*word that shows use of phoneme*/
   short       hiliteStart;         /*offset from beginning of word */
                                    /* to beginning of phoneme sound*/
   short       hiliteEnd;           /*offset from beginning of word */
                                    /* to end of phoneme sound*/
} PhonemeInfo;

Phoneme Descriptor Record

typedef struct PhonemeDescriptor {
   short          phonemeCount;     /*number of phonemes defined by */
                                    /* current synthesizer*/
   PhonemeInfo    thePhonemes[1];   /*list of phoneme information records*/
} PhonemeDescriptor;

Speech Extension Data Record

typedef struct SpeechXtndData {
   OSType      synthCreator;        /*synthesizer creator ID*/
   Byte        synthData[2];        /*data used by synthesizer*/
} SpeechXtndData;

Delimiter Information Record

typedef struct DelimiterInfo {
   Byte        startDelimiter[2];   /*start delimiter*/
   Byte        endDelimiter[2];     /*end delimiter*/
} DelimiterInfo;

Speech Manager Routines

Starting, Stopping, and Pausing Speech

pascal  OSErr SpeakString   (StringPtr s);
pascal  OSErr SpeakText     (SpeechChannel chan, Ptr textBuf, 
                             long textBytes);
pascal  OSErr SpeakBuffer   (SpeechChannel chan, Ptr textBuf, 
                             long textBytes, long controlFlags);
pascal  OSErr StopSpeech    (SpeechChannel chan);
pascal  OSErr StopSpeechAt  (SpeechChannel chan, long whereToStop);
pascal  OSErr PauseSpeechAt (SpeechChannel chan, long whereToPause);
pascal  OSErr ContinueSpeech
                            (SpeechChannel chan);

Obtaining Information About Voices

pascal  OSErr MakeVoiceSpec (OSType creator, OSType id, VoiceSpec *voice);
pascal  OSErr CountVoices   (short *numVoices);
pascal  OSErr GetIndVoice   (short index, VoiceSpec *voice);
pascal  OSErr GetVoiceDescription
                            (VoiceSpec *voice, VoiceDescription *info,
                             long infoLength);
pascal  OSErr GetVoiceInfo  (VoiceSpec *voice, OSType selector, 
                             void *voiceInfo);

Managing Speech Channels

pascal  OSErr NewSpeechChannel
                            (VoiceSpec *voice, SpeechChannel *chan);
pascal  OSErr DisposeSpeechChannel
                            (SpeechChannel chan);

Obtaining Information About Speech

pascal  NumVersion SpeechManagerVersion
                            (void);
pascal  short SpeechBusy    (void);
pascal  short SpeechBusySystemWide
                            (void);

Changing Speech Attributes

pascal  OSErr GetSpeechRate (SpeechChannel chan, Fixed *rate);
pascal  OSErr SetSpeechRate (SpeechChannel chan, Fixed rate);
pascal  OSErr GetSpeechPitch
                            (SpeechChannel chan, Fixed *pitch);
pascal  OSErr SetSpeechPitch
                            (SpeechChannel chan, Fixed pitch);
pascal  OSErr GetSpeechInfo (SpeechChannel chan, OSType selector, 
                             void *speechInfo);
pascal  OSErr SetSpeechInfo (SpeechChannel chan, OSType selector, 
                             void *speechInfo);

Converting Text to Phonemes

pascal  OSErr TextToPhonemes
                            (SpeechChannel chan, Ptr textBuf, 
                             long textBytes, Handle phonemeBuf, 
                             long *phonemeBytes);

Installing a Pronunciation Dictionary

pascal  OSErr UseDictionary (SpeechChannel chan, Handle dictionary);

Application-Defined Routines

#pragma procname SpeechTextDone
typedef pascal void         (*SpeechTextDoneCBPtr) 
                            (SpeechChannel, long, Ptr *, long *, long *);
typedef SpeechTextDoneProcPtr SpeechTextDoneCBPtr;
#pragma procname SpeechDone
typedef pascal void         (*SpeechDoneCBPtr)
                            (SpeechChannel, long);
typedef SpeechDoneProcPtr SpeechDoneCBPtr;
#pragma procname SpeechSync
typedef pascal void         (*SpeechSyncCBPtr)
                            (SpeechChannel, long, OSType);
typedef SpeechSyncProcPtr SpeechSyncCBPtr;
#pragma procname SpeechError
typedef pascal void         (*SpeechErrorCBPtr)
                            (SpeechChannel, long, OSErr, long);
typedef SpeechErrorProcPtr SpeechErrorCBPtr;
#pragma procname SpeechPhoneme
typedef pascal void         (*SpeechPhonemeCBPtr)
                            (SpeechChannel, long, short);
typedef SpeechPhonemeProcPtr SpeechPhonemeCBPtr;
#pragma procname SpeechWord
typedef pascal void         (*SpeechWordCBPtr)
                            (SpeechChannel, long, long, short);
typedef SpeechWordProcPtr SpeechWordCBPtr;

Assembly-Language Information

Data Structures

Voice Specification Data Structure
0creator4 bytesID of required synthesizer
4id4 bytesID of voice on the synthesizer

Voice Description Data Structure
0lengthlongsize of structure--set by application
4voice8 bytesvoice specification record
12versionlongversion number of voice
16name64 bytesname of voice; preceded by length byte
80comment256 bytestext information about voice; preceded by length byte
336gendershortneuter (0), male (1), or female (2)
338ageshortapproximate age in years
340scriptshortscript code of text voice can process
342languageshortlanguage code of text voice can process
344regionshortregion code of voice output
346reserved16 bytesalways set to 0--reserved for future use

Voice File Information Data Structure
0fileSpec70 bytesvolume, directory, and name of file
70resIDwordresource ID of voice in the file

Speech Status Information Data Structure
0outputBusybyte1 if audio is playing
1outputPausedbyte1 if channel is paused
2inputBytesLeftlongbytes of text left to process
6phonemeCodeshortopcode for current phoneme

Speech Error Information Data Structure
0countwordnumber of errors since last check
2oldestlongoldest unread Operating System error
6oldPoslongcharacter position of oldest error
10newestlongnewest Operating System error
14newPoslongcharacter position of newest error

Speech Version Information Data Structure
0synthType4 bytesalways 'TTSC'
4synthSubType4 bytessynthesizer type
8synthManufacturer4 bytessynthesizer creator ID
12synthFlagslongsynthesizer feature flags
16synthVersionlongsynthesizer version number

Phoneme Information Data Structure
0opcodewordopcode for the phoneme
2phStr16 bytescorresponding character string; preceded by length byte
18exampleStr32 bytesword that shows use of phoneme
50hiliteStartwordoffset from beginning of word to beginning of phoneme sound
52hiliteEndwordoffset from beginning of word to end of phoneme sound

Phoneme Descriptor Data Structure
0phonemeCountwordnumber of phonemes defined by current synthesizer
2thePhonemesvariablelist of phoneme information records

Speech Extension Data Structure
0synthCreator4 bytessynthesizer creator ID
4synthDatavariabledata used by synthesizer

Delimiter Information Data Structure
0startDelimiter2 bytesstart embedded command characters; defaults to "[["
2endDelimiter2 bytesend embedded command characters; defaults to "]]"

Trap Macros

Trap Macro Requiring Routine Selectors

_SoundDispatch
SelectorRoutine
$0000000CSpeechManagerVersion
$003C000CSpeechBusy
$0040000CSpeechBusySystemWide
$0108000CCountVoices
$021C000CDisposeSpeechChannel
$0220000CSpeakString
$022C000CStopSpeech
$0238000CContinueSpeech
$030C000CGetIndVoice
$0418000CNewSpeechChannel
$0430000CStopSpeechAt
$0434000CPauseSpeechAt
$0444000CSetSpeechRate
$0448000CGetSpeechRate
$044C000CSetSpeechPitch
$0450000CGetSpeechPitch
$0460000CUseDictionary
$0604000CMakeVoiceSpec
$0610000CGetVoiceDescription
$0614000CGetVoiceInfo
$0624000CSpeakText
$0654000CSetSpeechInfo
$0658000CGetSpeechInfo
$0828000CSpeakBuffer
$0A5C000CTextToPhonemes

Result Codes
noErr0No error
paramErr-50Parameter error
memFullErr-108Not enough memory to speak
nilHandleErr-109Handle argument is NIL
siUnknownInfoType-231Feature not implemented on synthesizer
noSynthFound-240Could not find the specified speech synthesizer
synthOpenFailed-241Could not open another speech synthesizer channel
synthNotReady-242Speech synthesizer is still busy speaking
bufTooSmall-243Output buffer is too small to hold result
voiceNotFound-244Voice resource not found
incompatibleVoice-245Specified voice cannot be used with synthesizer
badDictFormat-246Pronunciation dictionary format error
badPhonemeText-247Raw phoneme text contains invalid characters
unimplMsg-248Unimplemented message
badVoiceID-250Specified voice has not been preloaded
badParmCount-252Incorrect number of embedded command arguments
invalidComponentID-3000Speech channel is uninitialized or bad


Previous Book Contents Book Index Next

© Apple Computer, Inc.
2 JUL 1996