Skip to content

Commit a1aec17

Browse files
authored
Update client.py
convert with timestamp api response fix
1 parent 2174669 commit a1aec17

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/elevenlabs/text_to_speech/client.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -288,11 +288,13 @@ def convert_with_timestamps(
288288
)
289289
try:
290290
if 200 <= _response.status_code < 300:
291+
json_object = _response.json()
292+
json_object["request_id"] = _response.headers.get("request-id")
291293
return typing.cast(
292294
typing.Optional[typing.Any],
293295
construct_type(
294296
type_=typing.Optional[typing.Any], # type: ignore
295-
object_=_response.json(),
297+
object_=json_object,
296298
),
297299
)
298300
if _response.status_code == 422:

0 commit comments

Comments
 (0)