Speech Recognition and TTS in less than 500kb

(github.com)

461 points | by petewarden 4 days ago

29 comments

  • almogo 4 hours ago
    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?

    • arend321 3 hours ago
      I do a ton of coding (codex) with a tts/stt wrapper. During walks, cycling, in the car. Not every task is suited to this style of interaction, but many are. Long form codex replies are condensed, code blocks are suppressed all in the name of making it work for tts feedback. So it works best on well defined projects with guardrails, where you know the agent can perform well.
      • hathawsh 1 hour ago
        That's fantastic. I have long, winding trails near me also and one of these days I also want to start prompting a coding agent on my bike with a headset. Do you recommend any particular type of headset?

        Edit: never mind, I see you already suggested the Shokz OpenComm2 in another comment. Thanks!

        • dfgtyu65r 26 minutes ago
          This is so alien to me. Why not plug into the machine matrix when out in the great outdoors enjoying sublime nature? Why not!
          • arend321 10 minutes ago
            It's not a replacement for being outdoors, connecting with nature. It replaces indoor desk bound office work.
      • VBprogrammer 1 hour ago
        I can't honestly think of a case where this would be remotely useful. This goes somehow beyond vibe coding to vibe interaction, where the only feedback comes via the AI. I'd love to see a concrete example of this working practice.
      • fragmede 3 hours ago
        During cycling! Do you have a phone mount on your bike that you use while biking or is it all in-ear?
        • arend321 2 hours ago
          I have my phone in my pocket, no screen interaction is required. I use a headset (Shokz OpenComm2) with wind muff (when cycling). I made an Android app that listens for codex turn-complete or intermediate updates and plays them back to me. My answer is transcribed and pasted back to the relevant codex (tmux) session on the server (which I can select by voice) a tiny layer helps with things like /new, /plan, answer selection, etc.
        • cafebabbe 3 hours ago
          ... I cannot think of an activity less suitable for coding (except scuba diving)

          I would die In minutes

          • arend321 2 hours ago
            Think long winding, quiet, dedicated cycling roads in forested areas and natural parks. Not busy roads shared with cars and lorries.
      • mattmanser 2 hours ago
        This is extremely dangerous and you should stop doing it.

        https://etsc.eu/tiny-proportion-of-drivers-understand-danger...

    • kleiba2 1 hour ago
      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.

    • k9294 3 hours ago
      I'm founder of ottex.ai, I use stt pretty much all the time when work with AI and quite often for communications to draft emails and chat messages.

      I started ottex half a year ago after I tested gemini 2.5 flash native audio support. I was blown away by the quality of transcripts and decided to built an app to use it myself.

      Currently the default model in the app is Gemini 3 flash, but you can connect to 9 providers and God knows how many models to play with.

      I would suggest you to try this models for ai prompting:

      - Gemini 3 / 3.5 flash - Soniox rtt v5 - Mistral transcribe v2 - assembly 3.5 pro

    • DrSiemer 3 hours ago
      One of my side projects is a tool that lets you control your entire system with STT. It's built on Whisper and supports hot swapping custom profiles, so you can add easy commands for any software.

      I intend to use it to work on low stakes vibe coding projects while I'm doing other stuff. Todays LLMs are a lot better at interpreting rambling dictation with mid-message corrections.

      There are a few paid programs out there that do the same, but they made my vibe slop sense tingle and are not aimed at development.

    • Joel_Mckay 3 hours ago
      Industry leading Interactive Voice Response systems have become very good at filling in ambiguous information from context, and modulating pronunciation to Ape emotional information.

      However, being able to interact with these natural language systems in uncontrolled settings is still a fools errand. For STT, there is also regional dialect, slang, and individual differences.

      Witnessing blind users hit unrecognizable reading-speeds on old Gordon 8 TTS systems was surprising. I learned people adapt to imperfect systems pretty quickly. =3

    • fragmede 3 hours ago
      For STT, wispr flow has a generous free tier. For TTS, I have Claude read out loud what it just finished as a stop hook, so I know which claude finished up.
    • scoriiu 1 hour ago
      [flagged]
  • clayhacks 13 hours ago
    I made a little python wrapper around it to serve an HTTP endpoint that’s OpenAI/elevenlabs compatible https://github.com/clayrosenthal/bootlegger
  • sgt 4 days ago
    Quick link to the video where he demos it: https://www.youtube.com/watch?v=kMliOFYBiz4
    • andai 3 hours ago
      Is that Microsoft Sam? :)

      (Also, I know it's besides the point but this might be the most painful way to connect to Wifi physically possible. "Make normal everyday tasks slow, tedious and painful" is a bit of an odd choice for a product demo.)

      Say, speaking of Sam, what were the memory requirements for SAM (Software Automatic Mouth) on C64. I guess they were not more than 64K? Although, the bulk here is probably for the speech recognition, not the TTS. (And this one does sound a little nicer :)

      Browser demo of a reversed SAM:

      https://discordier.github.io/sam/index.html

      • raphlinus 3 hours ago
        There are two Sams here, the Microsoft one and the C64 one. I don't believe there's any connection between the two other than the name.

        According to [1], the weight of a modern runnable version is around 39k.

        The ratio of how good it sounds compared to how much computing power it uses is ridiculous. The C64 has ballpark 3 orders of magnitude less CPU throughput as an RP2350, and the codebase uses an impressive array of tricks to do actual formant synthesis (barely) and a pretty refined form of Elovitz text to phoneme conversion. One of my favorite tricks is its up and down bouncy pitch, which is not random, but based on the opposite contour as the first formant. It's simplistic but enough to make it not sound like a robotic monotone.

        I've been playing around with this some myself and SAM is an inspiration, along with other landmark systems like MITalk (predecessor to DECtalk), SP0256, and other. I believe it's possible to use modern techniques to get pretty good sounding speech in, say, 64k and 10% of the throughput of a RP2350. It's really cool to see projects like OP, especially under permissive license.

        [1]: https://simulationcorner.net/index.php?page=sam

    • JSR_FDED 6 hours ago
      Amazing that this works. As an aside, and I appreciate this is just a demo, if the use case is to get a device to join a WiFi network - would a single or double line lcd with 3 buttons not be cheaper than 520KB?
      • pxx 5 hours ago
        the target rp2350 is a sub-$1 chip. a 16x2 LCD module is over $1. but more importantly, you might have this much ram sitting around unused on whatever you're building anyway.
    • 8bitsrule 8 hours ago
      Thanks for that ... impressive!
  • nutanc 5 hours ago
    This is awesome. I am trying to build a full scale ASR system within 20-25MB. Now that we have Claude code to run experiments, I have started running some experiments. Promising results so far. First realization is that you can capture the nuances of speech in just 3300 embedding vectors(786d). This sequence can be decoded with a small CTC system to get text. Next experiments are on reducing the 768 dimension space into a 64D space. Thats also show some promising results. Hooking up my system so that the agent blogs the results everyday[1]. So my research "claw" setup does the experiments and posts results which I check in the morning and adjust the experiment direction as needed. Its not fully automated yet, but almost there.

    [1] https://blog.trulm.com/posts/speech-as-independent-parts/

    • lunixbochs 4 hours ago
      I think Google's Conformer paper is SOTA at the <30M model size, where I think they put an incredible amount of flops into a 10M param model to reach around 2% lsc clean (the whole model and RNN decoder were trained domain specific to librispeech here).

      I think my small Talon models are next, around 3% lsc clean at ~28M (greedy CTC decoding, no external encoder, no LM, not trained in a domain specific way). I reached around 6.5% at 10M.

      I've been working on some new baselines I want to release soon as public artifacts. This article is inspiring me to try pushing the param size down a bit. I suspect we can do large vocabulary end to end in the <5M range.

  • jedberg 12 hours ago
    Do you have any accuracy benchmarks?

    I’ve worked in this space. TTS in a small footprint isn’t the hard part —- it’s doing it accurately that’s hard.

    Although for the use cases OP is targeting, lower accuracy may be good enough!

    • amelius 12 hours ago
      > I’ve worked in this space. TTS in a small footprint isn’t the hard part —- it’s doing it accurately that’s hard.

      This actually holds for everything in AI.

    • kamranjon 12 hours ago
      If you look at this chart here it seems the tiny model has a WER of ~12%… not sure about the micro model:

      https://github.com/moonshine-ai/moonshine#when-should-you-ch...

      • yorwba 11 hours ago
        That's the error rate for STT, not TTS. TTS is generally easier than STT because you only need to produce one valid pronunciation and don't need to handle variation within and between individuals.
  • smcameron 11 hours ago
    For TTS I wonder how this compares to nanotts[1] with the en-GB voice, which is sort of unreasonably good.

    [1] https://github.com/gmn/nanotts

  • senkora 13 hours ago
    Wow, it seems like this might beat out flite for very-low-memory TTS? I ended up abandoning a project of mine because I couldn't get high enough quality or low enough memory usage out of flite, so I'm very excited to try this out.

    Flite for comparison: https://github.com/festvox/flite

  • orliesaurus 12 hours ago
    I installed the command line version using uv

        uv init
        uv add moonshine-voice
        uv run moonshine-voice mic --language en
    
    super nice to be able to run it to test it like this

    good job on a clear readme.md tbh

    • pwgawron 11 hours ago
      `uvx moonshine-voice mic --language en` That is even simpler.
  • stanko 2 hours ago
    This is really impressive.

    If I get time, I would like to try compiling it to WASM. This would allow me to swap my robot poet’s native browser voice synthesis for it. Not sure if it is worth it, but it will be fun to play around with.

    Edit: typo

    [0] https://muffinman.io/bard/

  • gitgud 9 hours ago
    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?

    • hahahaa 9 hours ago
      500k memory but not sure about disk.
    • scoriiu 1 hour ago
      [dead]
  • Kyuren 1 hour ago
    This makes me want to have a server room with 5 of these around my house and control everything that house in LabRats
  • t0mpr1c3 12 hours ago
    Very cool. I've done TTS on a 32K Arduino but it was pretty croaky. https://youtu.be/ErGDboTpwM0
  • userbinator 10 hours ago
    This looks like an extreme point for AI-based TTS, as formant/tract modeling synths tend to be more accurate if you want TTS in a tiny amount of compute, but sound distinctly robotic.

    TTS (neural diphone synth @ 16 kHz) ~1.8 MiB voice pack

    This is in the realm of Microsoft Sam.

  • agnishom 2 hours ago
    Will it be able to understand my English with an Indian accent?
  • dwa3592 11 hours ago
    this is good to see. i also trained a stt under 500kb for sub dollar chips. it had about 20 words that it could understand(like start, stop, left, right, go, up etc) and then the spell mode where you could say the word spell and then say the individual english alphabets and close with spell. it was super fun to work on. these tend to be extremely unstable though, like confusion between p and t (at least for my accent). will have to try this one now.
    • schoen 6 hours ago
      Could you get people to use the NATO phonetic alphabet for the spelling part? I suppose a challenge is that many people don't know the whole thing, even if they're aware it exists.
    • NooneAtAll3 11 hours ago
      I remember someone training smart kettle to use its speaker as microphone
    • laidoffamazon 10 hours ago
      IIRC the Alexa enabled voice remotes also used a similarly small model though perhaps not this small
  • 1vuio0pswjnm7 6 hours ago
  • jjcm 10 hours ago
    The voice activity detection alone here is compelling - very useful for doing things like highlighting a speaker who's transmitting in realtime. At that rate the impact on perf will be so minimal that you could easily run it in the browser across devices.
  • stfurkan 12 hours ago
    It looks great, thank you! I'll see if I can use it for my in browser AI assistant project's ( https://aidekin.com ) voice part. It's currently using Nemotron-3.5-ASR and supertonic-3 but overall it requires 1.2gb download.
  • walrus01 9 hours ago
    Given the tiny size of this, I wonder about possible future integration with esphome compatible hardware

    https://esphome.io/

    • KennyBlanken 8 hours ago
      I suppose, but for home automation, esps are best for getting the audio to something more powerful. If this lets a raspberry pi do voice recognition really fast, that alone is worth it.
  • nserrino 9 hours ago
    Voice is one of the most latency-sensitive modalities in AI. Moonshine is doing awesome stuff
  • irfan_99 10 hours ago
    Is the dataset open
  • sgt 4 days ago
    Great work!
  • 0xnyn 13 hours ago
    ngl, it looks incredible
  • irfan_99 10 hours ago
    very nice I love it
  • jkwang 2 hours ago
    [flagged]
  • Ecko123 3 hours ago
    [dead]
  • zarmin 13 hours ago
    Thank you for this. I love your work on Curb Your Enthusiasm.