Create a new synchronous transcription service.
The parameters to use for the service.
ProtectedfetchProtectedfetchProtectedfetchTranscribe audio and return the finished transcript in one request.
A local file path, raw audio bytes, a Blob, or a readable
stream. Raw PCM also requires sample_rate and channels on the config.
Options for this transcription request.
Client-side options, such as the request timeout.
A promise that resolves to the finished transcript.
Open the connection to the sync API ahead of time.
The sync API is a single request/response, so a transcribe() that
opens its connection on demand pays the full DNS + TCP + TLS handshake
on the critical path. Call warm() as soon as you know audio is coming —
typically while the clip is still being recorded — so the next
transcribe() reuses the already-open connection. warm() is idempotent
and cheap; call it shortly before transcribe() so the pooled connection
hasn't idled out.
Optionalparams: { Optionally the model to route the probe to, so the warmed connection lands on the same backend as the eventual transcription.
Optionalmodel?: stringA promise that resolves to true once the connection is open
(any HTTP response — even a non-200 — means the socket is
established), or false if the connection could not be opened.
The synchronous transcription service: audio in, transcript out, one request.
Unlike
client.transcripts(which submits a job to the async API and polls for completion),SyncTranscriberposts the audio to the sync API and returns the finished transcript in the HTTP response. There is no job id or status to poll. Accepts a local file path, raw audio bytes, a Blob, or a readable stream — but not a URL.