Transcript editing
This guide shows you how to edit transcripts with natural-language instructions using the Speech to Text API.
How-to guide · Assumes you have completed the Speech to Text quickstart.
Overview
Transcript editing is an experimental feature and comes at an additional cost of 30% on top of the base transcription cost, billed for a minimum of 10 seconds of audio per request. See the API pricing page for detailed pricing information.
Transcript editing lets you attach a natural-language instruction to a transcription request. Once the audio has been transcribed, your instruction is applied to the transcript and the edited text is returned alongside the original.
This replaces a separate post-processing step in your own pipeline. Typical uses are normalizing how dates, times or units are written, expanding abbreviations, removing content you do not need, applying a different style or tone, or reformatting the transcript.
For example, transcribing a voicemail with the instruction Write all dates in ISO 8601 format (YYYY-MM-DD) returns both versions of the text:
The text and words fields always describe the original transcript. The edited version is returned separately in edited_transcript.
Integrating transcript editing
Transcript editing is integrated into the Speech to Text API by passing the transcript_edit parameter to the convert method. The instruction can be up to 2000 characters long.
Transcript editing works with both synchronous requests and webhook requests. For webhook requests, edited_transcript is included in the transcription object of the webhook payload.
Scribe v2 Realtime supports the same instructions on each committed transcript. See the realtime transcript editing guide.
Writing instructions
The instruction is applied to the whole transcript wherever it is relevant, and every matching occurrence is edited, not just the first. An instruction can change specific words or phrases and leave everything else untouched, or it can rewrite or annotate the complete text. A single instruction can combine several edits.
The following examples illustrate the range of supported instructions:
Some adjustments have dedicated parameters that are cheaper and more predictable than an edit
instruction. Use keyterm
prompting to bias
recognition towards specific names and terms, no_verbatim to remove filler words and
disfluencies, and numbers_format (where supported) to choose between digits and words. Reserve
transcript editing for changes those options do not cover.
Keep the following in mind when writing instructions:
- Be explicit about the desired output.
Write all dates in ISO 8601 format (YYYY-MM-DD)is more reliable thanfix the dates. - The instruction can be written in any language, although instructions written in English work best. The edited transcript stays in the language of the original.
- Only the instruction is carried out. Content spoken in the audio is treated as data and cannot change how the instruction is applied.
- If nothing in the transcript is affected by the instruction, the edited transcript is identical to the original.
Response format
When transcript_edit is set, the response contains an edited_transcript object. Its kind field indicates whether the edit succeeded:
The field is absent when no transcript_edit was requested.
Behavior to be aware of:
- The edited transcript is plain text. Word-level timestamps, speaker labels and
additional_formatscontinue to describe the original transcript. - The edit runs after transcription has completed, so it adds latency that grows with the length of the transcript.
- The surcharge is applied to the audio duration of the request, with a minimum of 10 seconds billed per request.
Transcript editing cannot be combined with entity_detection, entity_redaction or
use_multi_channel. Requests that combine them are rejected with an invalid parameters error.