mixing.transcript.pipeline

High-level filler-removal pipeline.

Orchestrates: extract audio -> Scribe transcribe -> filler detection -> ffmpeg cut -> write transcript outputs.

Functions

remove_fillers(input_media, output_dir, *[, ...])

End-to-end filler removal.

Classes

FillerRemovalResult(cleaned_media, ...[, ...])

Paths and computed ranges produced by remove_fillers().

class mixing.transcript.pipeline.FillerRemovalResult(cleaned_media, transcript_md, transcript_srt, cleaned_md, cleaned_srt, scribe_json, cuts_json, keeps_json, duration, cuts=list(), keeps=list())[source]

Bases: object

Paths and computed ranges produced by remove_fillers().

mixing.transcript.pipeline.remove_fillers(input_media, output_dir, *, output_media=None, fillers=frozenset({'ah', 'eh', 'er', 'erm', 'hmm', 'mhm', 'mm', 'mmm', 'uh', 'uhh', 'uhm', 'um', 'umm'}), audio_events=frozenset({'(coughs)'}), api_key=None, scribe_kwargs=None, apply_keeps_kwargs=None, keep_intermediate=True, scribe_data=None)[source]

End-to-end filler removal.

Parameters:
  • input_media (Union[str, Path]) – Video or audio file to clean.

  • output_dir (Union[str, Path]) – Directory to write transcripts and intermediate files into. Created if missing.

  • output_media (Union[str, Path, None]) – Output cleaned media path. Defaults to output_dir / f"{stem}.cleaned.mp4".

  • audio_events (Iterable[str]) – Override the default filler / event sets.

  • api_key (str | None) – ElevenLabs API key (else env ELEVENLABS_API_KEY).

  • scribe_kwargs (Optional[Mapping[str, object]]) – Extra kwargs forwarded to transcribe().

  • apply_keeps_kwargs (Optional[Mapping[str, object]]) – Extra kwargs forwarded to apply_keeps().

  • keep_intermediate (bool) – If False, delete the extracted audio file.

  • scribe_data (dict | None) – If provided, skip the network call and use this dict (must match Scribe’s response shape). Useful for tests / replays.

Return type:

FillerRemovalResult

Returns:

A FillerRemovalResult with file paths and the computed cut/keep ranges.