---
title: "init(language:)"
framework: avfaudio
role: symbol
role_heading: Initializer
path: "avfaudio/avspeechsynthesisvoice/init(language:)"
---

# init(language:)

Retrieves a voice for the BCP 47 code language code you specify.

## Declaration

```swift
init?(language languageCode: String?)
```

## Return Value

Return Value A voice for the specified language and locale code if the code is valid; otherwise, nil.

## Discussion

Discussion languageCode: A BCP 47 code that identifies the language and locale for a voice. Discussion Pass nil for languageCode to receive the default voice for the system’s language and region.

## See Also

### Obtaining voices

- [init(identifier:)](avfaudio/avspeechsynthesisvoice/init(identifier:).md)
- [speechVoices()](avfaudio/avspeechsynthesisvoice/speechvoices().md)
- [AVSpeechSynthesisVoiceIdentifierAlex](avfaudio/avspeechsynthesisvoiceidentifieralex.md)
