I'm in the process of migrating from my first POC's disgusting mess of vibe-coded Python to a cleaner (and shareable) Rust architecture. It's going well but I will wait for it to stabilize a bit before sharing.
The main non-trivial parts are proper state machine / concurrency management, and AirPods interaction; in particular, detecting a stem click while the microphone is active. I worked around this by having the mic-off-to-mic-on transition use a media player Play event, and mic-on-to-mic-off do silence detection. It's super hacky but actually works surprisingly well.
Currently looking into using `AVAudioApplication.setInputMuteStateChangeHandler(_:)`, like AirMute [1] does, so that I don't have to rely on silence detection and can manually terminate the voice command with a second click.
If you want to roll your own version of what I described today, it should be pretty easy to do so based on what I wrote if you have a Max x5-x20 plan and feed it to Opus. Bonus points, you get to customize it to your exact needs.
yberreby|24 days ago
The main non-trivial parts are proper state machine / concurrency management, and AirPods interaction; in particular, detecting a stem click while the microphone is active. I worked around this by having the mic-off-to-mic-on transition use a media player Play event, and mic-on-to-mic-off do silence detection. It's super hacky but actually works surprisingly well.
Currently looking into using `AVAudioApplication.setInputMuteStateChangeHandler(_:)`, like AirMute [1] does, so that I don't have to rely on silence detection and can manually terminate the voice command with a second click.
If you want to roll your own version of what I described today, it should be pretty easy to do so based on what I wrote if you have a Max x5-x20 plan and feed it to Opus. Bonus points, you get to customize it to your exact needs.
[1]: https://github.com/Solarphlare/AirMute