use the fastest whisper implementation on every hardware
- this package is highly work-in-progress and not ready for usage yet
Currently, this package can dispatch to (in order of preference):
- insanely-fast-whisper (On NVIDIA systems)
- mlx-whisper (On Apple Silicon)
- faster-whisper (Everything else)
If you want to use insanely-fast-whisper (on an nvidia system), you have to install pytorch as
recommended in the pytorch docs before. Also it is
recommended to install the CUDA-SDK and set the $CUDA_HOME
environment variable to install
flash-attn.
from decent_whiser import available_models, transcribe
from decent_whisper.model import choose_model, download_model, is_model_downloaded
model_info = choose_model(
available_models(),
model_size="small",
)
if not model_info:
raise ValueError("No matching model found")
if not is_model_downloaded(model_info):
download_model(model_info)
iter, info = transcribe(
"audio.mp3",
model=model_info,
)
for segment in iter:
print("".join([segment.word for segment in segment]))