ml frameworksimpleOfficial

Whisper Integration

Transcribe Pixeltable Audio columns with OpenAI Whisper running locally. No API key. Split long files, then cache text per segment.

Challenge

Whisper runs locally and needs no API key. Production still needs the audio on a row, a split for long files, and a place to keep the transcript with timestamps. A script that loads each file, calls whisper.transcribe, and writes a .txt next to it will re-run completed files unless you add a cache. Hosted openai.transcriptions is a different UDF and a different bill. Pixeltable already has pxt.Audio. The integration is pixeltable.functions.whisper.transcribe plus audio_splitter when the file is longer than a single Whisper window.

Solution

pip install pixeltable openai-whisper. Assign transcribe(audio, model=base.en) on the class, then text = result.text. Models ending in .en are English-only and faster; drop .en for multilingual. For long files, declare a view with audio_splitter(duration=30.0) and transcribe audio_segment on that view. Inserting a video extracts the audio track. There is no OpenAI API key on this path. ffmpeg must be on PATH. The documented how-to for searchable transcripts also embeds the text; this page is the Whisper UDF itself. Hosted Whisper-1 is pixeltable.functions.openai.transcriptions, a different import.

Integration Steps

Step 1 of 4

A path string is not enough. Splitting and Whisper need a typed column.

import pixeltable as pxt
from pixeltable.functions.audio import audio_splitter
from pixeltable.functions.whisper import transcribe
TableModel = pxt.model_base()
class Recordings(TableModel, name='recordings'):
title: pxt.String
audio: pxt.Audio
# pxt schema update app.py whisper_lib -f

💡 Insert local paths, https://, or s3:// URIs. A video file is valid: Pixeltable extracts the audio track. openai-whisper and ffmpeg are required.

Use arrow keys to navigate

Key Benefits

No OpenAI API key: openai-whisper runs on the machine that holds the table
Per-row cache: completed segments do not transcribe again
audio_splitter keeps timestamps next to the text
Video inserts extract audio automatically
Hosted Whisper-1 stays a separate openai.transcriptions column if you want it

Use Cases

•Podcast and meeting transcripts stored with the file
•English-only bulk transcription with base.en
•Multilingual audio with a non-.en checkpoint
•Preparing text for an embedding index on the same view
•Local transcription in an environment that cannot call a hosted ASR API

Technical Requirements

•Python 3.11+
•pip install -U 'pixeltable[serve]' openai-whisper
•ffmpeg on PATH
•RAM and disk for the chosen Whisper checkpoint

Related Integrations

  • OpenAI

    Modality: Model API

    Computed column: OpenAI: Setup OpenAI Integration

    Docs
  • Anthropic

    Modality: Model API

    Computed column: Anthropic: Install and set the API key

    Docs
  • Gemini

    Modality: Model API

    Computed column: Gemini: Authenticate AI Studio or Vertex

    Docs

Ready to Integrate Whisper?

Get started with Pixeltable and Whisper in minutes.

pip install pixeltable