Skip to content

Conversation

@duj12
Copy link

@duj12 duj12 commented Oct 14, 2025

whisperlivekit-server   --pcm-input

python .\run_client.py

output as follows:

2025-10-14 18:11:25,376: Connected to ws://localhost:8000/asr
2025-10-14 18:11:27,416: Streaming jfk.flac (11.00s, sr=16000, chunk=1.00s)

type: config
0:00:00 - 0:00:10 Speaker 1:  And so, my fellow Americans. Ask not. What your country can do for you. Ask what you can do for your country
type: ready_to_stop

========== METRICS ==========
First Token Latency: 3.166s
Total Time: 4.820s
Real Time Factor: 0.438
=============================

I wonder why the latency is so high? Is there something wrong?
Dear reviewer, can you check and explain, please?

Thanks.

@sh1man999
Copy link

Yeah, I don't understand why it works so slowly either, even though I have an RTX 4080 video card.

@Eirikur
Copy link

Eirikur commented Dec 7, 2025

Latency isn't bad in my testing on a 10th-generation i7 with no GPU. I'm pretty shocked.
I have the problem that this nice new command-line client doesn't work for me b ecause: sample rate 16000 is assumed in both client and server. In the file input side of the "if microphone or if file" branch, it gets the real mic sample rate from the file header. Ooops, microphone streams don't have a header. The developer understands that but just tells the server it's 1600, which it would almost never be. Both of the USB mics on my desk are 48000, with no controls on the mic. The web client works perfectly for me with these mics. I could fix this if I had more low-level experience with these APIs. I tried the librosa.resample() call used in the file case, on the mic, but the examples show one Python parameter list and the ReadtheDocs current? doc show a C-level long parameter list. The error I get is not consistent with either parameter list. I'm enjoying this, but I'm frustrated because Whisper works so very well and LiveKit seems to do the interactive thing really well. Error:
File "/home/eh/Proj/WhisperLiveKit/myfrontend/wlk-client-fixed.py", line 24, in callback
data_16000 = librosa.resample(indata.copy(), 48000, 16000)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: resample() takes 1 positional argument but 3 were given

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants