Skip to content
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

fix: keyError: 'model' in server, when using browser extension #119

Merged
merged 1 commit into from
Jan 31, 2024

Conversation

gchust
Copy link
Contributor

@gchust gchust commented Jan 31, 2024

In latest version, brower extension is not working anymore.
Here is the server side errors:

Traceback (most recent call last):
  File "/home/gchust/miniconda3/envs/whisperlive/lib/python3.11/site-packages/websockets/sync/server.py", line 499, in conn_handler
    handler(connection)
  File "/mnt/c/work/WhisperLive/whisper_live/server.py", line 168, in recv_audio
    model=options["model"],
          ~~~~~~~^^^^^^^^^
KeyError: 'model'

This is the payload send from the web browser extension

{'uid': '620a44b8-38d3-4967-8f36-df7272aa8eb4', 'multilingual': False, 'language': 'zh', 'task': 'transcribe', 'model_size': 'small'}

Looks like server expecting model from client.

After the fix, I am able to use the extension now:

image

@makaveli10
Copy link
Collaborator

Thanks for putting this together.

@makaveli10 makaveli10 merged commit 2c8a25d into collabora:main Jan 31, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants