cjm-transcription-core
A frontend-agnostic core for the audio transcription workflow — composes isolated capability workers (audio conversion, VAD segmentation, batch transcription, persistence) into a headless pipeline, with a CLI as its first driver.
Modules
cjm_transcription_corecjm_transcription_core.boundaries— Wall-clock-aware segment boundary computation: group VAD speech chunks into segments cut at silence-gap midpoints. Pure logic — no capability calls. Final home of the algorithm originally validated in cjm-transcription-audio-segment's AudioSegmentService.compute_segment_boundaries (that library is retired to cj-mills_deferred/).cjm_transcription_core.candidates— Candidate (capability, MODEL)-instance enumeration for the comparison screen.cjm_transcription_core.cli— The CLI driver — the workflow core's first (and currently only) frontend.cjm_transcription_core.curation— Collection curation vocabulary (hub v0, e5849229): the journaled update/deletecjm_transcription_core.emission— Graph-root emission (CR-18 revolution 2): a completed source EMITS Source -> AudioSegment -> Transcript into the shared context graph — the graph BEGINS at transcription (where-graph-begins resolution: ingestion is the first EXTENDER that plants the root). Deterministic identity tuples make emission idempotent: re-runs (cache hits included) collide into verified no-ops instead of duplicating roots (the E13 hazard, relocated into graph creation and discharged).cjm_transcription_core.launch— The shared launch surface every transcription shell drives through: thecjm_transcription_core.models— Data shapes for the transcription pipeline: run configuration + the run-manifest result containers. The run manifest is the pipeline's durable output record: which sources were processed, how they were segmented, and where each segment's transcription landed (capability data DBs remain the authoritative text store; the manifest records the run's shape + provenance pointers). It is a deliberate proto-bundle — the CR-20 provenance-bundle infrastructure is expected to absorb/replace it.cjm_transcription_core.pipeline— The headless transcription pipeline: VAD analysis -> boundary computation -> segment cutting -> per-segment model-input conversion -> transcription, composed over capability workers via the substrate's JobQueue. Between-stage outputs are threaded manually (run job -> read result -> submit next); the per-segment fan-out rides a CR-16 ports Composition with OutputRef bindings (this module was the real-world consumer of the original submit_sequence piping gap — pass-2 evidence in claude-docs/pass-2-evidence.md). HITL approval seams use the cheapest viable form (log + optional CLI prompt) per the cores-cluster guard-rails; each seam carries its 5-field HITL-assist annotation in its docstring.cjm_transcription_core.probe— Per-segment comparison probe: transcribe ONE VAD-cut segment across everycjm_transcription_core.results— Past-run results for the setup TUI: the core's own runs/*.json manifests readcjm_transcription_core.sources— Source-selection state for the picker stage: a keyboard file browser plus thecjm_transcription_core.state— Sidecar TUI state: last-used run settings persisted across sessions (the
API
cjm_transcription_core.boundaries
compute_segment_boundariesfunction — Group VAD chunks into segments cut at silence-gap midpoints.
cjm_transcription_core.candidates
candidate_directivesfunction — Expand every installed transcription capability into its candidate space.discover_capabilityfunction — Pick a DEFAULT capability for a role by surface match.instance_id_forfunction — Derive an addressable instance id for a non-default (capability, MODEL) pick.manifests_with_methodfunction — Enumerate installed capabilities whose structural surface listsmethod.model_axisfunction — Find a capability's MODEL config axis in its config_schema.spec_stringfunction — Render a load directive back to the core CLI's --transcriber grammar.transcription_manifestsfunction — Enumerate installed transcription capabilities from their manifest files.
cjm_transcription_core.cli
build_parserfunction — Build the CLI parser (subcommands: run).declare_structure_commandfunction — Executedeclare-structure: read a structure-map document and land itexpand_sourcesfunction — Expand CLI source arguments into the ordered media-file list for a run.expand_sources_with_collectionsfunction — Expand CLI sources AND keep the folder-source gesture as collectionload_capabilitiesfunction — Discover manifests + load each requested capability.mainfunction — CLI entry point (console script:cjm-transcription-core).parse_max_concurrentfunction — Parse repeatable--max-concurrent NAME=Nvalues into a per-capability cap map.parse_transcriber_specfunction — Parse one--transcriberspec into a (capability, MODEL)-instance load directive.run_commandfunction — Execute therunsubcommand: full pipeline over the given audio files.
cjm_transcription_core.curation
apply_curationfunction — Replay onecollection-curationop: deletes -> updates -> wires.collection_membersfunction — A collection's member Sources (PART_OF edges; unordered by design —collection_orderfunction — Walk the materialized order, when one exists (typed EdgeQuery reads —confirm_collectionfunction — Discharge a proposed collection's flag (ae3464fc: the explicit humancuration_replay_handlersfunction — The curation verb's replay registration (unioned intodeclare_structurefunction — Declare a SOURCE STRUCTURE MAP: the WORK's own part/chapter structurefile_sourcesfunction — File existing Sources into a collection (create-or-attach; the hub'sjournal_curationfunction — Apply one curation act and journal it as acollection-curationop.list_collectionsfunction — Enumerate the graph's Collection nodes (the hub's grouping corpus).refile_membersfunction — Move members between collections (the Supernova carve-out: selectrename_collectionfunction — Rename a collection — which IS merge when the new title already exists.set_collection_orderfunction — Materialize (or repair) a collection's order — the curation op ae3464fcstructure_entries_from_mapfunction — Normalize a structure-map document intodeclare_structureentries.
cjm_transcription_core.emission
build_collection_emissionfunction — Build the Collection layer payload for one declaration (pure; nobuild_source_emissionfunction — Build the graph-root payload for one source (pure; no capability calls).emit_collections_graphfunction — Idempotently emit the run's collection declarations (verbemit_source_graphfunction — Idempotently emit one source's graph root through the task channel.transcription_replay_handlersfunction — The transcription core's replay vocabulary (DEC 426658f1, replay stays DOMAIN-OWNED).
cjm_transcription_core.launch
build_parserfunction — The TUI driver's argument surface (setup options + core-run passthrough).hand_offfunction — The shared driver tail: persist the confirmed choices, print theplan_argvfunction — Render a confirmed plan as headless core-CLI argv.resolve_settingsfunction — Resolve the run-setup settings every shell shares (flags > persisted
cjm_transcription_core.models
CollectionDeclclass — A collection declaration riding a run (ae3464fc: the folder-sourcePipelineConfigclass — Configuration for one transcription pipeline run.RunManifestclass — Durable record of one pipeline run (proto-bundle; see CR-20).SegmentRecordclass — One segment of a source audio file, with per-transcriber transcripts.SourceResultclass — Pipeline result for one source audio file.new_run_idfunction — Generate a unique, sortable run id.
cjm_transcription_core.pipeline
acquire_speaker_turnsfunction — Diarize the full source and persist the source-keyed turns artifact.analyze_vadfunction — Run VAD analysis on one model-ready audio file (task channel: vad/detect_speech).build_segment_compositionfunction — Build the per-source fan-out composition: N independent [preprocess→]convert→(T× transcribe) pipes.collect_capability_infofunction — Record capability identity + data-DB pointers for the run manifest (provenance).confirm_seamfunction — HITL approval seam in its cheapest viable form (log + optional CLI prompt).convert_for_vadfunction — Convert a source to MODEL-READY audio for VAD via the ffmpegconvertaction.cut_segmentsfunction — Cut the source audio at the computed boundaries via ffmpegsegment_audio.normalize_vad_resultfunction — Normalize a typed VAD result into sorted speech chunks + the reported duration.probe_durationfunction — Probe a media file's duration via the ffmpeg capability'sget_infoaction.records_from_compositionfunction — Fold a completed segment composition back into SegmentRecords.run_pipelinefunction — Run the transcription pipeline over the given sources, in order.run_sourcefunction — Run the full pipeline for one source: VAD → boundaries → cut → [preprocess →] convert → transcribe.submit_and_waitfunction — Submit one capability job, wait for it, and return its result (raise on failure).tier1_segment_checksfunction — Tier-1 deterministic pre-filters for the boundary-review seam (no AI).tier1_transcript_checksfunction — Tier-1 deterministic pre-filters for the transcript-review seam (no AI).
cjm_transcription_core.probe
SegmentProbeclass — One source's cut segments + cached per-segment comparison results.
cjm_transcription_core.results
RunIndexclass — runs/*.json manifests loaded newest-first + the lookups the TUI paints from.
cjm_transcription_core.sources
CollectionFieldclass — Pre-run collection state for the sources stage (ae3464fc: the actorSourceBrowserclass — Keyboard file-browser + ordered selection state for the sources stage.
cjm_transcription_core.state
load_statefunction — Read this project's persisted TUI state.save_statefunction — Merge updates into the persisted state and write it back (best-effort:state_pathfunction — Where this project's TUI state lives.
Dependencies
Depends on: cjm-capability-primitives, cjm-context-graph-layer, cjm-context-graph-primitives, cjm-substrate, cjm-transcript-graph-schema, cjm-transcription-adapter-interface
Used by: cjm-transcript-correction-qt, cjm-transcription-qt, cjm-workflow-hub-qt
Release files for cjm-transcription-core 0.0.10
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| cjm_transcription_core-0.0.10.tar.gz | 73.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cjm_transcription_core-0.0.10-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 136.1 kB
Release files / cjm_transcription_core-0.0.10.tar.gz
| Download URL | cjm_transcription_core-0.0.10.tar.gz |
|---|---|
| Size | 73.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7de2795c9584976a041200af424b6c7de9db5af9326c5f00eeaca8dfb2dce7fa
|
|
BLAKE2b-256 checksum How to use checksums |
3740c39c79720c8897e5d45b855cc913d4cdfc7678d5b2922c251188a27df6a2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.12
|
Release files / cjm_transcription_core-0.0.10-py3-none-any.whl
| Download URL | cjm_transcription_core-0.0.10-py3-none-any.whl |
|---|---|
| Size | 63.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9a1fbabe8a9680ad008ea6e99bc9465e0a53e0aeaa7e5d1207e2fa716f87f1f1
|
|
BLAKE2b-256 checksum How to use checksums |
3b9314b73dde50c2e7a319af06631d77bd9d853a6124eb1d79c3ce311f60669b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.12
|