Hi, We use room composite egress that handles audi...
# cloud
g
Hi, We use room composite egress that handles audio/video output. We would like to push the audio from a room composite as a websocket to a STT captioning service. The docs seem to suggest that this isn't possible and recommends using a Livekit agent in the room as a participant to push audio via websocket, but this would not be the same audio as the room composite. What's the recommended solution to push audio from a room composite as a websocket? Thanks
Could I get a reply to this please?
r
This seems more like a #egress question. I am not sure how you would use a websocket to do what you want to do. I think your best bet is to have an agent in the room that does the STT you mention.
g
@refined-appointment-81829 This isn't an option, the room composite handles output audio and isn't the same as the rooms audio. STT providers require audio over websocket. Is it feasible for us to build a custom websocket solution inside the room composite template itself? Will Livekit clouds headless chrome support this?
r
I guess I am not understanding your use case. LiveKit agents frame works abstract away the underlying websocket imple.
g
@refined-appointment-81829 Livekit agents only have access to room audio, not room composite audio right? The use case is our room composite manages audio output, which could be anything from audio in external files to specific room participants being muted in the output but not the room etc. This is the audio we need to send for STT. Does that explain it?
r
I am not sure how best to accomplish what you are trying to do. Anything you do is going to be a custom solution as that is not supported out of the box. If I were implementing it I think I would use the Python SDK directly and subscribe to the track, mix them, and do the web socket transfer there. I guess you could do some sort of custom headless chrome or somethg.
g
Thanks. Yes I figured it would need to be custom. Don't think Python SDK would know about the audio from external files? Only the room composite outputs this audio. Hence why we need this at the room composite layer.
r
So if you you are in the room other participants do not hear that audio?
g
Correct
r
How does composite hear it then?
g
The composite plays it
Could be a sting, pre-roll etc. The composite handles this and there could be spoken words.
r
Ok, I really don't understand your use case. I don't understand how a composite would hear it but the room would not. But I am probably still not understanding what your trying to do. I should confess I am much more knowledgeable about other parts of the system than I am about egress.
g
Room composite decides on final audio output for the egress, which is not always the same as the rooms audio and it can output pre-configured video/audio for the egress too, so its this final audio that i need for STT. No problem, who should I talk to specifically about room composite egress?
r
There is no websocket support for room egress. You could create an API that looks like an S3 bucket and intercept that way I guess.
g
Is that using the audio only egress output? The docs are not very specific on what this output actually is.
r
I believe the composite egress is audio and video.
But I also thought it would only record what is published to the room
g
Yes there is an audio only option too, which we could potentially use depending on what the output is. Could you put me in touch with someone who handles this part of the platform?
r
I am looking for someone who might know. Lets hope they show up here 🙂
👍 1
g
@refined-appointment-81829 Any news on this? Here is a link to the docs about the audio-only option for room composite. https://docs.livekit.io/home/egress/room-composite/#audio-only-composite I'm assuming this is probably a recording and just goes to S3 as a single file? Any suggestions from the team for capturing audio from the room composite and passing this to a STT service would be very useful.