Skip to content

Transcribing and Indexing Audio and Video in Pixeltable

In this tutorial, we'll build an end-to-end workflow for creating and indexing audio transcriptions of video data.

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.

What it covers

  • Create a Table for Video Data
  • Create Transcriptions
  • Add an Embedding Index
  • Incremental Updates
  • Using the OpenAI API

What it uses

Install
terminal
pip install pixeltable openai openai-whisper sentence-transformers spacy
Environment variables it names
OPENAI_API_KEY
Pixeltable calls
video.extract_audio()audio.get_metadata()whisper.transcribe()string.string_splitter()openai.transcriptions()pxt.create_table()pxt.create_view()insert()add_computed_column()add_embedding_index()

A look at the code

audio-transcriptions.ipynb
from pixeltable.functions.video import extract_audio
video_table.add_computed_column(
audio=extract_audio(video_table.video, format='mp3')
)
video_table.show()

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

Browse all 103