@@ -41,6 +41,7 @@ def create(
4141 extra_query : Query | None = None ,
4242 extra_body : Body | None = None ,
4343 timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
44+ stream : bool | None = None ,
4445 ) -> HttpxBinaryResponseContent :
4546 """
4647 Generates audio from the input text.
@@ -67,6 +68,9 @@ def create(
6768 extra_body: Add additional JSON properties to the request
6869
6970 timeout: Override the client-level default timeout for this request, in seconds
71+
72+ stream: Whether or not the response content should be streamed (i.e. not read to
73+ completion immediately), default False
7074 """
7175 return self ._post (
7276 "/audio/speech" ,
@@ -81,7 +85,11 @@ def create(
8185 speech_create_params .SpeechCreateParams ,
8286 ),
8387 options = make_request_options (
84- extra_headers = extra_headers , extra_query = extra_query , extra_body = extra_body , timeout = timeout
88+ extra_headers = extra_headers ,
89+ extra_query = extra_query ,
90+ extra_body = extra_body ,
91+ timeout = timeout ,
92+ stream = stream ,
8593 ),
8694 cast_to = HttpxBinaryResponseContent ,
8795 )
@@ -108,6 +116,7 @@ async def create(
108116 extra_query : Query | None = None ,
109117 extra_body : Body | None = None ,
110118 timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
119+ stream : bool | None = None ,
111120 ) -> HttpxBinaryResponseContent :
112121 """
113122 Generates audio from the input text.
@@ -134,6 +143,9 @@ async def create(
134143 extra_body: Add additional JSON properties to the request
135144
136145 timeout: Override the client-level default timeout for this request, in seconds
146+
147+ stream: Whether or not the response content should be streamed (i.e. not read to
148+ completion immediately), default False
137149 """
138150 return await self ._post (
139151 "/audio/speech" ,
@@ -148,7 +160,11 @@ async def create(
148160 speech_create_params .SpeechCreateParams ,
149161 ),
150162 options = make_request_options (
151- extra_headers = extra_headers , extra_query = extra_query , extra_body = extra_body , timeout = timeout
163+ extra_headers = extra_headers ,
164+ extra_query = extra_query ,
165+ extra_body = extra_body ,
166+ timeout = timeout ,
167+ stream = stream ,
152168 ),
153169 cast_to = HttpxBinaryResponseContent ,
154170 )
0 commit comments