Live data from Hacker News

Speech Recognition and TTS in less than 500kb

github.com

81–90 of 101 posts

Re: Speech Recognition and TTS in less than 500kb

#82
post #78

Earlier quoted context omitted.

This is extremely dangerous and you should stop doing it. https://etsc.eu/tiny-proportion-of-drivers-understand-danger...

Talking on the phone is extremely dangerous? What are your thoughts on talking with a passenger? Is that something that people ought to stop doing? Drive in silence. 100% focus? Seems like an overreaction.

It's not my thoughts, it's simple facts.

All the studies show it's not an over-reaction, you're 400% more likely to have an accident. It is extremely dangerous and it's not an over-reaction, the more people do this, the more people die. It's simple maths. If you're doing extended programming sessions, you're not paying attention to the road like you should be.

And no, talking to a passenger is not as dangerous as it's a different cognitive load.

It'll take you 20 seconds to google this, please do and stop putting everyone else in jeopardy.

Re: Speech Recognition and TTS in less than 500kb

#83
post #43

Stt/tts systems always seem to me so promising, but I pretty much never use voice to interface with a computer. Sometimes instead of typing on my phone, I use a voice dictation. I would be keen to use voice to control Claude code, but I've always felt that the way I speak is different from the way I write good prompts. Fishing for anecdotes here, does anyone have any good tts/stt experiences?

What I want is a 1940s style “taking dictation” where the words I say go through a step where the goal is to create the text Im imagining. So if I say “… very significant, actually just significant…” what Claude Code receives is “…significant…”.

I built this myself with whisper -> “secretary” prompt -> Claude Code, but having the first two steps be interactive is really what I would want.

Re: Speech Recognition and TTS in less than 500kb

#84
post #43

Stt/tts systems always seem to me so promising, but I pretty much never use voice to interface with a computer. Sometimes instead of typing on my phone, I use a voice dictation. I would be keen to use voice to control Claude code, but I've always felt that the way I speak is different from the way I write good prompts. Fishing for anecdotes here, does anyone have any good tts/stt experiences?

What I want is a 1940s style “taking dictation” where the words I say go through a step where the goal is to create the text Im imagining. So if I say “… very significant, actually just significant…” what Claude Code receives is “…significant…”. I built this myself with whisper -> “secretary” prompt -> Claude Code, but having the first two steps be interactive is really what I would want.

I use dictation to drive Claude code frequently, and it’s never had a problem with stream of consciousness and retroactive correction. Maybe try just direct voice and see if you notice any difference versus pre-cleaning?

Re: Speech Recognition and TTS in less than 500kb

#85
I've a local dictation workflow for coding, and one thing I've learned is that transcription accuracy is only half or even less than half the problem now. The other half is latency. Once the delay gets low enough that you stop noticing it, voice input starts feeling much more natural. It'll be interesting to see where this lands compared to Whisper-based setups for continuous dictation

Re: Speech Recognition and TTS in less than 500kb

#86
post #84

Earlier quoted context omitted.

What I want is a 1940s style “taking dictation” where the words I say go through a step where the goal is to create the text Im imagining. So if I say “… very significant, actually just significant…” what Claude Code receives is “…significant…”. I built this myself with whisper -> “secretary” prompt -> Claude Code, but having the first two steps be interactive is really what I would want.

I use dictation to drive Claude code frequently, and it’s never had a problem with stream of consciousness and retroactive correction. Maybe try just direct voice and see if you notice any difference versus pre-cleaning?

Claude Code's speech recognition works so well for me, I was blown away the first time I tried it. I wish I knew what model they were using (I assume it's not in house since they've never talked about it).

I acknowledge this may just mean I haven't tried enough modern voice recognition systems. But I've used Whisper and I don't think it works nearly as well for real-time speech.

(I still don't tend to use voice mode in Claude Code because I find typing more comfortable.)

Re: Speech Recognition and TTS in less than 500kb

#87
post #76
post #63

Earlier quoted context omitted.

I've always dreamed of having the ability to just talk to my computer (in the right circumstances) so I actually worked in the field for many years. The main reason I never use speech recognition today is because I have zero interest of sending recordings of my voice to the servers of some global corporations. Running speech recognition and TTS locally is quite feasible, as projects like this one show.

If you want a local and open source option (MacOS only at the moment though), I've been happily using Keyscribe for dictation, which is built on Moonshine I believe. https://rsperko.github.io/keyscribe/

> local and open source option (MacOS only)

ouch - this is ironic in an extreme, given Apple's OS layers and anti-GPL efforts

next, personal computers that come with a secret OS that can read all RAM by remote command?

Re: Speech Recognition and TTS in less than 500kb

#88
post #66
post #29

So at that tiny 500kb size I imagine it could be compiled to web assembly, and run entirely in the browser right? Couldn’t find a link, is that hard to do?

Should be very doable. I ship a small CNN in a browser extension via onnxruntime-web and the model weights were never the bottleneck, the runtime was. The wasm backend adds a few MB of runtime before your first inference, so a 500kb model with a lean hand-rolled wasm build would actually beat most "tiny" browser ML deployments in total download. One gotcha if anyone wants this in a Chrome extension: MV3 requires 'was…

Yeah, I also found that for ultra low footprint models ORT is a big portion of the total payload, because it contains logic for general ONNX graph operations. In my case I found that ORT alone was 3.4MB over the wire, so I swapped it out for a tiny wasm that was 850x smaller and only contained the operations I needed: https://blog.lukesalamone.com/posts/creating-tiny-semantic-s...

Re: Speech Recognition and TTS in less than 500kb

#89
post #88
post #66

Earlier quoted context omitted.

Should be very doable. I ship a small CNN in a browser extension via onnxruntime-web and the model weights were never the bottleneck, the runtime was. The wasm backend adds a few MB of runtime before your first inference, so a 500kb model with a lean hand-rolled wasm build would actually beat most "tiny" browser ML deployments in total download. One gotcha if anyone wants this in a Chrome extension: MV3 requires 'was…

Yeah, I also found that for ultra low footprint models ORT is a big portion of the total payload, because it contains logic for general ONNX graph operations. In my case I found that ORT alone was 3.4MB over the wire, so I swapped it out for a tiny wasm that was 850x smaller and only contained the operations I needed: https://blog.lukesalamone.com/posts/creating-tiny-semantic-s...

did you skip simd just because the model's tiny? naive conv perf is honestly the only reason i haven't done exactly this for the cnn

Re: Speech Recognition and TTS in less than 500kb

#90
post #89
post #88

Earlier quoted context omitted.

Yeah, I also found that for ultra low footprint models ORT is a big portion of the total payload, because it contains logic for general ONNX graph operations. In my case I found that ORT alone was 3.4MB over the wire, so I swapped it out for a tiny wasm that was 850x smaller and only contained the operations I needed: https://blog.lukesalamone.com/posts/creating-tiny-semantic-s...

did you skip simd just because the model's tiny? naive conv perf is honestly the only reason i haven't done exactly this for the cnn

Yeah, the model is small enough that inference is already basically instant for my usecase (only 6 transformer layers for the blog search).
Post reply on HN