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

[Feature request][Bug] Improvement needed on the listen() method. Issues related to setup_mic() and listen_loop() method. #46

Closed
sankhadeepdutta opened this issue Aug 20, 2023 · 3 comments · Fixed by #47

Comments

@sankhadeepdutta
Copy link
Contributor

Proposal related to the listen() method

The current implementation of the listen() method has a mandatory "timeout" parameter whose default value is 3. It can be adjusted, but making the "timeout" parameter mandatory makes the method less flexible for the user to use. The user every time has to calculate the time it would require him to say the query and pass the value to the "timeout" parameter before using it.

Solution

It would make more sense if the listen() method had the ability to auto-detect the duration for which a user gives voice input. It can have the "timeout" parameter as optional.

Issue related to the setup_mic() method

After using the whisper_mic package for my project, I noticed the program starts to capture the audio input just after creating the WhisperMic object. After exploring the code, I found the init() method calls the setup_mic() method, which immediately starts recording after setting up the mic properties.

Solution

I think the setup_mic() method should only handle the task of setting the mic properties. The listening for audio input should be initiated once the user calls for the listen() or listen_loop() method.

Issue related to the listen_loop() method

While using the listen_loop() method with "dictate = False", which will print the transcriptions in the output console, I noticed the output had many line-breaks even if I didn't pause for a second while giving the voice input.

@bordercore
Copy link

Thanks. This is exactly what I was looking for.

@mallorbc
Copy link
Owner

mallorbc commented Sep 4, 2023

I have reviewed the PR and overall it is great! Thanks!

I didn't see this issue before reviewing the PR. I also noticed the issue you mentioned and think I know what is causing it. I will look to fixing it and then merging the commits. Thanks!

@mallorbc
Copy link
Owner

mallorbc commented Sep 4, 2023

I think we should use your solution, but when listen_loop is called, use some variation of the current solution

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 a pull request may close this issue.

3 participants