No project description provided
Project description
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)
Project details
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 easy-whisper-local-1.2.5.tar.gz
.
File metadata
- Download URL: easy-whisper-local-1.2.5.tar.gz
- Upload date:
- Size: 2.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | abe9e1806a710c7c02d22d0786247db7b830a8d6a044d7ebf0e3377ba9e6d2b8 |
|
MD5 | 51f894e7bc381c2b39815f6c93d401e5 |
|
BLAKE2b-256 | f1e249f3ec7ac36e1c9623a52f0387b05083ca7643a6fa91f33a2e149804e732 |
File details
Details for the file easy_whisper_local-1.2.5-py3-none-any.whl
.
File metadata
- Download URL: easy_whisper_local-1.2.5-py3-none-any.whl
- Upload date:
- Size: 3.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | de8e9910caedfe4da38ed42eaf3fe98a6baf99010bdf49cc657b719b586499be |
|
MD5 | d1077cc1126c63bd8d7632f4d9216a2d |
|
BLAKE2b-256 | ae88979576a5e91c1179b57f2b028bfc927d97d06e06f08c3722275a3f8b87e4 |