Remove a transcript, and drop what you built from it
Remove transcript in the episode editor deletes one audio source’s finished or failed transcript through DELETE benecaster-transcription/v1/shows/{show_id}/episodes/{episode_id}/transcript. If your add-on built an index or cache from that text, drop it when benecaster_transcript_updated fires with deleted.
- The route takes an optional
variant, the tier slug, and needsmanage_optionsand Transcription switched on for that show. It answers200 { removed: true }. - It refuses
409 benecaster_transcription_remove_busywhile the transcript is queued or processing, and409 benecaster_transcription_remove_formattingwhile it is being formatted. - The action does not fire for a failed transcript or a Hidden one: the reader already answered
null, so nothing changed for a reader. - For the base audio, the episode’s transcript URL, type, language and owner are cleared only when the Transcription Service add-on owns the link. The file addresses stop working and are never reused.
Code
<?php
add_action( 'benecaster_transcript_updated', function ( int $transcript_id, int $episode_id, string $reason ): void {
if ( 'deleted' === $reason ) {
my_index_forget( $transcript_id ); // The row is gone: use the id only as your own key.
}
}, 10, 3 );
Hooks Used
Need this built rather than just documented? See our services →