ValueError: Protocol message ParticipantEgressRequ...
# ask-ai
c
ValueError: Protocol message ParticipantEgressRequest has no “audio_only” field. where do i set my egress output to audio_only?
✅ 1
t
Thanks for reaching out, Faraz. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks — I’m responding to the ValueError about
ParticipantEgressRequest
not having an
audio_only
field. That field does not exist. To record/export audio-only, use a track-level egress (TrackEgress or TrackCompositeEgress) and target the participant’s audio track instead of ParticipantEgress: • Use TrackEgress and set
track_id
to the participant’s audio track; choose an audio output type (e.g., OGG/Opus). • Or use TrackCompositeEgress and include only the audio track (omit
VideoTrackId
or leave it empty). Example (Go, TrackEgress):
Copy code
info, err := egressClient.StartTrackEgress(ctx, &livekit.TrackEgressRequest{
    RoomName: "my-room",
    TrackId:  "audio-track-sid",
    Output: &livekit.TrackEgressRequest_File{
        File: &livekit.EncodedFileOutput{
            Filetype: livekit.EncodedFileType_OGG,
            Filepath: "output/audio.ogg",
            S3:       &livekit.S3Upload{...},
        },
    },
})
Notes: • Room composite egress (rendered via Chrome) always produces audio+video and cannot be set to audio-only. • Use server APIs or webhooks to retrieve the participant’s audio track ID if you don’t have it. If you’d like, tell me which SDK/language you’re using and I’ll provide a concrete example for that environment. Sources: Universal Egress | LiveKit, with interactive elements