File tree 2 files changed +13
-2
lines changed
2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " @livekit/agents-plugin-cartesia " : patch
3
+ ---
4
+
5
+ add updateOptions
Original file line number Diff line number Diff line change @@ -61,13 +61,15 @@ export class TTS extends tts.TTS {
61
61
}
62
62
}
63
63
64
- // TODO(nbsp): updateOptions
64
+ updateOptions ( opts : Partial < TTSOptions > ) {
65
+ this . #opts = { ...this . #opts, ...opts } ;
66
+ }
65
67
66
68
synthesize ( text : string ) : tts . ChunkedStream {
67
69
return new ChunkedStream ( this , text , this . #opts) ;
68
70
}
69
71
70
- stream ( ) : tts . SynthesizeStream {
72
+ stream ( ) : SynthesizeStream {
71
73
return new SynthesizeStream ( this , this . #opts) ;
72
74
}
73
75
}
@@ -144,6 +146,10 @@ export class SynthesizeStream extends tts.SynthesizeStream {
144
146
this . #run( ) ;
145
147
}
146
148
149
+ updateOptions ( opts : Partial < TTSOptions > ) {
150
+ this . #opts = { ...this . #opts, ...opts } ;
151
+ }
152
+
147
153
async #run( ) {
148
154
const requestId = randomUUID ( ) ;
149
155
let closing = false ;
You can’t perform that action at this time.
0 commit comments