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


OSErr GetIndVoice(SInt16 index, VoiceSpec *voice);



The index of the voice for which to obtain a voice specification structure. This number must range from 1 to the total number of voices, as returned by the CountVoices function.


A pointer to the voice specification structure whose fields are to be filled in.

Return Value

A result code. See Result Codes.


The GetIndVoice function returns, in the voice specification structure pointed to by the voice parameter, a specification of the voice whose index is provided in the index parameter. Your application should make no assumptions about the order in which voices are indexed.

Your application should not add, remove, or modify a voice and then call the GetIndVoice function with an index value other than 1. To allow the Speech Synthesis Manager to update its information about voices, your application should always either call the CountVoices function or call the GetIndVoice function with an index value of 1 after adding, removing, or modifying a voice or after a time at which the user might have done so.

If you specify an index value beyond the number of available voices, the GetIndVoice function returns a voiceNotFound error.

See Also

Getting Information About Voices


Determines how many voices are available.


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


Gets the same information about a voice that the GetVoiceDescription function provides, or to determine in which file and resource a voice is stored.


Sets the fields of a voice specification structure.