Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit f4eeb8d

Browse files
committedMar 19, 2025·
feat(api): api update (#220)
1 parent f150801 commit f4eeb8d

File tree

4 files changed

+14
-24
lines changed

4 files changed

+14
-24
lines changed
 

‎.stats.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
configured_endpoints: 16
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/groqcloud%2Fgroqcloud-055e57d5b3cad069182bb870f76dd7936e69fc88c9a1e51ad198400e38c1d076.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/groqcloud%2Fgroqcloud-57e8ccf3bae48a219b987a94bd6eaec7318eb2cf4459e9f528b701722272b969.yml

‎src/groq/resources/audio/speech.py

+6-10
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def create(
5555
input: str,
5656
model: str,
5757
voice: str,
58-
response_format: Literal["mp3", "opus", "aac", "flac", "wav", "pcm"] | NotGiven = NOT_GIVEN,
58+
response_format: Literal["wav"] | NotGiven = NOT_GIVEN,
5959
speed: float | NotGiven = NOT_GIVEN,
6060
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
6161
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -74,11 +74,9 @@ def create(
7474
7575
voice: The voice to use when generating the audio.
7676
77-
response_format: The format to audio in. Supported formats are `mp3`, `opus`, `aac`, `flac`,
78-
`wav`, and `pcm`.
77+
response_format: The format to audio in. Supported formats are `wav`.
7978
80-
speed: The speed of the generated audio. Select a value from `0.25` to `4.0`. `1.0` is
81-
the default.
79+
speed: The speed of the generated audio. 1.0 is the only supported value.
8280
8381
extra_headers: Send extra headers
8482
@@ -134,7 +132,7 @@ async def create(
134132
input: str,
135133
model: str,
136134
voice: str,
137-
response_format: Literal["mp3", "opus", "aac", "flac", "wav", "pcm"] | NotGiven = NOT_GIVEN,
135+
response_format: Literal["wav"] | NotGiven = NOT_GIVEN,
138136
speed: float | NotGiven = NOT_GIVEN,
139137
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
140138
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -153,11 +151,9 @@ async def create(
153151
154152
voice: The voice to use when generating the audio.
155153
156-
response_format: The format to audio in. Supported formats are `mp3`, `opus`, `aac`, `flac`,
157-
`wav`, and `pcm`.
154+
response_format: The format to audio in. Supported formats are `wav`.
158155
159-
speed: The speed of the generated audio. Select a value from `0.25` to `4.0`. `1.0` is
160-
the default.
156+
speed: The speed of the generated audio. 1.0 is the only supported value.
161157
162158
extra_headers: Send extra headers
163159

‎src/groq/types/audio/speech_create_params.py

+3-9
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,8 @@ class SpeechCreateParams(TypedDict, total=False):
1717
voice: Required[str]
1818
"""The voice to use when generating the audio."""
1919

20-
response_format: Literal["mp3", "opus", "aac", "flac", "wav", "pcm"]
21-
"""The format to audio in.
22-
23-
Supported formats are `mp3`, `opus`, `aac`, `flac`, `wav`, and `pcm`.
24-
"""
20+
response_format: Literal["wav"]
21+
"""The format to audio in. Supported formats are `wav`."""
2522

2623
speed: float
27-
"""The speed of the generated audio.
28-
29-
Select a value from `0.25` to `4.0`. `1.0` is the default.
30-
"""
24+
"""The speed of the generated audio. 1.0 is the only supported value."""

‎tests/api_resources/audio/test_speech.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ def test_method_create_with_all_params(self, client: Groq, respx_mock: MockRoute
4545
input="input",
4646
model="model",
4747
voice="voice",
48-
response_format="mp3",
49-
speed=0.25,
48+
response_format="wav",
49+
speed=1,
5050
)
5151
assert speech.is_closed
5252
assert speech.json() == {"foo": "bar"}
@@ -113,8 +113,8 @@ async def test_method_create_with_all_params(self, async_client: AsyncGroq, resp
113113
input="input",
114114
model="model",
115115
voice="voice",
116-
response_format="mp3",
117-
speed=0.25,
116+
response_format="wav",
117+
speed=1,
118118
)
119119
assert speech.is_closed
120120
assert await speech.json() == {"foo": "bar"}

0 commit comments

Comments
 (0)
Please sign in to comment.