Previous Book Contents Book Index Next

Inside Macintosh: Sound /
Chapter 4 - Speech Manager / Speech Manager Reference
Data Structures


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.

Phoneme Information Records

Information about a phoneme is stored in a phoneme information record. Ordinarily, you use a phoneme information record to show the user how to enter text to represent a particular phoneme when the 'PHON' input mode is activated. The PhonemeInfo data type defines a phoneme information record.

TYPE 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;
Field Description
opCode
The opcode for the phoneme. For a list of English-language opcodes, see Table 4-3 on page 4-33.
phStr
The string used to represent the phoneme. The string does not necessarily have a phonetic connection to the phoneme, but might simply be an abstract textual representation of it.
exampleStr
An example word that illustrates use of the phoneme.
hiliteStart
The number of characters in the example word that precede the portion of that word representing the phoneme.
hiliteEnd
The number of characters between the beginning of the example word and the end of the portion of that word representing the phoneme.
You might use the information contained in the hiliteStart and hiliteEnd fields to highlight the characters in the example word that represent the phoneme.

Note that in order to obtain a phoneme information record for an individual phoneme, you must obtain a list of phonemes through a phoneme descriptor record, described next.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
2 JUL 1996