(i googled heck out of this topic, so i'm writing my first forum post, hello)
i want to generate commenter's voice in game (for example 'player one did 3 attack' etc.), there's lots of text-to-speech tools (speech synthesisers, voice generators), but mostly no any api for lua (there's lua-espeak, but it doesn't work), so question — is there any possibility to generate speech in love2d game or is it too weird and overlycomplicated?
it doesn't have to be super smooth and cool, just any simple generated voice (google translate for example) will do, important thing is that stats are randomly generated, so it isn't possible pre-generate audio files, it should be something that you can implement in a game package
if it is too dumb/too much or whatever — it's okay, i'm just doing my research and if the answer is no it's also cool
thank you
voice generator
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
-
- Party member
- Posts: 548
- Joined: Wed Oct 05, 2016 11:53 am
Re: voice generator
You could look up if there are any text-to-speech libraries that are made with C, or provide a C API you could interface with via luajit's FFI. That's probably a better bet than trying to find a lua one.
However, depending on the exact needs, you could possibly make do by pre-generating various short clips ("player", "1", "3", "did", "attack"), and play them back-to-back. If there are no huge amounts of permutations to consider, like damage values are relatively low (ie. don't have to make hundreds of clips for number values, but only a handful), that might be an entirely fine way to go about it. The line delivery will probably not be as smooth as a proper TTS engine, but you could make the generated clips sound robotic, maybe with one or two variations for each clip, and get alright results.
However, depending on the exact needs, you could possibly make do by pre-generating various short clips ("player", "1", "3", "did", "attack"), and play them back-to-back. If there are no huge amounts of permutations to consider, like damage values are relatively low (ie. don't have to make hundreds of clips for number values, but only a handful), that might be an entirely fine way to go about it. The line delivery will probably not be as smooth as a proper TTS engine, but you could make the generated clips sound robotic, maybe with one or two variations for each clip, and get alright results.
- zorg
- Party member
- Posts: 3465
- Joined: Thu Dec 13, 2012 2:55 pm
- Location: Absurdistan, Hungary
- Contact:
Re: voice generator
If you don't want realism, i guess coding a voice generator that can "say" arbitrary sounds (without external libraries) is possible, and it wouldn't be too taxing (comparatively) even if it's written in lua, but the quality is really going to be dependent on how much of the theories relating to speech synthesis you know and how detailed you want the implementation to be; There's also a gigantic difference between coding a speech synth, and coding something that turns arbitrary text (*in one language, with 100% correct grammar and no non-standard (e.g. slang) words) into data that the synth can use to actually turn into audio; imo the text converter is harder than the synthesizer part mainly because natural languages are hella complicated.
There is a marked difference between things like:
- 15.io's neural net trained synths
- Google Translate's TTS-es
- The cute bendy synth beeps in Celeste
- Concatenating chopped samples, like what was discussed above.
(roughly in reversed order of complexity)
It really depends on your exact needs.
There is a marked difference between things like:
- 15.io's neural net trained synths
- Google Translate's TTS-es
- The cute bendy synth beeps in Celeste
- Concatenating chopped samples, like what was discussed above.
(roughly in reversed order of complexity)
It really depends on your exact needs.
Me and my stuff True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
Re: voice generator
thank you for the info !
yeah, i researched and found nice opensource tts-engine 'flite', next step is to understand 'c' basics to be able to use it from 'fii'
any thoughts on using 'flite' with 'fii'/love will be highly appreciated
yeah, i researched and found nice opensource tts-engine 'flite', next step is to understand 'c' basics to be able to use it from 'fii'
any thoughts on using 'flite' with 'fii'/love will be highly appreciated
Who is online
Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 5 guests