User avatar
🇨🇦Samuel Proulx🇨🇦 @fastfinge@interfree.ca
Admin
completely blind computer geek, lover of science fiction and fantasy (especially LitRPG). I work in accessibility, but my opinions are my own, not that of my employer. Fandoms: Harry Potter, Discworld, My Little Pony: Friendship is Magic, Buffy, Dead Like Me, Glee, and I'll read fanfic of pretty much anything that crosses over with one of those.
keyoxide: aspe:keyoxide.org:PFAQDLXSBNO7MZRNPUMWWKQ7TQ
Location
Ottawa
Birthday
1987-12-20
Pronouns
he/him (EN)
matrix @fastfinge:interfree.ca
keyoxide aspe:keyoxide.org:PFAQDLXSBNO7MZRNPUMWWKQ7TQ
User avatar
🇨🇦Samuel Proulx🇨🇦 @fastfinge@interfree.ca
1y
@tspivey That gives me: TypeError: GlobalPlugin.script_toggleX.<locals>.<lambda>() got an unexpected keyword argument 'normalize'
User avatar
🇨🇦Samuel Proulx🇨🇦 @fastfinge@interfree.ca
1y
@tspivey Yeah, I'm increasingly convinced that @x0 is correct, and this would need to be part of Sonata if this was going to happen at all. They seem to have solved those issues mostly.
User avatar
🇨🇦Samuel Proulx🇨🇦 @fastfinge@interfree.ca
1y
@tspivey So if I cursor up onto a line with fifty thousand characters, that's why it just dies. Ah.
User avatar
🇨🇦Samuel Proulx🇨🇦 @fastfinge@interfree.ca
1y
@tspivey Also, how does NVDA chunk text it passes to a synth? Even that's not really documented anywhere LOL. I think Kokoro inference would need running in its own thread, so the thread could be killed when we wanted to stop speech rather than generating extra samples, and a knew thread could be started so you could start the new speech quickly, like when someone's pressing down arrow rapidly. But I don't have the time, and I'm not smart enough.
User avatar
🇨🇦Samuel Proulx🇨🇦 @fastfinge@interfree.ca
1y
@tspivey That's why you start a session, so the model stays loaded in memory. Then I think you can actually stream output from onnxruntime bite by bite, I'm just not sure how.
User avatar
🇨🇦Samuel Proulx🇨🇦 @fastfinge@interfree.ca
1y
@tspivey Hmmm, I assumed that was just because I was passing an enormous text block with multiple sentences. Hadn't tested with single sentences yet.
User avatar
🇨🇦Samuel Proulx🇨🇦 @fastfinge@interfree.ca
1y
@tspivey Wouldn't you just stop playing the samples it gave you?
User avatar
🇨🇦Samuel Proulx🇨🇦 @fastfinge@interfree.ca
1y
Yeah, I am deeply confused about how buffers work and how to indicate when speaking is complete and do indexing and so-on. If this is going to be an addon, someone else will have to do it.
User avatar
🇨🇦Samuel Proulx🇨🇦 @fastfinge@interfree.ca
1y
For the curious, here are all the available Kokoro English voices reading the same text: share.interfree.ca/app/open/3ca2Pb7oiFL-4PXSMD6qMeT-Pb1wqmSJyid-NP7MAAJS12s?view=1
User avatar
🇨🇦Samuel Proulx🇨🇦 @fastfinge@interfree.ca
1y
@cachondo So looking at it, it looks like it just uses the phonemes generated by espeak, and passes those to the natural voices. So if you use a voice trained on American English, and ask for en-gb, it'll do it anyway and sound terrible.
User avatar
🇨🇦Samuel Proulx🇨🇦 @fastfinge@interfree.ca
1y
@cachondo Oh, and the fanfic is: Harry Potter and the Art of Getting Your Shit Together — by MsStarryNightSky.
User avatar
🇨🇦Samuel Proulx🇨🇦 @fastfinge@interfree.ca
1y
@cachondo Here's a UK English sample of the same text. It sounds fine to my ear, but I'm not British. Thoughts?
User avatar
🇨🇦Samuel Proulx🇨🇦 @fastfinge@interfree.ca
1y
@x0 Yeah, it does have a ton of dependencies. I will say all of the voices are better than Sonata/piper, IMHO. Even if it does look like they're all eleven labs ripoffs.
User avatar
🇨🇦Samuel Proulx🇨🇦 @fastfinge@interfree.ca
1y
It's super simple to set up if you want to play. Make a folder for it, change into the folder in your terminal, then do:
pip install --target=. kokoro-onnx soundfile
winget install wget
wget
github.com/thewh1teagle/kokoro-onnx/releases/download/model-files/kokoro-v0_19.onnx
wget
github.com/thewh1teagle/kokoro-onnx/releases/download/model-files/voices.json

Then you can call it from Python. It supports US and UK English, plus French, Korean, Chinese, and Japanese.
User avatar
🇨🇦Samuel Proulx🇨🇦 @fastfinge@interfree.ca
1y
@lynessence IIs it? I don't know what there built in voices are now. Guess that's where they got the training data.
User avatar
🇨🇦Samuel Proulx🇨🇦 @fastfinge@interfree.ca
1y
Here's a much longer example of the quality of speech Kokoro TTS generates. I really do think it might be a decent 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")
User avatar
🇨🇦Samuel Proulx🇨🇦 @fastfinge@interfree.ca
1y
So this looks like a high quality, fast, natural, and open source TTS system in Python. A key candidate for an . Unfortunately, I find addon development super confusing. Is there a good template to start from or something? github.com/thewh1teagle/kokoro-onnx
User avatar
🇨🇦Samuel Proulx🇨🇦 @fastfinge@interfree.ca
1y
long post, dream, death, depression, ableism I haven't done a in a while, and last nights was long enough to deserve it. It was one of those dreams where it was so awful that I kept waking up in horror, but every time I went back to sleep, the dream just resumed. So in the dream a new national government for all of North America had been formed, under the slogan "Laws for the hired, death for the fired." They created a system of cameras and police robots, and any employed person who broke any law was fired, and any unemployed person who broke any law was killed. Also, in order to get food, you had to report to the office of food justification. The office had really tiny elevators, that you had to enter and stand in sideways and crouched down. If you were too heavy for the elevator, or your stomach stuck out so you wouldn't fit in, you couldn't get food. Also, sometimes the elevators turned into trash compactors, and that's how the government got rid of undesirable people. Wheelchairs wouldn't fit, of course, and anyone who used one had already starved to death. I'd read reports that deaf people were getting the trash compactor treatment, so I was of course terrified as I entered the elevator. Thankfully, it didn't crush me, and it took me to the office of food justification where I had to complete an interview justifying why I deserved food for the week. However, as I went back home, a police robot caught me accidentally crossing the street against the light. There was no traffic, so I didn't know. But the police robot required my employer to fire me anyway. Now that I was a criminal, I couldn't get another job, and was evicted from my home. So I had to go to the local Poverty Place. The poverty place was a building full of tiny cubes. Every homeless person was given a cube, just large enough to sit inside of with your legs crossed, and that's where you had to live. There wasn't enough room to lie down or even stretch your arms. Both loitering and being homeless were against the law, and anyone living in a Poverty Place was considered a high risk offender, so we had to wear ankle bracelets with GPS trackers, and report to Poverty Place no later than 7 PM, and leave no later than 7 AM. When entering the building, you were permitted one bathroom use. If you owned any belongings, they were confiscated by the government, in order to cover the cost of your cube. On my way to register for my cube, I met a really old man, who told me that his wife had passed away, and he was just waiting to die so he could be with her. He gave me there portable house, because he couldn't stand living in it anymore. The portable house was a heavy rectangular object, about the size of a wheeled suitcase, with a button on it. Pushing the button would result in it deploying into an 80 foot by 80 foot fully furnished house. The old man told me to get as much food as I could, walk several days out into the woods, and deploy the house. He hoped it would keep me safe when the government started purging blind people. So I went to a McDonalds, pretending the portable house was actually a bomb, and made them give me all of the frozen food from the kitchen. Then I started running, hoping to escape the police robots and get to the woods. Thankfully, I woke up before they could kill me; there was no way that plan was going to work. And if there was ever a dream where death in the dream meant death in real life, that felt like it would be the one. Yuck, yuck, yuck. I can't describe to you how vivid that was, or the feeling of hopelessness, resignation, and darkness that pervaded the dream. I got up and cried in the shower.
User avatar
🇨🇦Samuel Proulx🇨🇦 @fastfinge@interfree.ca
1y
Post Game Content — The Unisys Icon: One Canadian Xennial's Memories... postgamecontent.com/post/771726085147803648/the-unisys-icon-one-canadian-xennials-memories
User avatar
🇨🇦Samuel Proulx🇨🇦 @fastfinge@interfree.ca
1y
food, cooking, meat @dhamlinmusic If you put sticky braille labels on the buttons, you can generally use it fine. Just a few menus to memorize.