instructions
Control the voice of your generated audio with additional instructions. Does not work with tts-1 or tts-1-hd.
let instructions: String?Control the voice of your generated audio with additional instructions. Does not work with tts-1 or tts-1-hd.
let instructions: String?import OpenAIstruct AudioSpeechQueryGenerates audio from the input text. Learn more: OpenAI Speech – Documentation
@frozen struct StringA Unicode string value that is a collection of characters.
init(from decoder: any Decoder) throws init(model: Model, input: String, voice: AudioSpeechVoice, instructions: String = "", responseFormat: AudioSpeechResponseFormat = .mp3, speed: Double = 1.0) static func normalizeSpeechSpeed(_ inputSpeed: Double?) -> Double let input: StringThe text to generate audio for. The maximum length is 4096 characters.
let model: ModelOne of the available TTS models: tts-1 or tts-1-hd
let responseFormat: AudioSpeechResponseFormat?The format to audio in. Supported formats are mp3, opus, aac, flac, and pcm. Defaults to mp3
let speed: Double?The speed of the generated audio. Select a value from 0.25 to 4.0. 1.0 is the default. Defaults to 1
let voice: AudioSpeechVoiceThe voice to use when generating the audio. Supported voices are alloy, echo, fable, onyx, nova, and shimmer. Previews of the voices are available in the Text to speech guide. https://platform.openai.com/docs/guides/text-to-speech/voice-options
enum AudioSpeechResponseFormatEncapsulates the response formats available for audio data.
enum AudioSpeechVoiceEncapsulates the voices available for audio generation.
enum CodingKeysenum Speed