@@ -52,9 +52,7 @@ def create(
5252 * ,
5353 input : str ,
5454 model : Union [str , SpeechModel ],
55- voice : Union [
56- str , Literal ["alloy" , "ash" , "ballad" , "coral" , "echo" , "sage" , "shimmer" , "verse" , "marin" , "cedar" ]
57- ],
55+ voice : speech_create_params .Voice ,
5856 instructions : str | Omit = omit ,
5957 response_format : Literal ["mp3" , "opus" , "aac" , "flac" , "wav" , "pcm" ] | Omit = omit ,
6058 speed : float | Omit = omit ,
@@ -80,8 +78,9 @@ def create(
8078
8179 voice: The voice to use when generating the audio. Supported built-in voices are
8280 `alloy`, `ash`, `ballad`, `coral`, `echo`, `fable`, `onyx`, `nova`, `sage`,
83- `shimmer`, `verse`, `marin`, and `cedar`. Previews of the voices are available
84- in the
81+ `shimmer`, `verse`, `marin`, and `cedar`. You may also provide a custom voice
82+ object with an `id`, for example `{ "id": "voice_1234" }`. Previews of the
83+ voices are available in the
8584 [Text to speech guide](https://platform.openai.com/docs/guides/text-to-speech#voice-options).
8685
8786 instructions: Control the voice of your generated audio with additional instructions. Does not
@@ -153,9 +152,7 @@ async def create(
153152 * ,
154153 input : str ,
155154 model : Union [str , SpeechModel ],
156- voice : Union [
157- str , Literal ["alloy" , "ash" , "ballad" , "coral" , "echo" , "sage" , "shimmer" , "verse" , "marin" , "cedar" ]
158- ],
155+ voice : speech_create_params .Voice ,
159156 instructions : str | Omit = omit ,
160157 response_format : Literal ["mp3" , "opus" , "aac" , "flac" , "wav" , "pcm" ] | Omit = omit ,
161158 speed : float | Omit = omit ,
@@ -181,8 +178,9 @@ async def create(
181178
182179 voice: The voice to use when generating the audio. Supported built-in voices are
183180 `alloy`, `ash`, `ballad`, `coral`, `echo`, `fable`, `onyx`, `nova`, `sage`,
184- `shimmer`, `verse`, `marin`, and `cedar`. Previews of the voices are available
185- in the
181+ `shimmer`, `verse`, `marin`, and `cedar`. You may also provide a custom voice
182+ object with an `id`, for example `{ "id": "voice_1234" }`. Previews of the
183+ voices are available in the
186184 [Text to speech guide](https://platform.openai.com/docs/guides/text-to-speech#voice-options).
187185
188186 instructions: Control the voice of your generated audio with additional instructions. Does not
0 commit comments