File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -502,13 +502,19 @@ export class AgentActivity implements RecognitionHooks {
502502 this . audioStreamId = this . audioStream . addInputStream ( audioStream ) ;
503503
504504 if ( this . realtimeSession && this . audioRecognition ) {
505- const [ realtimeAudioStream , recognitionAudioStream ] = this . audioStream . stream . tee ( ) ;
505+ const [ realtimeAudioStream , recognitionAudioStream ] = this . audioStream . stream
506+ . pipeThrough ( aecWarmupAudioFilter )
507+ . tee ( ) ;
506508 this . realtimeSession . setInputAudioStream ( realtimeAudioStream ) ;
507509 this . audioRecognition . setInputAudioStream ( recognitionAudioStream ) ;
508510 } else if ( this . realtimeSession ) {
509- this . realtimeSession . setInputAudioStream ( this . audioStream . stream ) ;
511+ this . realtimeSession . setInputAudioStream (
512+ this . audioStream . stream . pipeThrough ( aecWarmupAudioFilter ) ,
513+ ) ;
510514 } else if ( this . audioRecognition ) {
511- this . audioRecognition . setInputAudioStream ( this . audioStream . stream ) ;
515+ this . audioRecognition . setInputAudioStream (
516+ this . audioStream . stream . pipeThrough ( aecWarmupAudioFilter ) ,
517+ ) ;
512518 }
513519 }
514520
You can’t perform that action at this time.
0 commit comments