File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " ultravox-client" ,
3
- "version" : " 0.3.0 " ,
3
+ "version" : " 0.3.1 " ,
4
4
"private" : false ,
5
5
"files" : [
6
6
" dist"
Original file line number Diff line number Diff line change @@ -195,6 +195,17 @@ export class UltravoxSession extends EventTarget {
195
195
await this . disconnect ( ) ;
196
196
}
197
197
198
+ /**
199
+ * Sets the agent's output medium. If the agent is currently speaking, this will take effect at
200
+ * the end of the agent's utterance. Also see muteSpeaker and unmuteSpeaker below.
201
+ */
202
+ setOutputMedium ( medium : Medium ) {
203
+ if ( ! UltravoxSession . CONNECTED_STATUSES . has ( this . _status ) ) {
204
+ throw new Error ( `Cannot set output medium while not connected. Current status is ${ this . _status } .` ) ;
205
+ }
206
+ this . sendData ( { type : 'set_output_medium' , medium } ) ;
207
+ }
208
+
198
209
/** Sends a message via text. */
199
210
sendText ( text : string ) {
200
211
if ( ! UltravoxSession . CONNECTED_STATUSES . has ( this . _status ) ) {
You can’t perform that action at this time.
0 commit comments