Set a different transcription language for one show or episode
The Language setting on Settings → Transcription applies to every show. To transcribe one show, or one episode, in another language, filter the hint per request with benecaster_transcription_language.
Return '' for no hint (the provider detects the language), or a code the current provider lists, in that provider’s own spelling. Any other value is ignored and the global setting is used.
- Rev.ai cannot detect a language. Returning
''under Rev.ai transcribes as English. - Your answer is sent as the hint, and asked for again when the job completes, when it becomes the episode’s recorded language. Answer the same both times.
Code
<?php
add_filter( 'benecaster_transcription_language', function ( string $language, int $show_id, int $episode_id ): string {
// An all-Spanish show. 'es' is the same code on all four built-in providers;
// a regional code is not (AssemblyAI 'en_uk', Deepgram 'es-419', Rev.ai 'en-gb').
return 123 === $show_id ? 'es' : $language;
}, 10, 3 );
Hooks Used
Need this built rather than just documented? See our services →