@@ -54,6 +54,7 @@ def create(
54
54
input : str ,
55
55
model : Union [str , SpeechModel ],
56
56
voice : Literal ["alloy" , "ash" , "coral" , "echo" , "fable" , "onyx" , "nova" , "sage" , "shimmer" ],
57
+ instructions : str | NotGiven = NOT_GIVEN ,
57
58
response_format : Literal ["mp3" , "opus" , "aac" , "flac" , "wav" , "pcm" ] | NotGiven = NOT_GIVEN ,
58
59
speed : float | NotGiven = NOT_GIVEN ,
59
60
# 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(
71
72
72
73
model:
73
74
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`.
75
76
76
77
voice: The voice to use when generating the audio. Supported voices are `alloy`, `ash`,
77
78
`coral`, `echo`, `fable`, `onyx`, `nova`, `sage` and `shimmer`. Previews of the
78
79
voices are available in the
79
80
[Text to speech guide](https://platform.openai.com/docs/guides/text-to-speech#voice-options).
80
81
82
+ instructions: Control the voice of your generated audio with additional instructions. Does not
83
+ work with `tts-1` or `tts-1-hd`.
84
+
81
85
response_format: The format to audio in. Supported formats are `mp3`, `opus`, `aac`, `flac`,
82
86
`wav`, and `pcm`.
83
87
@@ -100,6 +104,7 @@ def create(
100
104
"input" : input ,
101
105
"model" : model ,
102
106
"voice" : voice ,
107
+ "instructions" : instructions ,
103
108
"response_format" : response_format ,
104
109
"speed" : speed ,
105
110
},
@@ -138,6 +143,7 @@ async def create(
138
143
input : str ,
139
144
model : Union [str , SpeechModel ],
140
145
voice : Literal ["alloy" , "ash" , "coral" , "echo" , "fable" , "onyx" , "nova" , "sage" , "shimmer" ],
146
+ instructions : str | NotGiven = NOT_GIVEN ,
141
147
response_format : Literal ["mp3" , "opus" , "aac" , "flac" , "wav" , "pcm" ] | NotGiven = NOT_GIVEN ,
142
148
speed : float | NotGiven = NOT_GIVEN ,
143
149
# 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(
155
161
156
162
model:
157
163
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`.
159
165
160
166
voice: The voice to use when generating the audio. Supported voices are `alloy`, `ash`,
161
167
`coral`, `echo`, `fable`, `onyx`, `nova`, `sage` and `shimmer`. Previews of the
162
168
voices are available in the
163
169
[Text to speech guide](https://platform.openai.com/docs/guides/text-to-speech#voice-options).
164
170
171
+ instructions: Control the voice of your generated audio with additional instructions. Does not
172
+ work with `tts-1` or `tts-1-hd`.
173
+
165
174
response_format: The format to audio in. Supported formats are `mp3`, `opus`, `aac`, `flac`,
166
175
`wav`, and `pcm`.
167
176
@@ -184,6 +193,7 @@ async def create(
184
193
"input" : input ,
185
194
"model" : model ,
186
195
"voice" : voice ,
196
+ "instructions" : instructions ,
187
197
"response_format" : response_format ,
188
198
"speed" : speed ,
189
199
},
0 commit comments