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

Whisper microphone example: do not repeatedly acquire and release the microphone #1864

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

Conversation

lavafroth
Copy link

Changes

  • The input stream from the microphone is built once in the thread that handles it.
  • Inside the loop block, the stream is played and paused for the defined duration (300ms) to capture the pcm data.
  • The iter::repeat(()).enumerate() to keep track of the inference iteration is replaced with a simple 0.. range.

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.

None yet

1 participant