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
Hashes for easy_whisper_local-1.2.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | de8e9910caedfe4da38ed42eaf3fe98a6baf99010bdf49cc657b719b586499be |
|
MD5 | d1077cc1126c63bd8d7632f4d9216a2d |
|
BLAKE2b-256 | ae88979576a5e91c1179b57f2b028bfc927d97d06e06f08c3722275a3f8b87e4 |