Whisper Lolo Audio Ingest
Overview
Implement long-form browser recording with chunked storage in IndexedDB and direct uploads to Vercel Blob, without serverless upload limits.
Recording workflow
- •Initialize MediaRecorder with a supported mime type.
- •Start with
MediaRecorder.start(timeslice)to emit chunks. - •On
dataavailable, persist each chunk to IndexedDB. - •On stop, rehydrate chunks and assemble a final Blob.
- •Clear stored chunks after a successful upload.
Storage guidance
- •Do not keep full audio in RAM; always store chunks in IndexedDB.
- •Use idb-keyval for simple storage of Blob chunks.
- •Guard against empty chunks; some browsers emit zero-size data.
Upload workflow (client uploads)
- •Use
upload()from@vercel/blob/client. - •Generate tokens via a server route using
handleUpload. - •Persist
blob_urland update status touploadedafter completion. - •Use
onUploadProgressfor UX feedback on large files.
Non-negotiable constraints
- •Never upload audio via a Next.js API route.
- •Do not wait for transcription inside HTTP requests.
- •Chunk before transcription; upload only after assembly.
Common pitfalls
- •Check
MediaRecorder.isTypeSupported()before selecting mime type. - •Resume/pause should not break chunk order in IndexedDB.
- •Ensure
onUploadCompletedworks locally only with a tunnel orVERCEL_BLOB_CALLBACK_URL.
References to consult
- •
documentation/mediarecorder-mdn.md - •
documentation/web-dictaphone-mdn.md - •
documentation/idb-keyval.md - •
documentation/mediarecorder-examples-mozdevs.md - •
documentation/vercel-blob-client-uploads.md - •
documentation/vercel-blob-sdk.md - •
documentation/vercel-blob-examples.md