---
title: "MakeVoiceSpec(_:_:_:)"
framework: applicationservices
role: symbol
role_heading: Function
path: applicationservices/1461446-makevoicespec
---

# MakeVoiceSpec(_:_:_:)

Sets the fields of a voice specification structure.

## Declaration

```swift
func MakeVoiceSpec(_ creator: OSType, _ id: OSType, _ voice: UnsafeMutablePointer<VoiceSpec>) -> OSErr
```

## 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

Return Value A resultcode. See Result Codes.

## Discussion

Discussion A voice specification structure is a unique voice ID usedby the Speech Synthesis Manager. Most voice management functionsexpect to be passed a pointer to a voice specification structure.When you already know the creator and ID for a voice, you shoulduse the MakeVoiceSpec functionto create such a structure rather than filling in the fields ofone directly. On exit, the voice specification structure pointedto by the voice parameter containsthe appropriate values. You should never set the fields of sucha structure directly.

## See Also

### Getting Information About Voices

- [CountVoices(_:)](applicationservices/1459947-countvoices.md)
- [GetIndVoice(_:_:)](applicationservices/1464595-getindvoice.md)
- [GetVoiceDescription(_:_:_:)](applicationservices/1463940-getvoicedescription.md)
- [GetVoiceInfo(_:_:_:)](applicationservices/1461410-getvoiceinfo.md)
