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

Issues with Python Setup #61

Open
ACDrafahl opened this issue Jan 5, 2024 · 1 comment
Open

Issues with Python Setup #61

ACDrafahl opened this issue Jan 5, 2024 · 1 comment

Comments

@ACDrafahl
Copy link

ACDrafahl commented Jan 5, 2024

First off, I want to say thank you for making this. It's been a lifesaver so far.

Second, I'm very new to this kind of project and python in general, so I apologize if this question is obvious or nonsensical. The CLI commands are great, but I'm trying to do the same setup in python (specifying the device, the model, the mic, etc.). I know that the init function sets everything to a default value, but I was wondering if there was a way to set these qualities manually in a separate python file so that any user can download my code and have it work with your whisper_mic.py file out of the box. I also wondered about how to find the mic index that I need and how to set the FP16/FP32/INT8 options. I keep getting a warning that FP16 isn't supported on my cpu, which causes it to default to FP32. I'd like to set it to FP32 from the start. If I have to modify the whisper_mic.py file itself, I understand, but I just wanted to make sure there wasn't any other way.

@mallorbc
Copy link
Owner

You could make it so that the code takes a config file instead of arguments.

If you make this PR it would work and I will merge:

  1. Make a pydantic object that configures how the software works
  2. Have a way to change those values with the cli flags
  3. Have a way to pass a json file to configure the software

Normally the default mic index works. Otherwise you can print out the mic devices and select the index that makes the most sense.

Other backends could be added to support int8 such as transformers or ctranslate2. For this current work fp32 is the default for cpu and fp16 for GPU

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

No branches or pull requests

2 participants