Live data from Hacker News

Show HN: Real-time AI Voice Chat at ~500ms Latency

github.com

121–130 of 238 posts

Re: Show HN: Real-time AI Voice Chat at ~500ms Latency

#121
post #35

I did some research into this about a year ago. Some fun facts I learned: - The median delay between speakers in a human to human conversation is zero milliseconds. In other words, about 1/2 the time, one speaker interrupts the other, making the delay negative. - Humans don't care about delays when speaking to known AIs. They assume the AI will need time to think. Most users will qualify a 1000ms delay is acceptable…

> where it processes the incoming speech in real time and responds when it's confident it has heard enough to understand the meaning. I'm not an expert on LLMs but that feels completely counter to how LLMs work (again, _not_ an expert). I don't know how we can "stream" the input and have the generation update/change in real time, at least not in 1 model. Then again, what is a "model"? Maybe your model fires off multi…

Think of it as generating a constantly streaming infinite list of latents. These latents are basically decoded to a tuple [time_until_my_turn(latent_t), audio(latent_t)]. You can train it to minimize the error of its time_until_my_turn predictions from ground truth of training samples, as well as the quality of the audio generated. Basically a change-point prediction model. Ilya Sutskever (among others) worked on something like this long ago, it might have inspired OpenAI's advanced voice models:

> Sequence-to-sequence models with soft attention had significant success in machine translation, speech recognition, and question answering. Though capable and easy to use, they require that the entirety of the input sequence is available at the beginning of inference, an assumption that is not valid for instantaneous translation and speech recognition. To address this problem, we present a new method for solving sequence-to-sequence problems using hard online alignments instead of soft offline alignments. The online alignments model is able to start producing outputs without the need to first process the entire input sequence. A highly accurate online sequence-to-sequence model is useful because it can be used to build an accurate voice-based instantaneous translator. Our model uses hard binary stochastic decisions to select the timesteps at which outputs will be produced. The model is trained to produce these stochastic decisions using a standard policy gradient method. In our experiments, we show that this model achieves encouraging performance on TIMIT and Wall Street Journal (WSJ) speech recognition datasets.

https://arxiv.org/abs/1608.01281

Re: Show HN: Real-time AI Voice Chat at ~500ms Latency

#122
Cool for a weekend project, but honestly ChatGPT is still kinda shit at dialogues. I wonder if that's the issue with technology or OpenAI's fine-tuning (and suspect the latter), but it cannot talk like normal people do: shut up if it has nothing to add of value, ask reasonable follow-up questions if user doesn't understand something or there's ambiguity in the question. Also, on topic of follow-up questions: I don't remember which update introduced that attempt to increase engagement by finishing every post with stupid irrelevant follow-up question, but it's really annoying. It also works on me, despite hating ChatGPT it's kinda an instinct to treat humanly something that speaks vaguely like a human.

Re: Show HN: Real-time AI Voice Chat at ~500ms Latency

#123
post #2

I built RealtimeVoiceChat because I was frustrated with the latency in most voice AI interactions. This is an open-source (MIT license) system designed for real-time, local voice conversations with LLMs. Quick Demo Video (50s): https://www.youtube.com/watch?v=HM_IQuuuPX8 The goal is to get closer to natural conversation speed. It uses audio chunk streaming over WebSockets, RealtimeSTT (based on Whisper), and Realtime…

Can you explain more about the "Coqui XTTS Lasinya" models that the code is using? What are these, and how were they trained/finetuned? I'm assuming you're the one who uploaded them to huggingface, but there's no model card or README https://huggingface.co/KoljaB/XTTS_Models In case it's not clear, I'm talking about the models referenced here. https://github.com/KoljaB/RealtimeVoiceChat/blob/main/code/a...

https://huggingface.co/coqui/XTTS-v2

Re: Show HN: Real-time AI Voice Chat at ~500ms Latency

#125
Maybe of interest, I built and open-sourced a similar (web-based) end-to-end voice project last year for an AMD Hackathon: https://github.com/lhl/voicechat2

As a submission for an AMD Hackathon, one big thing is that I tested all the components to work with RDNA3 cards. It's built to allow for swappable components for the SRT, LLM, TTS (the tricky stuff was making websockets work and doing some sentence-based interleaving to lower latency).

Here's a full write up on the project: https://www.hackster.io/lhl/voicechat2-local-ai-voice-chat-4...

(I've don't really have time to maintain that project, but it can be a good starting point for anyone that's looking to hack their own thing together.)

Re: Show HN: Real-time AI Voice Chat at ~500ms Latency

#126
post #34

Earlier quoted context omitted.

alright, dumb question. (1) I assume these things can do multiple languages (2) Given (1), can you strip all the languages you aren't using and speed things up?

Actually good question. I'd say probably not. You can't easily "unlearn" things from the model weights (and even if this alone doesn't help). You could retrain/finetune the model heavily on a single language but again that alone does not speed up inference. To gain speed you'd have to bring the parameter count down and train the model from scratch with a single language only. That might work but it's also quite proba…

I don't know what I'm talking about, but could you use distillation techniques?

Re: Show HN: Real-time AI Voice Chat at ~500ms Latency

#127

Saying this as a user of these tools (openai, Google voice chat etc). These are fast yes, but they don't allow talking naturally with pauses. When we talk, we take long and small pauses for thinking or for other reasons. With these tools, AI starts taking as soon as we stop. Happens both in text and voice chat tools. I saw a demo on twitter a few weeks back where AI was waiting for the person to actually finish what…

This is called turn detection, and there are some great tools coming out to solve this recently. (One user mentioned Livekit’s turn detection model). I think in a years time we will see dramatic improvement.

Re: Show HN: Real-time AI Voice Chat at ~500ms Latency

#128
post #19

Earlier quoted context omitted.

Neat! I'm already using openwebui/ollama with a 7900 xtx but the STT and TTS parts don't seem to work with it yet: 2025-05-05 20:53:15,808] [WARNING] [real_accelerator.py:194:get_accelerator] Setting accelerator to CPU. If you have GPU or other accelerator, we were unable to detect it. Error loading model for checkpoint ./models/Lasinya: This op had not been implemented on CPU backend.

I've given up trying to locally use LLMs on AMD

Basically anything llama.cpp (Vulkan backend) should work out of the box w/o much fuss (LM Studio, Ollama, etc).

The HIP backend can have a big prefill speed boost on some architectures (high-end RDNA3 for example). For everything else, I keep notes here: https://llm-tracker.info/howto/AMD-GPUs

Re: Show HN: Real-time AI Voice Chat at ~500ms Latency

#129
post #5

Earlier quoted context omitted.

Maybe we should settle on some special sound or word which officially signals that we're making a pause for whatever reason, but that we intend to continue with dictating in a couple of seconds. Like "Hmm, wait".

Need some vocal version of “heredoc”

"Hello AI, over", "Hello human, over". :)

Oh, wait: "How do I iterate over a list-", "Iteration is a process where..." :p

Re: Show HN: Real-time AI Voice Chat at ~500ms Latency

#130
post #122

Cool for a weekend project, but honestly ChatGPT is still kinda shit at dialogues. I wonder if that's the issue with technology or OpenAI's fine-tuning (and suspect the latter), but it cannot talk like normal people do: shut up if it has nothing to add of value, ask reasonable follow-up questions if user doesn't understand something or there's ambiguity in the question. Also, on topic of follow-up questions: I don't…

Do you hate any of the other models less?
Post reply on HN