Skip to content

Beginner · 20 min

Store call audio, transcripts and embeddings so a voice agent can retrieve them

Keep the recording, the transcript, and the embeddings on one table so a voice agent can retrieve a later call by meaning and land on the call id plus seconds. Store the file as an Audio column with call metadata, transcribe with Whisper or a hosted speech-to-text API, split into timestamped segments, and index the text. Pixeltable is the unified multimodal AI backend for that store; it is not a voice-agent platform like Vapi or Retell.

The Challenge

Voice-agent builders are told to stitch S3 (or another bucket) for the recording, Postgres plus pgvector or a dedicated vector engine (Qdrant, Pinecone, Weaviate) for embeddings, and a queue to run Whisper or a hosted STT API. The agent then has to join a vector hit back to a call id and a timestamp you stored by hand. Voice platforms such as Vapi and Retell store recordings as part of the call product; they are not an owned table of audio, transcripts, and embeddings you query later. Call-center, meeting, and support recordings have the same ASR-pipeline shape.

The Solution

One table holds the call recording (Audio), metadata (call id, agent, customer, timestamps), a transcript computed column (whisper.transcribe locally, openai.transcriptions for a hosted OpenAI model, or a UDF you write for Deepgram, AssemblyAI, or another STT vendor), timestamped segments from audio_splitter, an embedding index on segment text, and an optional LLM summary. The agent retrieves by similarity and gets back the call id plus segment_start in seconds. Insert a new recording and only that file is transcribed. Pixeltable is not Vapi or Retell; keep those when the voice platform is the contract, and land their recording on this table when you need retrieval you own.

Implementation Guide

Step-by-step walkthrough with code examples

Step 1 of 4

Store the recording and call metadata

Each call is a row: typed Audio plus the ids a later retrieval must return. Apply with pxt schema update; do not call create_table at import.

python
1import pixeltable as pxt
2from pixeltable.functions.audio import audio_splitter
3from pixeltable.functions.huggingface import sentence_transformer
4from pixeltable.functions.whisper import transcribe
5
6TableModel = pxt.model_base()
7text_embed = sentence_transformer.using(model_id='all-MiniLM-L6-v2')
8
9class Recordings(TableModel, name='recordings'):
10 call_id: pxt.String
11 agent: pxt.String
12 customer: pxt.String
13 started_at: pxt.Timestamp
14 audio: pxt.Audio
A path string is not enough: splitting and transcription need a typed Audio column. started_at is call metadata, not the word timestamp; those live on the segment view.

Where call audio, transcripts, and embeddings live

JobS3 + Postgres/pgvector + Qdrant/Pinecone/Weaviate + queueVoice platform (Vapi, Retell)Pixeltable
Store the recordingObject storage plus a metadata databaseThe platform stores the call as part of the productAn Audio column on a table you own
TranscribeA worker calls Whisper or a hosted STT APIVendor transcription, if that product includes itwhisper.transcribe, openai.transcriptions, or a UDF you write
TimestampsYou store offsets next to the vector by handVendor-dependentsegment_start and segment_end on the splitter view
Embeddings and retrievalpgvector or a dedicated vector engine you keep alignedNot an owned index of your callsEmbeddingIndex on segment text; similarity returns call id + seconds
New callEnqueue a task; retry the DAGThe next call on that platformInsert a row; only that file is transcribed and indexed

Key Benefits

The recording, transcript, embeddings, and timestamps live on one table instead of S3 plus a vector DB plus a queue
A similarity hit returns call id and seconds, so the agent can seek the moment
A new call transcribes only that file; unchanged rows keep stored text
Provider computed-column calls are rate-limited; HTTP 429 retries that row
Local whisper.transcribe needs no API key; openai.transcriptions is the hosted OpenAI path

Real Applications

Voice-agent memory: retrieve a prior call by meaning and play from that second
Call-center transcription and quality review over support recordings
Meeting and communications archives (standups, sales calls, interviews)
Contact-center ASR pipelines that used to dump text next to a WAV

Prerequisites

Basic Python programming
Call recordings or other audio files to insert
Python 3.11+
pip install -U 'pixeltable[serve]'
ffmpeg for audio decoding
openai-whisper for whisper.transcribe (no API key)
sentence-transformers for the segment EmbeddingIndex
Optional: OpenAI API key for openai.transcriptions and chat_completions
Optional: WhisperX plus HF_TOKEN for diarize=True

How-to guides

Frequently asked questions

How do I add speaker diarization?

openai-whisper does not label speakers. Pixeltable's first-party path is whisperx.transcribe(..., diarize=True), which uses WhisperX alignment plus a pyannote pipeline (default speaker-diarization-community-1 on WhisperX 3.8+). That needs an accepted Hugging Face token (HF_TOKEN). The WhisperX cookbook splits those segments with list_iterator. Other diarizers are a UDF you write.

Can the agent retrieve the exact moment in a call?

Yes, if you store timestamped segments. audio_splitter writes segment_start and segment_end in seconds on each view row. Return those from the similarity query and seek the parent Audio to segment_start. A filename or a whole-file transcript is not a moment.

How are API calls rate-limited when I transcribe thousands of calls?

Pixeltable rate-limits provider calls made from computed columns so inserts do not stampede the API. An HTTP 429 waits and retries that row. Other rows are not marked done if they never ran. This page does not publish a concurrency number. Local whisper.transcribe is not an HTTP API; it still runs per new or changed row only.

Can I use Deepgram or AssemblyAI instead of Whisper?

Yes as the model on a computed column, not as a first-party Pixeltable module. Wrap the vendor SDK in a UDF and assign it like whisper.transcribe. openai.transcriptions is the documented hosted OpenAI path (model is a string, for example gpt-transcribe). This page does not rank those vendors or quote their prices.

Do I still need Vapi or Retell?

Keep a voice platform when it owns the live call, the phone network, and the recording upload. Pixeltable owns the table of audio, transcripts, embeddings, and timestamps you query later. Land the platform's recording on an Audio column when you need retrieval you own.

What happens when a new call arrives?

Insert a row. Only that file is split, transcribed, and indexed. Unchanged calls keep their stored transcripts. A Python loop that restarts from file zero will re-pay every minute.

Ready to get started?

Install Pixeltable and start building in minutes. One Python file for tables, indexes, and HTTP.