Transcribe audio files with Whisper

Convert speech to text locally using OpenAI's open-source Whisper model—no API key needed.

Audio · Notebook · Updated

Colab runs it in your browser. If it calls a model provider, it asks for that provider's API key in a cell.

How it works

You create a view with audio_splitter to break long files into segments, then add a computed column for transcription. Whisper runs locally on your machine—no API calls needed.

What it covers

  • Transcribe audio files locally with Whisper (no API key)
  • Automatically segment long files
  • Extract and transcribe audio from videos

What it uses

Install
terminal
pip install pixeltable openai-whisper
Pixeltable calls
audio.audio_splitter()whisper.transcribe()pxt.create_table()pxt.create_view()insert()add_computed_column()

A look at the code

audio-transcribe.ipynb
# Add transcription column (runs locally - no API key needed)
segments.add_computed_column(
transcription=whisper.transcribe(
audio=segments.audio_segment,
model='base.en', # Options: tiny.en, base.en, small.en, medium.en, large
)
)

One cell of the notebook, copied as it is. Open it in Colab for the rest.

Browse all 103