![]() |
GetVoiceInfo |
||||
Header: | SpeechSynthesis.h | Carbon status: | Supported | |
Obtains the same information about a voice that the GetVoiceDescription function provides or to determine in which file and resource a voice is stored.
OSErr GetVoiceInfo ( const VoiceSpec *voice, OSType selector, void *voiceInfo );
A pointer to the voice specification structure identifying the voice about which your application requires information, or NULL to obtain information on the system default voice.
A specification of the type of data being requested. For current versions of the Speech Manager, you should set this field either to soVoiceDescription, if you would like to use the GetVoiceInfo function to mimic the GetVoiceDescription function, or to soVoiceFile, if you would like to obtain information about the location of a voice on disk.
A pointer to the appropriate data structure. If the selector is soVoiceDescription, then voiceInfo should be a pointer to a voice description structure, and the length field of the structure should be set to the length of the voice description structure. If the selector is soVoiceFile, then voiceInfo should be a pointer to a voice file information structure.
A result code.
This function is intended primarily for use by synthesizers, but an application can call it too.
The GetVoiceInfo function accepts a selector in the selector parameter that determines the type of information you wish to obtain about the voice specified in the voice parameter. The function then fills the fields of the data structure appropriate to the selector you specify in the voiceInfo parameter.
If the voice specification is invalid, GetVoiceInfo returns a voiceNotFound error. If there is not enough memory to load the voice into memory to obtain information about it, GetVoiceInfo returns the result code memFullErr.
Because the GetVoiceInfo function might move memory, you should not call it at interrupt time.
Supported in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.
© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)