This message was deleted.
# ask-ai
s
This message was deleted.
t
Thanks for reaching out, Av. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
I'm happy to help you access audio chunks before sending them to OpenAI! You can customize the
stt_node()
in your LiveKit agent to intercept and process the audio data beforehand. Here’s a friendly step-by-step approach: 1. Override the
stt_node()
in your agent so you can access the
rtc.AudioFrame
objects as they stream in. 2. Use the
AudioByteStream
class to break down the audio into 50ms chunks, just like LiveKit does internally. 3. Feel free to log, analyze, or even modify the audio data before sending it on to OpenAI. If you'd like, I’m here to provide more detailed guidance or an example implementation—just let me know! Sources: Pipeline nodes and hooks | LiveKit Docs | chain-of-thought-tts/README.mdoc | livekit-plugins/livekit-plugins-openai/livekit/plugins/openai/realtime/real...