Whisper for your microphone
Project description
Whisper Mic
This repo is based on the work done here by OpenAI. This repo allows you use use a mic as demo. This repo copies some of the README from original project.
Video Tutorial
See the video tutorial for this repo here
The video is a bit out of date now. The code is much better now and pip installable
Professional Assistance
If are in need of paid professional help, that is available through this email
Setup
Now a pip package!
- Create a venv of your choice.
- Run
pip install whisper-mic
Available models and languages
There are five model sizes, four with English-only versions, offering speed and accuracy tradeoffs. Below are the names of the available models and their approximate memory requirements and relative speed.
Size | Parameters | English-only model | Multilingual model | Required VRAM | Relative speed |
---|---|---|---|---|---|
tiny | 39 M | tiny.en |
tiny |
~1 GB | ~32x |
base | 74 M | base.en |
base |
~1 GB | ~16x |
small | 244 M | small.en |
small |
~2 GB | ~6x |
medium | 769 M | medium.en |
medium |
~5 GB | ~2x |
large | 1550 M | N/A | large |
~10 GB | 1x |
For English-only applications, the .en
models tend to perform better, especially for the tiny.en
and base.en
models. We observed that the difference becomes less significant for the small.en
and medium.en
models.
Microphone Demo
You can use the model with a microphone using the whisper_mic
program. Use -h
to see flag options.
Some of the more important flags are the --model
and --english
flags.
Troubleshooting
If you are having issues with the mic.py
not running try the following:
sudo apt install portaudio19-dev python3-pyaudio
Contributing
Currently, this is just a cli demo. I forsee that this pip package could become more than that for example:
from whisper_mic.mic import WhisperMic
mic = WhisperMic(timeout=5)
command = mic.listen()
License
The model weights of Whisper are released under the MIT License. See their repo for more information.
This code under this repo is under the MIT license. See LICENSE for further details.
Thanks
Until recently, access to high performing speech to text models was only available through paid serviecs. With this release, I am excited for the many applications that will come.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file whisper_mic-1.0.0.tar.gz
.
File metadata
- Download URL: whisper_mic-1.0.0.tar.gz
- Upload date:
- Size: 5.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8c7542a5c5b2ba8a28d0feb53f8d772969ae6e575c507c2615db89dcce69a64c |
|
MD5 | a35a710ddaa3abd770c8342b2e120d99 |
|
BLAKE2b-256 | 69bff37c92a354d7788ab59d5e99da36cef98c1c5527b7c449d15ec989922b74 |
File details
Details for the file whisper_mic-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: whisper_mic-1.0.0-py3-none-any.whl
- Upload date:
- Size: 5.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a397131fd2d5628ddaf3c2ec0dfce6375d9e2d96db07686df6485bebb9ec1837 |
|
MD5 | 0a8b41b3dfd60f12fa64951b32abd298 |
|
BLAKE2b-256 | ccd6685b6c38a7833a69009bf13be7cf8f26a15fe27031ec558c57fcd29c40a2 |