swarms/playground/models/distilled_whiserpx_example.py

13 lines
323 B

import asyncio
from swarms.models.distilled_whisperx import DistilWhisperModel
model_wrapper = DistilWhisperModel()
# Download mp3 of voice and place the path here
transcription = model_wrapper("path/to/audio.mp3")
# For async usage
1 year ago
transcription = asyncio.run(
model_wrapper.async_transcribe("path/to/audio.mp3")
)