@@ -41,6 +41,7 @@ def create(
41
41
extra_query : Query | None = None ,
42
42
extra_body : Body | None = None ,
43
43
timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
44
+ stream : bool | None = None ,
44
45
) -> HttpxBinaryResponseContent :
45
46
"""
46
47
Generates audio from the input text.
@@ -67,6 +68,9 @@ def create(
67
68
extra_body: Add additional JSON properties to the request
68
69
69
70
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
70
74
"""
71
75
return self ._post (
72
76
"/audio/speech" ,
@@ -81,7 +85,11 @@ def create(
81
85
speech_create_params .SpeechCreateParams ,
82
86
),
83
87
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 ,
85
93
),
86
94
cast_to = HttpxBinaryResponseContent ,
87
95
)
@@ -108,6 +116,7 @@ async def create(
108
116
extra_query : Query | None = None ,
109
117
extra_body : Body | None = None ,
110
118
timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
119
+ stream : bool | None = None ,
111
120
) -> HttpxBinaryResponseContent :
112
121
"""
113
122
Generates audio from the input text.
@@ -134,6 +143,9 @@ async def create(
134
143
extra_body: Add additional JSON properties to the request
135
144
136
145
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
137
149
"""
138
150
return await self ._post (
139
151
"/audio/speech" ,
@@ -148,7 +160,11 @@ async def create(
148
160
speech_create_params .SpeechCreateParams ,
149
161
),
150
162
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 ,
152
168
),
153
169
cast_to = HttpxBinaryResponseContent ,
154
170
)
0 commit comments