Looks like it uses libsox internally. You can also use command-line SoX utilities to get the same effect. For example, this plays your microphone back at you, pitch shifted and with a delay:
play '|rec -p pitch +400 40 delay 5 5'
(To be clear, I don't mean to beat down anybody's pet project. Just spreading related information. There's very little accessible documentation of Linux audio stuff.)RVC is what you're looking for. There's lots of tooling around it.
edit: This is the repo you're looking for: https://github.com/RVC-Project/Retrieval-based-Voice-Convers...
The classic information-through-IRC these days.
* Make loopback devices that are always there for headphones/mic -- software doesn't handle connection/disconnection well
* Keep all your processing in carla (i load it with systemd as a user unit on login)
* You still need some way to control "pulse audio" (even though it's pipewire provided) for per-app volume control, profile selections, etc, so you probably want pavucontrol for that.
Carla: https://github.com/falkTX/Carla
It lets me install any normal audio pro audio plugins, for example https://github.com/xiph/rnnoise
It also does some cable management, but qpwgraph is maybe better for that.
I looked at your code and the approach (IMO) is kind of bad.
If you want to solve the problem of "voice changer", you can skip the UI entirely and just use plugin parameters. You can also skip the problem of managing the connections. And when you publish your work, every pro audio software (Ableton, Reaper, whatever) can use your audio processing.
Hope that helps.