Livekit has done in incredible job providing such ...
# agents
c
Livekit has done in incredible job providing such an amazing SDK. However, the Python implementation is far ahead from the Node.js. I'd like to invite and encourage the community and maintainers of LiveKit to invest more time in the Livekit JS/Node.js SDK. Specially because, Node.js outperforms Python in handling high-volume, concurrent API requests and realtime environments. There are several benchmarks online and this is not a surprise. Python is great for data intense applications. So please, let's bring the LiveKit Agent JS up to speed and create a better Livekit product.
❤️ 1
👀 1
➕ 2
@rough-gpu-50664 @refined-appointment-81829 @bitter-ghost-46918 Would love your attention here. What can I (we) do to help?
a
What features in node are you looking for?
c
@aloof-notebook-98064 There are several things, just go to the documentation and you'll see several places with
Python Only
, things like custom TTS for Realtime, evals, and several others.
@aloof-notebook-98064 This a feature we're eager to test: https://github.com/livekit/agents-js/pull/814, would love your review
👀 1
e
Is anyone seeing a practical difference in latency or CPU usage between the Python SDK and TypeScript SDK, though? The benchmark linked above tests performance from a single process, but the LK SDK spawns a new process (and event loop) for each session. FWIW, we we switched to the Python SDK and it has been much more stable. We do see some issues with higher latency if there are more concurrent calls, but we're not sure why that is.
🤔 1
c
What I noticed that the Python SDK is more maintained, have more usage which drives code quality up, less bugs etc. I'm sure the JS SDK will be more performant once people start using it more, and bugs fixed.
👍 1
c
@early-fall-57331 definetly, we have issues with latency and CPU when placing several concurrent calls, specially when using VAD and Turn Detector. We can handle 4x - 5x more calls in the same server using Node JS, under the same circumpstances. I'm curious, what's your use case, so that you prefer Python even thought you have latency when having concurrent calls?
e
@cool-baker-11020 Interesting. We're hosting on LiveKit Cloud with about 200 phone calls per day right now. We initially launched with the TypeScript SDK, but we observed way too much instability — for every 20 calls or so we saw 1 call with a failure related to the TypeScript implementation. When we launched with the Python SDK, all of that went away and we see a random issue maybe every few days. We did see problems when we tried to move more calls to our LiveKit agent, but we haven't figured out exactly what happened. We use Deepgram Flux, so we don't use VAD or turn detector. How exactly are your calls impacted when you have "issues with latency and CPU?" We saw more than just increased latency — we saw conversations break down because the agent would respond to something the user said 30 seconds ago, as if some/all of the queues/streams were severely behind realtime. Is that something you saw?
c
@early-fall-57331 Yes, it was exactly what you're describing, plus Background office noise not loading, plus really big delays on turn detection... We haven't gone live yet, we just saw that on load testing... but with no big loads of calls we experimented what you mentioned, so we discarded Python. In our analysis we thought it was because of the way Python imports libraries. It specially took a lot of time in initiating a new call..... Just one final question... do you rememeber which version of agents-js SDK were you using? It was 0.x or 1.x?
👍 1
e
We were using 1.x
c
What's the setup you guys are using? STT + TTS or Realtime?
e
Deepgram Flux for STT and Aura 2 for TTS
c
got it.
c
STT (Deepgram v2) + TTS (11labs)
c
Have you guys tried Realtime + TTS for lower latency?
c
Not really, but actually biggest issues with Python were not latency between turns, but calls not being answered.... background noise not being loaded... turn detector processing audio which such delay that leaded to non-sense conversations...