Skip to main content

benecaster_transcription_prompt

Filter Premium transcription

Overrides, for one episode, the vocabulary prompt the Transcription Service add-on sends to the provider. A show’s own names and jargon need no code: each show adds them under Vocabulary hints on its Transcription settings tab. This filter is for what the settings cannot express: one episode’s own terms, or replacing the global text for a show rather than adding to it.

$prompt is the global Vocabulary hints and context setting on Settings → Transcription (the shipped default until the podcaster changes it) followed, on a new line, by the show’s own Vocabulary hints: just the global text when the show has none, and just the show’s when the global setting was saved empty.

Each provider reads it differently. OpenAI Whisper receives the text as written and reads roughly its last 224 tokens; the gpt-4o-transcribe-diarize model receives none. AssemblyAI, Deepgram and Rev.ai receive only its terms: the text is split on commas, semicolons and line breaks, terms over 50 characters are dropped, duplicates are removed, and at most 100 are sent. The shipped default is a single Whisper sentence with no separators, so those three providers receive nothing from it.

Return the prompt for this request. The filter runs last. A value that is not a string is ignored and the merged text is used. The return is not capped: the setting is limited to 1,000 characters, but your filter is trusted to know what its provider accepts.

Parameters

Name Type Default Description
$prompt string — The global Vocabulary hints and context setting plus the show's own Vocabulary hints on a new line
$show_id int — ID of the episode's show
$episode_id int — ID of the episode being transcribed

Returns: string

Example

add_filter( 'benecaster_transcription_prompt', function ( string $prompt, int $show_id, int $episode_id ): string {
    // One episode's guest and the terms only they use, added after the show's prompt.
    return 456 === $episode_id ? $prompt . "\nMarguerite Duras, nouveau roman, Lol V. Stein" : $prompt;
}, 10, 3 );

Notes

Start your terms on a new line, as the show's own terms are, so the last word before them is not read as part of your first term. The prompt text is sent only to the provider. Benecaster's anonymous usage data says only whether the global setting differs from the shipped default, and this filter does not change that. Walkthrough: Send a different vocabulary prompt for one episode.

Need this built rather than just documented? See our services →