Skip to main content

Send a different vocabulary prompt for one episode

Premium Beginner Transcription Service

A show’s own names and jargon need no code: add them under Vocabulary hints on the show’s Transcription settings tab, and they are sent after the global Vocabulary hints and context (Settings → Transcription). For one episode’s own terms, or to replace the global text instead of adding to it, filter the prompt per request with benecaster_transcription_prompt: $prompt arrives as the merged text.

Write terms separated by commas. AssemblyAI, Deepgram and Rev.ai read only the terms (50 characters or fewer each, at most 100), and OpenAI Whisper reads the whole text as context.

  • Appending to the shipped default works, because the default is one long sentence with no commas: the term-based providers still drop it and keep your terms. Start your terms on a new line, as the show’s own terms do, 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 default, and the filter does not change that.

Code

<?php
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 );

View on GitHub →

Hooks Used

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