So this looks like a high quality, fast, natural, and open source TTS system in Python. A key candidate for an #NVDA#addon. Unfortunately, I find #nvdasr addon development super confusing. Is there a good template to start from or something? github.com/thewh1teagle/kokoro-onnx
GitHub - thewh1teagle/kokoro-onnx: TTS with kokoro and onnx runtime
TTS with kokoro and onnx runtime. Contribute to thewh1teagle/kokoro-onnx development by creating an account on GitHub.GitHub
Peter Vágner likes this.
reshared this
Samuel Proulx
in reply to Samuel Proulx • • •Here's a much longer example of the quality of speech Kokoro TTS generates. I really do think it might be a decent #NVDA addon. The weird pauses are because I'm just giving it a big long string, rather than chunking it like I should. It generates this in real time on CPU, and faster on GPU. The code to generate it is as follows:
import soundfile as sf
from kokoro_onnx import Kokoro
from onnxruntime import InferenceSession
session = InferenceSession("kokoro-v0_19.onnx", providers=["ROCMExecutionProvider", "CPUExecutionProvider"])
kokoro = Kokoro.from_session(session, "voices.json")
samples, sample_rate = kokoro.create(
"He wasn't sleeping very well, and he knew the people around him noticed, but he didn't know what to do about it. He had quietly gone to Madame Pomfrey, who had regretfully told him that Dreamless Sleep was highly addicting and that while she could give him the occasional dose, it would have to be spread out enough to prevent it from becoming addicting – meaning he could only take it one night out of every two weeks or so. It was one night more of productive sleep than he'd be getting otherwise, so he still did it, but it didn't help the larger issue. He wasn't under the effects of any nightmare-inducing Curses, potions, or other magical ailments, so there was nothing for Madame Pomfrey to do. The nightmares were coming from his own mind, and she was not a Mind-Healer. She'd offered to try and connect Harry with one, but when Harry discovered that it involved having someone else quite literally entering his mind with magic and helping him sort out things like trauma he couldn't. If Harry couldn't even tell Hermione the extent of what he'd suffered at the Dursley's, he wasn't about to let a stranger into his mind to see it. Let alone the 'adventures' of his Hogwarts years. So the nightmares persisted, and with the poor quality of sleep serving as the first domino, everything else slowly began to fall. His grades weren't slipping yet, but he was struggling with the study schedule Hermione had set out for them and doing his homework took more effort, more energy that he didn't have.", voice="af_sarah", speed=1.0, lang="en-us"
)
sf.write("audio.wav", samples, sample_rate)
print("Created audio.wav")
Serena 🏳️🌈
in reply to Samuel Proulx • • •Samuel Proulx likes this.
Andre Louis
in reply to Serena 🏳️🌈 • • •Samuel Proulx likes this.
Tamas G
in reply to Andre Louis • • •Samuel Proulx likes this.
Andre Louis
in reply to Tamas G • • •Sorry to hear about family emergencies, never nice to deal with. I hope things can be sorted out for the better.
Re slow CPU though, that's where I come in. I am right now even, using an Intel Core I5-3570K from 2012. It runs every synth very well, apart from Piper which it struggles with due to the neural aspect of it. If my machine can run... Whatever you guys end up coming up with (hopefully) then anything else should be a breeze.
Samuel Proulx likes this.
Winter blue tardis🇧🇬🇭🇺
in reply to Andre Louis • • •Samuel Proulx likes this.
Andre Louis
in reply to Winter blue tardis🇧🇬🇭🇺 • • •Samuel Proulx likes this.
Winter blue tardis🇧🇬🇭🇺
in reply to Andre Louis • • •Samuel Proulx likes this.
Winter blue tardis🇧🇬🇭🇺
in reply to Winter blue tardis🇧🇬🇭🇺 • • •Peter Vágner
in reply to Samuel Proulx • •Or which one is more likelly to get more support and be preffered.
github.com/mush42/optispeech
Samuel Proulx
in reply to Peter Vágner • • •Peter Vágner
in reply to Samuel Proulx • •Samuel Proulx likes this.
Samuel Proulx
in reply to Peter Vágner • • •