@@ -120,7 +120,7 @@ def _get_websocket_header(self):
120120 )
121121 headers = {
122122 "user-agent" : ua ,
123- "Authorization" : "bearer " + self .apikey ,
123+ "Authorization" : "Bearer " + self .apikey ,
124124 }
125125 if self .user_headers :
126126 headers = {** self .user_headers , ** headers }
@@ -177,6 +177,8 @@ def update_session(
177177 bit_rate : int = None ,
178178 language_type : str = None ,
179179 enable_tn : bool = None ,
180+ instructions : str = None ,
181+ optimize_instructions : bool = None ,
180182 ** kwargs ,
181183 ) -> None :
182184 """
@@ -206,6 +208,10 @@ def update_session(
206208 bit_rate for tts, support 6~510,default is 128kbps. only work on format: opus/mp3 # noqa: E501 # pylint: disable=line-too-long
207209 enable_tn: bool
208210 enable text normalization for tts, default is None
211+ instructions: str
212+ instructions for tts, default is None
213+ optimize_instructions: bool
214+ optimize_instructions for tts, default is None
209215 """
210216 self .config = {
211217 "voice" : voice ,
@@ -230,6 +236,10 @@ def update_session(
230236
231237 if language_type is not None :
232238 self .config ["language_type" ] = language_type
239+ if instructions is not None :
240+ self .config ["instructions" ] = instructions
241+ if optimize_instructions is not None :
242+ self .config ["optimize_instructions" ] = optimize_instructions
233243 self .config .update (kwargs )
234244 self .__send_str (
235245 json .dumps (
0 commit comments