File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " @livekit/agents-plugin-deepgram " : patch
3+ ---
4+
5+ fix(deepgram): add keyterm for nova-3-general #337
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ export interface STTOptions {
2222 sampleRate : number ;
2323 numChannels : number ;
2424 keywords : [ string , number ] [ ] ;
25+ keyterm : string [ ] ;
2526 profanityFilter : boolean ;
2627 dictation : boolean ;
2728 diarize : boolean ;
@@ -42,6 +43,7 @@ const defaultSTTOptions: STTOptions = {
4243 sampleRate : 16000 ,
4344 numChannels : 1 ,
4445 keywords : [ ] ,
46+ keyterm : [ ] ,
4547 profanityFilter : false ,
4648 dictation : false ,
4749 diarize : false ,
@@ -138,6 +140,7 @@ export class SpeechStream extends stt.SpeechStream {
138140 endpointing : this . #opts. endpointing || false ,
139141 filler_words : this . #opts. fillerWords ,
140142 keywords : this . #opts. keywords . map ( ( x ) => x . join ( ':' ) ) ,
143+ keyterm : this . #opts. keyterm ,
141144 profanity_filter : this . #opts. profanityFilter ,
142145 language : this . #opts. language ,
143146 } ;
@@ -146,7 +149,7 @@ export class SpeechStream extends stt.SpeechStream {
146149 if ( typeof v === 'string' || typeof v === 'number' || typeof v === 'boolean' ) {
147150 streamURL . searchParams . append ( k , encodeURIComponent ( v ) ) ;
148151 } else {
149- v . forEach ( ( x ) => streamURL . searchParams . append ( 'keywords' , encodeURIComponent ( x ) ) ) ;
152+ v . forEach ( ( x ) => streamURL . searchParams . append ( k , encodeURIComponent ( x ) ) ) ;
150153 }
151154 }
152155 } ) ;
You can’t perform that action at this time.
0 commit comments