Learn how to record and save audio from conversations between users and your bot
AudioBufferProcessor
makes it easy to capture high-quality audio recordings of both the user and bot during interactions. Opt for this approach if you want more control over your recording.
This guide focuses on how to recording using the AudioBufferProcessor
, including high-level guidance for how to set up post-processing jobs for longer recordings.
AudioBufferProcessor
captures audio by:
transport.output()
to capture
both the user audio and the bot audio as it’s spoken.AudioBufferProcessor
offers several configuration options:
start_recording()
explicitly to begin capturing audio. The
processor won’t record automatically when initialized.on_track_audio_data
event
handler to save user and bot audio separately.buffer_size
to trigger periodic uploads: