Hacker News new | ask | show | jobs
by luguenth 1065 days ago
There's also a very nice simulation, where you can play with the very different parts of vocal chords:

https://imaginary.github.io/pink-trombone/

1 comments

I made a fork with few more features, it might even work on your phone browser:

https://jmiskovic.github.io/voicebox

Thank you for this. I had a lot of fun scaring my cat in bed and it inspired me to become a late middle aged opera savant.
I actually am a late middle-aged opera savant but sadly I have no cat to scare
Unfortunately this webapp (along with the original Pink Trombone) produces super glitchy audio and consumes 95% of CPU on my Chrome v114.0.5735.198 running on Ubuntu 22.04 (which is running on my Thinkpad X220)
That's rather strange. The graphics part is lightweight (pre-rendering the background and then drawing few shapes), but if you could shrink the browser to very small dimensions and test we could eliminate this one.

The audio part is bit more involved. The vocal tract is simulated in segments, each segment receiving, filtering and reflecting the soundwave energy. The algorithm is computationally heavy, but it ran well on my mediocre smartphone.

Maybe if stuttering is detected it could lower the number of tract segments, which also lowers the quality. Increasing the buffer size would probably also help with glitches but I don't think it would solve the high CPU utilization.