Follow this tutorial first on setting up ROC: https://gavv.net/articles/roc-0.4/
Instead of following the config file provided on the tutorial, use this config to route ROC source to a Loopback device and an Echo Cancel device.
Restart PipeWire afterwards:
systemctl restart --user pipewire.service
Install Roc Droid, switch to the Sender tab, replace the IP address with your Linux device's and change source from apps to microphone. Test the input device on apps such as OBS whether it works.