Octoroom.Agent.Processors.AudioTurns (octoroom_agents v0.1.0)

Copy Markdown View Source

Turn taking with no STT, for the half-cascaded pipeline: the LLM hears each user turn as audio.

Recording starts at the VAD start, with about min_speech_ms + 500 ms of audio from before it (the VAD confirms speech late). The turn ends when Smart Turn calls it complete at a VAD stop, after max_silence_ms of pause, or, with smart_turn: false, at the VAD stop. The whole turn goes downstream as one UserAudio frame after UserStoppedSpeaking. Turns shorter than min_audio_ms are dropped as noise. Raw audio stops here.

source is stamped from the audio. With interrupt: false (an agent's per-speaker front end) no Interruption is pushed: the agent decides who may interrupt.

Options: :interrupt (default true), :smart_turn (default true), :threshold, :max_silence_ms, :min_speech_ms, :min_audio_ms (150), :model_path, :features_model_path, and :predict (a fn pcm -> probability end, for tests).

Summary

Functions

handle_async(key, message, state)

handle_frame(frame, direction, state)

handle_info(message, state)

handle_timer(key, state)

handle_update(opts, state)

terminate(reason, state)