-
Notifications
You must be signed in to change notification settings - Fork 435
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
fixing [#868] bug where deepgram client fails due to langauge #869
fixing [#868] bug where deepgram client fails due to langauge #869
Conversation
Thanks for the proposed fix! For whatever reason I can't repro this, but this does seem like the right thing to do. One suggestion, since it's also possible to pass a string via live_options, let's add a check like this:
This will allow either a string of an enum to be passed. With that, I think this change is ready. |
@markbackman this is up for review, lmk if there is any change required. |
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.
Thank you! This is great.
@markbackman pushed once more change as per ruff, for some odd reason pycharm ruff didn't catch it 🤦 |
The linter wants it as:
That is, one less tab before |
Had the same issue. This did the trick to make the deepgram client connect successfully, but it messed up the TTS audio (using elevenlabs) in the downstream frames. |
@jonnyjohnson1 do you mind filing a separate issue for what you're seeing with ElevenLabs? Might it be that the TTS audio issue is unrelated and now that the STT error is resolved, the TTS error is revealed? |
Possibly. I'll create an issue for it |
Description:
This PR fixes a bug in the
DeepgramSTTService
where thelanguage
parameter, defined as an enum, was causing a WebSocket connection failure during the pipeline initialization. The issue occurred because Deepgram's API expects thelanguage
parameter as a string, but an enum was being passed directly.Changes Made:
language
parameter is converted from an enum to its string value (Language.EN.value
) before being passed to the API.