@@ -54,6 +54,7 @@ def create(
5454 input : str ,
5555 model : Union [str , SpeechModel ],
5656 voice : Literal ["alloy" , "ash" , "coral" , "echo" , "fable" , "onyx" , "nova" , "sage" , "shimmer" ],
57+ instructions : str | NotGiven = NOT_GIVEN ,
5758 response_format : Literal ["mp3" , "opus" , "aac" , "flac" , "wav" , "pcm" ] | NotGiven = NOT_GIVEN ,
5859 speed : float | NotGiven = NOT_GIVEN ,
5960 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -71,13 +72,16 @@ def create(
7172
7273 model:
7374 One of the available [TTS models](https://platform.openai.com/docs/models#tts):
74- `tts-1` or `tts-1-hd`
75+ `tts-1`, `tts-1-hd` or `gpt-4o-mini-tts`.
7576
7677 voice: The voice to use when generating the audio. Supported voices are `alloy`, `ash`,
7778 `coral`, `echo`, `fable`, `onyx`, `nova`, `sage` and `shimmer`. Previews of the
7879 voices are available in the
7980 [Text to speech guide](https://platform.openai.com/docs/guides/text-to-speech#voice-options).
8081
82+ instructions: Control the voice of your generated audio with additional instructions. Does not
83+ work with `tts-1` or `tts-1-hd`.
84+
8185 response_format: The format to audio in. Supported formats are `mp3`, `opus`, `aac`, `flac`,
8286 `wav`, and `pcm`.
8387
@@ -100,6 +104,7 @@ def create(
100104 "input" : input ,
101105 "model" : model ,
102106 "voice" : voice ,
107+ "instructions" : instructions ,
103108 "response_format" : response_format ,
104109 "speed" : speed ,
105110 },
@@ -138,6 +143,7 @@ async def create(
138143 input : str ,
139144 model : Union [str , SpeechModel ],
140145 voice : Literal ["alloy" , "ash" , "coral" , "echo" , "fable" , "onyx" , "nova" , "sage" , "shimmer" ],
146+ instructions : str | NotGiven = NOT_GIVEN ,
141147 response_format : Literal ["mp3" , "opus" , "aac" , "flac" , "wav" , "pcm" ] | NotGiven = NOT_GIVEN ,
142148 speed : float | NotGiven = NOT_GIVEN ,
143149 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -155,13 +161,16 @@ async def create(
155161
156162 model:
157163 One of the available [TTS models](https://platform.openai.com/docs/models#tts):
158- `tts-1` or `tts-1-hd`
164+ `tts-1`, `tts-1-hd` or `gpt-4o-mini-tts`.
159165
160166 voice: The voice to use when generating the audio. Supported voices are `alloy`, `ash`,
161167 `coral`, `echo`, `fable`, `onyx`, `nova`, `sage` and `shimmer`. Previews of the
162168 voices are available in the
163169 [Text to speech guide](https://platform.openai.com/docs/guides/text-to-speech#voice-options).
164170
171+ instructions: Control the voice of your generated audio with additional instructions. Does not
172+ work with `tts-1` or `tts-1-hd`.
173+
165174 response_format: The format to audio in. Supported formats are `mp3`, `opus`, `aac`, `flac`,
166175 `wav`, and `pcm`.
167176
@@ -184,6 +193,7 @@ async def create(
184193 "input" : input ,
185194 "model" : model ,
186195 "voice" : voice ,
196+ "instructions" : instructions ,
187197 "response_format" : response_format ,
188198 "speed" : speed ,
189199 },
0 commit comments