silly-petabyte-50668
01/01/2026, 9:44 PMtall-airline-16756
01/01/2026, 9:44 PMtall-airline-16756
01/01/2026, 9:45 PMsilly-petabyte-50668
01/01/2026, 9:46 PMtall-airline-16756
01/01/2026, 9:47 PMrtc.AudioStream and run your noise-classification model on incoming `AudioFrame`s in parallel with the STT pipeline.
◦ This runs independently of VAD/STT, so you can classify environmental sounds continuously or on whatever cadence you need.
• Sparse, asynchronous context
◦ Send context via a byte stream, a text/data channel topic, or by invoking a custom RPC on the agent.
◦ On the agent, register a byte-stream handler, listen for the specific text/data topic, or register an RPC method to receive and integrate the data into the agent’s state or chat context.
◦ Use these updates to influence the agent’s decisions, prompts, or future responses.
If you want, I can:
• Provide a short code example (agent-side) for subscribing to raw audio frames and calling a noise classifier.
• Show a snippet for registering a byte-stream handler or RPC method and how to merge the received context into the agent’s chat state.
Which snippet would be most helpful: noise-classifier audio processing, byte-stream/RPC receive, or both?
Sources: Capturing the First Few Seconds of a Call for Processing | Vision | LiveKit docs | External data and RAG | LiveKit docs | Text and transcriptions | LiveKit docs | Job lifecycle | LiveKit docssilly-petabyte-50668
01/01/2026, 9:47 PMtall-airline-16756
01/01/2026, 9:48 PMsilly-petabyte-50668
01/01/2026, 9:53 PMtall-airline-16756
01/01/2026, 9:54 PMrtc.AudioStream to access `AudioFrame`s inside the agent process.
• Run your noise-classification model on those frames in parallel with the STT node (VAD+STT remains gated by VAD; your classifier can run continuously or on your own cadence).
• Use the classification outputs to update the agent’s internal state (e.g., session context, flags) so the agent’s logic/LLM can incorporate noise info without sending it to other participants.
Docs:
• Processing raw media tracks / AudioStream: https://docs.livekit.io/agents/server/job/#processing-raw-media-tracks
• STT node (for how STT integrates with VAD): https://docs.livekit.io/agents/build/nodes/#stt_node
2) Sending sparse, asynchronous data directly to the agent (not to participants) Options you can use from your external system to push context into the agent runtime:
• Byte streams: send arbitrary JSON/binary to a named byte-stream topic; register a byte-stream handler in the agent to receive it.
◦ Docs: https://docs.livekit.io/transport/data/byte-streams/
• Agent RPC methods: register an RPC on the agent (e.g., provide_context) and have your external service/frontend call perform_rpc to push updates.
◦ Docs: https://docs.livekit.io/agents/logic/external-data/
• Text/data streams targeted at the agent (using a non-transcription topic) and have the agent listen for that topic.
◦ Docs: https://docs.livekit.io/agents/multimodality/text/#receiving-text-streams
• Job metadata / room/participant attributes for initial or occasional context.
◦ Docs: https://docs.livekit.io/agents/server/job/#passing-data-to-a-job
Which would you prefer? I can provide a concise agent-side code snippet for:
• subscribing to raw audio frames and calling a noise-classifier, or
• registering a byte-stream handler / RPC method and merging received context into the agent’s chat/session state.
Pick one and I’ll send the snippet.