Function

MakeVoiceSpec

Sets the fields of a voice specification structure.

Declaration

OSErr MakeVoiceSpec(OSType creator, OSType id, VoiceSpec *voice);

Parameters

creator

The ID of the synthesizer that your application requires.

id

The ID of the voice on the synthesizer specified by the creator parameter.

voice

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

Return Value

A result code. See Result Codes.

Discussion

A voice specification structure is a unique voice ID used by the Speech Synthesis Manager. Most voice management functions expect to be passed a pointer to a voice specification structure. When you already know the creator and ID for a voice, you should use the MakeVoiceSpec function to create such a structure rather than filling in the fields of one directly. On exit, the voice specification structure pointed to by the voice parameter contains the appropriate values. You should never set the fields of such a structure directly.

See Also

Getting Information About Voices

CountVoices

Determines how many voices are available.

GetIndVoice

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

GetVoiceDescription

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

GetVoiceInfo

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