-
Notifications
You must be signed in to change notification settings - Fork 136
Small fixes in Agent I/O #574
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev-1.0
Are you sure you want to change the base?
Conversation
|
@@ -327,17 +327,18 @@ export class AgentSession< | |||
} | |||
|
|||
// -- User changed input/output streams/sinks -- | |||
private onAudioInputChanged(): void { | |||
private onAudioInputChanged = (): void => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
event listeners should be arrow functions
@@ -358,7 +353,9 @@ export class AgentActivity implements RecognitionHooks { | |||
} | |||
|
|||
detachAudioInput(): void { | |||
this.audioStream.detachSource(); | |||
if (this.audioStream.isSourceSet) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be a check here right?
} | ||
|
||
updateAudioInput(audioStream: ReadableStream<AudioFrame>): void { | ||
this.detachAudioInput(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you tested if it work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a check if (this.audioStream.isSourceSet)
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
left some comments
Updated base don feedback on #573