Skip to content

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

nbsp
Copy link
Member

@nbsp nbsp commented Apr 24, 2025

No description provided.

Copy link

changeset-bot bot commented Apr 24, 2025

🦋 Changeset detected

Latest commit: 5a48ee5

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@livekit/agents-plugin-deepgram Patch

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) {
Copy link
Contributor

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?

Copy link
Member Author

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

Copy link
Contributor

@Shubhrakanti Shubhrakanti left a 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])]);
Copy link
Contributor

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()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants