You are browsing as a guest. Sign up (or log in) to start making projects!

10h 26m 53s logged

Faster, smaller, better and a mushroom shark

A big success has happened! I managed to replace the IPA speech recognition model “Multipa” with “Zipa”. The new model is over 4x smaller (260MB vs 1.3GB), it is noticeably faster to compute, and the best part?! Depending on the case it has similar or better accuracy then Multipa, which means less missed or mistakenly detected words! This means now it take less time for the spell to be detected after you say it.
You can see it in the video, where Zipa is much faster, and Multipa misses the last word each time (it didn’t detect ˈɔnːdˌɔː nor fɒksɑm).
Few devlogs ago, when I originally implemented the model I said it wasn’t useable, but two fixes changed that:

  • The sliding window audio cutting had to be slightly adjusted, because the model always outputs 4 logits less than Multipa.
  • I discovered the model works much better with more context, even if it’s not relevant. I recorded myself saying “mushroom shark” and saying 6 different words. In each case adding the shark audio to the audio of the word made the IPA output of the word better! I don’t know why it works like that. Maybe the model then has better understanding of the speaker’s voice? What matters is that it helps! I adjusted the sliding window chunker to give the model additional 1.5s of previous speech audio, output. It’s translation is later cut off, so the result stays the same. I was able to do that without making latency significantly larger thanks to the new model being really fast.

These two changes made the models comparable, so I updated Sephyr to use Zipa.

Leap spell tweaking

I spent a bunch of time working on the leap spell, to make it feel nicer. I made it apply a continuous force over time on the player instead of a one big impulse.
I also made it apply some vertical force to the player depending on the looking angle, so that the player launches forward instead of rubbing against the ground. To make it smooth I engineered three math functions in Desmos, that control the amount of force added over time.
Finally I updated the VFX, attaching it to player and making particles simulate in world space. This way the trails now follows the player.

Making microphone selectable

So far the mod always used a default system input device for capturing the audio with no way to control it. This works most of the time, but sometimes something can be wrong or you might have multiple input devices. So I need to give the user control. Sounds simple, but it required a surprisingly big portion of work. I had to update Sepple (the keyword detection engine) to support selecting a device, and changing it at runtime (which requires restarting the capture). Then I had to update the Rust<->Java bindings to accomodate that, and finally I had to wire up in Minecraft code. I decided to expose this setting as a /sephyr microphone <mic> command. Here I got a little bit stuck on implementing the microphone name autocompletion, but luckily a friend of mine knew, and told me how to do that. Here I ran out of devlog time (it’s already 19 minutes over), but it’s almost working!

0
2

Comments 0

No comments yet. Be the first!