CC: Tweaked

CC: Tweaked

42M Downloads

TTS support for speakers

awesomebossdj7 opened this issue ยท 6 comments

commented

It would be cool if the speaker had a built in TTS program, kind of like how the speaker worked in peripherals plus plus

Useful information to include:

  • Explanation of how the feature/change should work.
  • Some rationale/use case for a feature. My general approach to designing new features is to ask yourself "what issue are we trying to solve" and then "is this the best way to solve this issue?".
commented

OwO

commented

So I did look at this many months ago, and it's pretty tricky to do. There's basically two ways of doing TTS in Minecraft:

  • Use an external web service to generate audio: This is what Peripherals++ did. However, since then, I think there's very few reliable services which still work and don't have aggressive rate limits.

    This is understandable (these things cost money to run), but makes it quite hard to find something we can use within CC.

  • Bundle a TTS library: This is what Computronics did (with MaryTTS). The main problem with this is that the libraries to do this are large (flite, which is probably the smallest, is would add 10MB to our jar). As such, it's hard to justify bundling them with CC:T.

I wonder if the "best" solution is for someone to build their own web service for generating TTS, which spits out DFPWM audio. This means you could use speaker's existing audio support, and it wouldn't require any changes to the mod. It'd probably be quite easy to do this, and I imagine a fairly fun weekend project!

commented

Successfully nerd sniped myself, this kinda works, albeit with terrible audio quality.

commented

heeheeheeha grrr...

commented

Hi @SquidDev, great work on this.
Just wondering, since you are using espeak-ng, if the language selection could be per request.
Maybe if a specific http header is specified it uses that language, if not defaults to the English one you chose.

commented

Yeah, could probably pass the language in the query string. I don't think changing the language causes memory leaks, though probably worth checking first.