Transcripts you can query
A Transcribe button beside the audio in your Sanity Studio documents. The transcript is saved on the document as editable text and timed sentences, so GROQ, your frontend and your search read it like any other field.
SANITY STUDIO 3+ · REACT 18+ · NODE 20+ · FROM $0.20 AN HOUR OF AUDIOQuery it with GROQ
The transcript and its timed sentences live on the document, so GROQ and the GraphQL API return them with everything else.
Progress you can see
The field shows how much audio is done and survives a reload. Stop ends a job you no longer want.
Editors stay in charge
The transcript is plain text an editor can correct, with the same history and publishing as the rest of the document.
Key stays on the server
The Studio talks to one route on your own server, which holds the API key. The key never reaches the browser.
One plugin, one field, one route
Add the plugin to sanity.config.ts, a vocalstack.transcript field next to the audio in your schema, and the VocalStack route to your frontend (a Next.js route, or any Node or edge server). The route holds the API key, so it never reaches the browser.
vocalstack.transcript field next to an audio file field, then click Transcribe.npm install github:vocalstack/sanity-plugin// app/api/vocalstack/[...path]/route.ts
import { createVocalStackHandler } from '@vocalstack/sanity/server'
// The key is read from VOCALSTACK_API_KEY
const handler = createVocalStackHandler({ sanity: { projectId, dataset, token } })
export { handler as GET, handler as OPTIONS, handler as POST }
// sanity.config.ts
import { vocalstack } from '@vocalstack/sanity'
export default defineConfig({
plugins: [vocalstack({ handlerURL: 'https://www.example.com/api/vocalstack' })],
})
// schemas/episode.ts
defineField({ name: 'audio', type: 'file' }),
defineField({ name: 'transcript', type: 'vocalstack.transcript' }),Fits the way you built it
Sensible defaults, and a hook for every place your setup differs.
handlerURLWhere the VocalStack route is mounted on your server. The Studio calls only this address.
audioFieldWhich file field on the document holds the audio. By default, the first one with an audio file.
spokenLanguageThe language spoken in the audio. Leave it out to detect it automatically.
fileURLThe address VocalStack fetches the audio from. By default, the file's address on Sanity's CDN; return a signed one for private files.
allowedOriginsWhich Studio addresses may call the route.
No plugin fee
You pay VocalStack only for the audio you transcribe, on the same rate as the Dashboard and the API. Billed per second, with a minimum of 5 minutes per transcription.
Every audio file you transcribe, with speakers, punctuation and timings included.