This message was deleted.
# helpdesk
s
This message was deleted.
❤️ 2
d
Thank you so much for pointing these out! 🙏 The
Authentication
mixup is really embarrassing 🤦‍♂️ I'll fix them right now. Our docs are undergoing a revamp; we'll open up the repo very soon so in the future you could just issue PRs against it. In the mean time, if you notice anything else that's off, just drop a line in here. I appreciate it!
👍 1
It’s unclear that all fields are, in fact, optionals, in the doc
which fields are you referring to above?
c
Thanks a lot @dry-elephant-14928
which fields are you referring to above?
I was referring to the fields in the subsection
types
:
(More precisely they are absent of the response)
But this is not explicitely said in the doc, so it came as a surprise when I tested my parser (I code in Kotlin which differenciates Nullable and Non-nullable)
Those
d
ah I understand now. Let me think about how we could address this. In the mean time, the other suggested fixes have been deployed 🙂
c
Insane reactivity, thanks a lot 😄
🙏 1
🔥 1
❤️ 1
Thanks in particular for the answer regarding sample rate. You mention that it matches incoming
Any idea how I can query for the exact value? It’s typically important in order to feed a SpeechToText engine to know this value.
d
Yeah, we don't resample audio when exporting raw. Opus in WebRTC uses 48kHz by default
perhaps we should ensure that.. by resampling if it doesn't match.. i'll talk to the team about this
👍 1
c
Awesome. Thanks David!
Good evening David. On the same kind of topic, the number of channels is also not documented. Experimented today on chrome and it seems to be 2 (which I suppose, is also purely depending on the raw.)
perhaps we should ensure that.. by resampling if it doesn’t match.. i’ll talk to the team about this
Another way to tackle the problem is to make sure that the first message sent on the WebSocket is a json containing information about the audio, sample rate and channel count. According to the documentation you actually do sent json messages,
{ "muted": true }
for instance
(@dry-elephant-14928 in case you missed it)
d
Hey Samuel. good point about the channel count too. Currently it's mono unless the user explicitly publishes stereo. I agree we will need a way to pass this information down somehow. re: sample rate, it's always 48kHz.
👍 1
c
Hi @dry-elephant-14928 re channel: • I am currently observing 2 channels in my setup, and as far as I know we used the default from js SDK. • Also this test in the egress repo seems to test that the number of channel is 2 (but I don’t know go enough to be sure) https://github.com/livekit/egress/blob/05674d37798117a72c57906b384f145865796a9c/test/ffprobe.go#L228 Is there any chance that the egress service is already converting it to stereo? 😃 It would be great. PCM can’t really be used without channel (or sample rate) info.
re documentation: • The endpoint for egress requests (
/twirp/livekit.Egress
) is actually missing from the doc Misc: not really doc related thing, but currently whenever one make a POST request to a service that does not exist, livekit answers a counter-intuitive
OK
. For instance I initially made a mistake in the egress request endpoint, I mistakenly used
/twirp/livekit.EgressService
and I got very confused because I received
OK
responses.
d
@able-gigabyte-21598 to confirm the above ^. It seems we are already normalizing to two channels for websocket output?
thanks for the note on egress / twirp feedback too. we'll update the docs as well. It makes sense not to install the OK handler as a catch all. I'll file an issue for that
🙌 1
the issue is here in case you are interested in submitting a PR! 🙂
🙂 1
c
Okay the pull request is here https://github.com/livekit/livekit/pull/1088. @dry-elephant-14928 Note that it’s the first time I contribute to anything in golang, so if this introduces a catastrophe let me know 😅
d
thanks for the PR! will take a look in a bit.
c
Ping @able-gigabyte-21598 (hello 🙂) regarding the question above 🙂
It seems we are already normalizing to two channels for websocket output?
a
we aren’t enforcing 2 channels, raw/websocket output is only decoded
c
Thanks @able-gigabyte-21598 This unit test that seems to check that the number of channels is 2 in the case of a stream confuses me, then. https://github.com/livekit/egress/blob/05674d37798117a72c57906b384f145865796a9c/test/ffprobe.go#L228
Passing the information of the number of channels seems mandatory, otherwise the PCMs are much harder (impossible I think) to exploit, since they are raw audio data without any headers. (Unless we know what number of channel did the clients use when creating the tracks). I see 2 solutions: • That livekit egress enforces the number of channels in the case of Websocket stream • That livekit egress sends (on the websocket) a json message that contains the number of channel and sample rate. I can make a PR if needed. What do you guys think?
a
the tests are run on the sample files in test/sample, which all have 2 channels, so that check isn’t really doing much
👍 1
I think it would be easiest to enforce both channels and sample rate for websocket. It’ll be 2 the majority of the time (if not always), and sample rate will always be 48k, so the increase in computation should be negligible
👍 2
c
Okay guys so I made a corresponding issue here https://github.com/livekit/egress/issues/147, I might try to make a related PR this weekend.
a
@careful-summer-11009 I think this will be covered in https://github.com/livekit/egress/pull/146, I had to refactor the audio pipeline to fix a different issue
c
awesome!
thanks