vocal_helper.types module
vocal_helper.types
Typed dicts and dataclasses passed between pipeline stages.
The shapes are deliberately small and JSON-friendly so the same events can be (a) consumed by an in-process subscriber, (b) shipped over a WebSocket / SSE feed, (c) stored as JSONL for replay.
PCM convention — the same one used across the AI Helpers suite
(capture_helper.MicFrame, podcast_helper.PcmFrame) :
mono
np.float3216 kHz (resampling is the source’s responsibility ; the pipeline assumes the configured
sample_rate).
Time convention :
t0/t1are seconds since pipelinestart_at(the monotonic time the pipeline began consuming frames). All stages use the same clock so events can be aligned downstream.
- class vocal_helper.types.DiarizedSegment[source]
Bases:
TypedDictVoiced segment with a global speaker id attached.
Emitted by
vocal_helper.diar.OnlineDiarStageafter each voiced segment has been embedded and matched against the running speaker centroids.speakeris a stable string id of the form"S0","S1"— same speaker across the whole session.
- class vocal_helper.types.PcmFrame[source]
Bases:
TypedDictOne PCM frame at the configured sample rate.
Mirrors
capture_helper.MicFrameandpodcast_helper.PcmFrameso a producer from either library can feed this pipeline directly.
- class vocal_helper.types.SummarySnapshot[source]
Bases:
TypedDictOne running summary as produced by the optional LLM analyst.
recentis the verbatim transcript of the lastrecent_window_sseconds ;summaryis the LLM’s running digest of everything older than that.
- class vocal_helper.types.Utterance[source]
Bases:
TypedDictTranscribed diarized segment.
Emitted by
vocal_helper.asr.WhisperStage.wordsis a list of(t0, t1, text)triplets when the underlying backend supports word-level timestamps, else a single triplet spanning the whole utterance.
- class vocal_helper.types.VoicedSegment[source]
Bases:
TypedDictA contiguous run of voiced speech as detected by VAD.
Emitted by
vocal_helper.vad.SileroVADStagewhen speech ends (i.e. aftermin_silence_msof trailing silence) — the PCM buffer holds the full voiced span minus the trailing silence.