@@ -53,7 +53,8 @@ def create(
5353 input : str ,
5454 model : Union [str , Literal ["playai-tts" , "playai-tts-arabic" ]],
5555 voice : str ,
56- response_format : Literal ["wav" , "mp3" ] | NotGiven = NOT_GIVEN ,
56+ response_format : Literal ["flac" , "mp3" , "mulaw" , "ogg" , "wav" ] | NotGiven = NOT_GIVEN ,
57+ sample_rate : Literal [8000 , 16000 , 22050 , 24000 , 32000 , 44100 , 48000 ] | NotGiven = NOT_GIVEN ,
5758 speed : float | NotGiven = NOT_GIVEN ,
5859 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
5960 # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -73,9 +74,12 @@ def create(
7374 voice: The voice to use when generating the audio. List of voices can be found
7475 [here](/docs/text-to-speech).
7576
76- response_format: The format to audio in. Supported formats are `wav, mp3`.
77+ response_format: The format of the generated audio. Supported formats are
78+ `flac, mp3, mulaw, ogg, wav`.
7779
78- speed: The speed of the generated audio. 1.0 is the only supported value.
80+ sample_rate: The sample rate for generated audio
81+
82+ speed: The speed of the generated audio.
7983
8084 extra_headers: Send extra headers
8185
@@ -94,6 +98,7 @@ def create(
9498 "model" : model ,
9599 "voice" : voice ,
96100 "response_format" : response_format ,
101+ "sample_rate" : sample_rate ,
97102 "speed" : speed ,
98103 },
99104 speech_create_params .SpeechCreateParams ,
@@ -131,7 +136,8 @@ async def create(
131136 input : str ,
132137 model : Union [str , Literal ["playai-tts" , "playai-tts-arabic" ]],
133138 voice : str ,
134- response_format : Literal ["wav" , "mp3" ] | NotGiven = NOT_GIVEN ,
139+ response_format : Literal ["flac" , "mp3" , "mulaw" , "ogg" , "wav" ] | NotGiven = NOT_GIVEN ,
140+ sample_rate : Literal [8000 , 16000 , 22050 , 24000 , 32000 , 44100 , 48000 ] | NotGiven = NOT_GIVEN ,
135141 speed : float | NotGiven = NOT_GIVEN ,
136142 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
137143 # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -151,9 +157,12 @@ async def create(
151157 voice: The voice to use when generating the audio. List of voices can be found
152158 [here](/docs/text-to-speech).
153159
154- response_format: The format to audio in. Supported formats are `wav, mp3`.
160+ response_format: The format of the generated audio. Supported formats are
161+ `flac, mp3, mulaw, ogg, wav`.
162+
163+ sample_rate: The sample rate for generated audio
155164
156- speed: The speed of the generated audio. 1.0 is the only supported value.
165+ speed: The speed of the generated audio.
157166
158167 extra_headers: Send extra headers
159168
@@ -172,6 +181,7 @@ async def create(
172181 "model" : model ,
173182 "voice" : voice ,
174183 "response_format" : response_format ,
184+ "sample_rate" : sample_rate ,
175185 "speed" : speed ,
176186 },
177187 speech_create_params .SpeechCreateParams ,
0 commit comments