I’m currently using a local OpenAI Whisper model for transcribing videos, and I’m interested in transitioning to the distilled variant called “distil-small.en,” which is meant to be quicker and more efficient.
def transcribe_video(self):
video_path = "/path/to/my/video.mp4"
whisper_model = whisper.load_model("small.en") # This functions correctly
whisper_model = whisper.load_model("distil-small.en") # This one fails
transcript = whisper_model.transcribe(word_timestamps=True, audio=video_path)
print(transcript["text")
However, I’m facing this error:
RuntimeError: Model distil-small.en not found; available models = ['tiny.en', 'tiny', 'base.en', 'base', 'small.en', 'small', 'medium.en', 'medium', 'large-v1', 'large-v2', 'large-v3', 'large']
My dependencies are managed with Poetry, and here’s how I set them up:
[tool.poetry.dependencies]
python = "^3.11"
openai-whisper = "*"
transformers = "*" # for distilled models
accelerate = "*" # for distilled models
datasets = { version = "*", extras = ["audio"] } # for distilled models
I’ve found that the GitHub documentation for Distilled Whisper appears to suggest a different installation method. Is it feasible to use a distilled model as a direct substitute for a regular Whisper model?