EasyWhisper
EasyWhisper is a simple Python package that allows you to convert speech to text using OpenAI's model Whisper locally.
It is a wrapper around the openai-whisper package.
Installation
Use
pip install easy-whisper-local
This is enough to install the package and its dependencies.
Besides, you can also install torch with CUDA support to speed up the process using your GPU.
The model will be downloaded automatically when you run the package for the first time, and it will be saved in the subdirectory models/.
Usage
from easy_whisper_local.base import EasyWhisper
ew = EasyWhisper()
text = ew.file_to_text('audio.mp3')
times = ew.file_to_timestamps('audio.mp3')
dictionary = ew.file_to_dictionary('audio.mp3')
The default model is 'medium', but if you want to use other model, you can do so by passing it to the EasyWhisper constructor, for example:
ew = EasyWhisper(model="large")
You can also turn off the verbose mode to the constructor by passing False to its parameter:
ew = EasyWhisper(verbose=False)
Streaming (still in development)
You can also use the package to convert speech to text in real time.
from easy_whisper_local.streaming import EasyWhisperStreaming
ews = EasyWhisperStreaming()
for text in ews.stream_to_text(audio_listener):
print(text)
Metadata
Release files for easy-whisper-local 1.2.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| easy-whisper-local-1.2.5.tar.gz | 2.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| easy_whisper_local-1.2.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.5 kB
Release files / easy-whisper-local-1.2.5.tar.gz
| Download URL | easy-whisper-local-1.2.5.tar.gz |
|---|---|
| Size | 2.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
abe9e1806a710c7c02d22d0786247db7b830a8d6a044d7ebf0e3377ba9e6d2b8
|
|
BLAKE2b-256 checksum How to use checksums |
f1e249f3ec7ac36e1c9623a52f0387b05083ca7643a6fa91f33a2e149804e732
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.9.18
|
Release files / easy_whisper_local-1.2.5-py3-none-any.whl
| Download URL | easy_whisper_local-1.2.5-py3-none-any.whl |
|---|---|
| Size | 3.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
de8e9910caedfe4da38ed42eaf3fe98a6baf99010bdf49cc657b719b586499be
|
|
BLAKE2b-256 checksum How to use checksums |
ae88979576a5e91c1179b57f2b028bfc927d97d06e06f08c3722275a3f8b87e4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.9.18
|