Menu

Transcribe Audio Files with a REST API Multipart Upload — Fetch and Provider Portability
📰

Transcribe Audio Files with a REST API Multipart Upload — Fetch and Provider Portability

DEV Community: typescript·UriahHawkins5489·about 3 hours ago
#EHASVVdJ
#devtotypescript#devto#dev#speech#provider
Reading 0:00
15s threshold

Short answer: use fetch with FormData for the audio file, let the browser create the multipart boundary, and hide provider-specific behavior behind a server-side REST API adapter.

A portable transcription integration should make the upload protocol boring and the provider decision reversible. For an edtech code-review service, that means accepting one audio file at an application boundary, preserving a small job record, and translating provider-specific responses behind an adapter. The browser should never need to know which speech engine is active.

The useful answer is a fetch request with FormData , a server-owned endpoint, and a contract that treats transcription as an asynchronous job when files or queues make that necessary. Do not set the multipart Content-Type header yourself. The browser adds the boundary; a hand-written header commonly leaves the server unable to parse the body.

What should the upload boundary promise?

A student may attach a short spoken explanation of a code change.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.