TranscriptParser
The public facade over the active parsing backend.
Usage
TranscriptParser()Resolves a Backend once and streams parsed transcripts through it.
Methods
| Name | Description |
|---|---|
| backend() | Returns the resolved backend, resolving it on first use. |
| backend_name() | Returns the resolved backend’s name. |
| resolve_backend() |
Selects the parsing backend, honoring CC_TRANSCRIPT_DISABLE_RUST.
|
| stream_transcripts() |
Streams parsed transcripts for paths via the active backend.
|
backend()
Returns the resolved backend, resolving it on first use.
Usage
backend()backend_name()
Returns the resolved backend’s name.
Usage
backend_name()resolve_backend()
Selects the parsing backend, honoring CC_TRANSCRIPT_DISABLE_RUST.
Usage
resolve_backend()Returns the RustBackend when the _parser_rs extension is importable and exposes stream_parse; otherwise the pure-Python PythonBackend. Set CC_TRANSCRIPT_DISABLE_RUST to force Python regardless.
stream_transcripts()
Streams parsed transcripts for paths via the active backend.
Usage
stream_transcripts(paths, *, prefetch=None, spec=None)Parameters
paths: Sequence[tuple[Path, float]]-
Pairs of
(path, mtime)to parse. prefetch: int | None = None-
Files to keep in flight; defaults to
PREFETCH. spec: FilterSpec | None = None-
Optional
~cc_transcript.FilterSpecapplied during parsing; events failing it are dropped from each result.
Yields
One: AsyncIterator[ParsedTranscript]- class:ParsedTranscript per input path.