text-transcripts
Transcript parsing, ASR command adapters, and native whisper.cpp support for moritzbrantner-video-analysis.
Feature flags
external-tests: enables ignored CLI-backed smoke testsnative: builds whisper.cpp support for offline transcription. Repository builds usevendor/whisper.cpp; crates.io builds must setWHISPER_CPP_SOURCE_DIRto a local whisper.cpp source checkout.
Stable contract
The stable surface is transcript contracts, segment/word normalization,
SRT/WebVTT/plain/Whisper JSON parsing, formatting, conversion to
TextSegmentContract, and transcript-specific text pipeline analyzers.
Quality and limits
Default package operations parse and format text only. ASR command adapters and native whisper.cpp transcription remain explicit runtime paths and are not invoked by default package-surface operations.
Example
use ;
let parsed = parse_whisper_json?;
let transcript = from.normalized?;
assert!;
# Ok::
Package surface
- Primary workflow:
transcripts.parseparses plain text, Whisper JSON, SRT, or WebVTT into the normalized transcript contract. - Workflow operations:
transcripts.parse,transcripts.normalize,transcripts.formatSrt,transcripts.formatWebVtt, andtranscripts.toTextSegments. - Debug operations:
describeinspects package metadata and operation support. - Runtime support: pure Rust parsing/formatting package-surface operations are available through library, CLI, server, and WASM wrappers.
- Sample output includes
title,message,summary,result, and operation-specific fields such assegments,text,srt, orwebVtt. - Package-surface operations do not invoke whisper.cpp or external ASR tools; native transcription remains feature-gated.
Native whisper.cpp
The transcript parsers are loadable in default builds. whisper.cpp catalog and
model-store validation is available behind native; transcription only runs
when the requested model file is present or an opt-in setup flow downloads it.
Browser benchmarks cover parse, normalize, and SRT formatting workflows through
bun run text-wasm:bench:all.
Related crates
text-corevideo-analysis-ingestvideo-analysis-use-cases