-
Notifications
You must be signed in to change notification settings - Fork 101
feat(deepgram): add updateOptions #374
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: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 5a48ee5 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
@@ -238,7 +256,7 @@ export class SpeechStream extends stt.SpeechStream { | |||
); | |||
|
|||
const listenTask = async () => { | |||
while (!this.closed) { | |||
while (!this.closed && !closing) { |
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.
JC: was this causing an issue? If so - how did you notice it?
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.
this wasn't causing an issue, i just added this so that when the old websocket closes the loop breaks as opposed to listening indefinitely to new outputs from a closed websocket
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.
Nice!
@@ -312,7 +330,9 @@ export class SpeechStream extends stt.SpeechStream { | |||
} | |||
}; | |||
|
|||
await Promise.all([sendTask(), listenTask(), wsMonitor]); | |||
await Promise.race([this.#resetWS.await, Promise.all([sendTask(), listenTask(), wsMonitor])]); |
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.
Do we propagate exceptions from the underlying tasks? In python we have something like
for task in done:
if task != wait_reconnect_task:
task.result()
No description provided.