| name | whisper-transcription |
| description | Transcribe audio/video to text with word-level timestamps using OpenAI Whisper. Use when you need speech-to-text with accurate timing information for each word. |
Whisper Transcription
OpenAI Whisper provides accurate speech-to-text with word-level timestamps.
Installation
pip install openai-whisper
Model Selection
Use the tiny model for fast transcription - it's sufficient for most tasks and runs much faster:
| Model | Size | Speed | Accuracy |
|---|
| tiny | 39 MB | Fastest | Good for clear speech |
| base | 74 MB | Fast | Better accuracy |
| small | 244 MB | Medium | High accuracy |
Recommendation: Start with tiny - it handles clear interview/podcast audio well.
Basic Usage with Word Timestamps
import whisper
import json
def transcribe_with_timestamps(audio_path, output_path):
"""
Transcribe audio and get word-level timestamps.
Args:
audio_path: Path to audio/video file
output_path: Path to save JSON output
"""
model = whisper.load_model("tiny")
result = model.transcribe(
audio_path,
word_timestamps=,
language=
)
words = []
segment result[]:
segment:
word_info segment[]:
words.append({
: word_info[].strip(),
: word_info[],
: word_info[]
})
(output_path, ) f:
json.dump(words, f, indent=)
words