Gets 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 Synthesis 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.

Return Value

A result code. See Result Codes.


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.

See Also

Getting Information About Voices


Determines how many voices are available.


Gets a voice specification structure for a voice by passing an index to the GetIndVoice function.


Gets a description of a voice by using the GetVoiceDescription function.


Sets the fields of a voice specification structure.