# SynthesisOptions

    struct SynthesisOptions: Sendable, Equatable

Per-utterance synthesis overrides passed to `TextToSpeech.synthesize(_:options:)` and `TextToSpeech.synthesizeStream(_:options:)`. Both fields default to `nil` so non-English voices (e.g. `"ef_dora"`, `"zf_xiaobei"`) automatically infer their native language from the voice metadata.
- `
  ### [init(voiceId:locale:)](https://developers.google.com/edge/api/mediapipe/swift/audio/Structs/SynthesisOptions.md.txt#/s:19MediaPipeTasksAudio16SynthesisOptionsV7voiceId6localeACSSSg_AFtcfc)

  `

  #### Declaration

  Swift

      init(voiceId: String? = nil, locale: String? = nil)

- `
  ### [locale](https://developers.google.com/edge/api/mediapipe/swift/audio/Structs/SynthesisOptions.md.txt#/s:19MediaPipeTasksAudio16SynthesisOptionsV6localeSSSgvp)

  `

  #### Declaration

  Swift

      var locale: String?

- `
  ### [voiceId](https://developers.google.com/edge/api/mediapipe/swift/audio/Structs/SynthesisOptions.md.txt#/s:19MediaPipeTasksAudio16SynthesisOptionsV7voiceIdSSSgvp)

  `

  #### Declaration

  Swift

      var voiceId: String?