@@ -53,7 +53,8 @@ def create(
53
53
input : str ,
54
54
model : Union [str , Literal ["playai-tts" , "playai-tts-arabic" ]],
55
55
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 ,
57
58
speed : float | NotGiven = NOT_GIVEN ,
58
59
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
59
60
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -73,9 +74,12 @@ def create(
73
74
voice: The voice to use when generating the audio. List of voices can be found
74
75
[here](/docs/text-to-speech).
75
76
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`.
77
79
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.
79
83
80
84
extra_headers: Send extra headers
81
85
@@ -94,6 +98,7 @@ def create(
94
98
"model" : model ,
95
99
"voice" : voice ,
96
100
"response_format" : response_format ,
101
+ "sample_rate" : sample_rate ,
97
102
"speed" : speed ,
98
103
},
99
104
speech_create_params .SpeechCreateParams ,
@@ -131,7 +136,8 @@ async def create(
131
136
input : str ,
132
137
model : Union [str , Literal ["playai-tts" , "playai-tts-arabic" ]],
133
138
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 ,
135
141
speed : float | NotGiven = NOT_GIVEN ,
136
142
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
137
143
# 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(
151
157
voice: The voice to use when generating the audio. List of voices can be found
152
158
[here](/docs/text-to-speech).
153
159
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
155
164
156
- speed: The speed of the generated audio. 1.0 is the only supported value.
165
+ speed: The speed of the generated audio.
157
166
158
167
extra_headers: Send extra headers
159
168
@@ -172,6 +181,7 @@ async def create(
172
181
"model" : model ,
173
182
"voice" : voice ,
174
183
"response_format" : response_format ,
184
+ "sample_rate" : sample_rate ,
175
185
"speed" : speed ,
176
186
},
177
187
speech_create_params .SpeechCreateParams ,
0 commit comments