using webhooks, how can i get the audio or transcr...
# ask-ai
o
using webhooks, how can i get the audio or transcription from the call?
t
Thanks for reaching out, fernando. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks so much for reaching out! I wanted to share that webhooks in LiveKit don’t directly provide audio or transcription data from a call. They’re mainly designed to send event notifications, like when a participant joins or a room starts, but they don’t include media content or transcriptions. To get access to audio or transcriptions, here are a couple of helpful options you can explore: • Real-Time Transcription: You can use LiveKit AI Agents, which offer built-in tools for real-time transcription during a call. This covers both input (user to agent) and output (agent to user) transcriptions. • Post-Call Audio: Another way is to use LiveKit Egress to record the room or individual participant tracks. This creates an audio file (like MP3 or WAV) that you can then download and run through a transcription service. It would be great if you could let me know whether you’re looking for transcriptions during the call (real-time) or audio files after the call. Also, are you working with LiveKit AI Agents or a custom server application? I’m here to help you find the best solution! Sources: Pipeline nodes and hooks | LiveKit docs | Text and transcriptions | LiveKit docs | protobufs/livekit_models.proto | Sources/LiveKit/Protos/livekit_models.pb.swift | main.py
o
What about webhooks + egress api or s3 api?
t
I'm happy to help you combine webhooks with the Egress API or S3 API to retrieve audio or transcription data smoothly. Here are some key approaches that might work well for you: • Webhooks with Egress: You can set up webhooks in your Egress API requests to get notifications when egress events happen, like when a recording starts or ends. The webhook payload will include useful info such as the egress status and where the output file is located (like an S3 URL). • Real-Time Audio Streaming: If you need live transcription, using TrackEgress with a WebSocket URL allows you to stream raw audio (PCM format) in real time directly to your transcription service. • Export to S3: Another option is to use RoomCompositeEgress or TrackEgress to export audio files straight to S3-compatible storage. Once the egress finishes, the webhook will notify you with the file's S3 URL, which you can then use to start your transcription workflows. For real-time transcription, I’d recommend WebSocket streaming. And if you prefer post-call transcription, exporting audio to S3 and processing it after the webhook notification works great. Please feel free to reach out if you’d like me to walk you through the implementation details for any of these methods—I’m here to help! Sources: examples/webhooks-http/README.md | Track egress | LiveKit docs | README.md | Egress API | LiveKit docs | Webhooks | LiveKit docs