4 ms·
Show HN: A simple text to speech synthesizer
- ksaj 5y agoIf you view source, you'll notice the site isn't really doing anything. It's been around since 2013 in Chrome, so I'm actually surprised it's the first time I've seen it. Here's a page that tells you just about everything you need to know to do this yourself. https://developers.google.com/web/updates/2014/01/Web-apps-that-talk-Introduction-to-the-Speech-Synthesis-API https://developers.google.com/web/updates/2014/01/Web-apps-t...
- westcort 5y agoThat is a valid criticism, but this is still a functional resource. I did attempt to create a TTS system that was fully local to the website and you can try it here: https://locserendipity.com/sim/voice.html https://locserendipity.com/sim/voice.html
- ksaj 5y agoThat wasn't really meant to be a criticism. I was surprised which is why I pointed it out. I spent quite some time fussing about with software like Mbrola, eSpeak and a bunch of others. If I knew about this then, it would have saved me a lot of time. Thanks for the link, too. That's kinda cool, even though I don't know what format the phonemes are supposed to be in. I actually have a Raspberry Pi version of SAM (Software Automatic Mouth) that was quite popular with Commodore 64. It can read text and also phonemes. The manual has a very extensive list of phonemes. I don't know if they are compatible with anything else, though.
- westcort 5y agoI didn't know that Raspberry Pi had phonemes built in. I actually recorded the phonemes from my own voice. Is there somewhere I can download smaller phonemes? One of my long-term goals is to create a text to speech system that can concatenate the phonemes as base64 and can create a small mp3 with intelligible speech.
- ksaj 5y agoNo, it doesn't come with Raspberry Pi. Someone made a clone of it (probably reverse engineered, or from original source, because its functionality is exact), and I compiled it for RPi and put it on github with the manual I got from archive.org. Here's the link. You might get some mileage from the phoneme tables in the manual. https://github.com/ksaj/pi-sam https://github.com/ksaj/pi-sam The executable size is so tiny, given what it does. There's a link to the source in the README so you can see how that was pulled off. You can use the .sh scripts to see what they look like in practice. PS: This is genuine spaghetti code. The gratuitous use of goto is almost alarming. But it totally works, so who am I to judge?