Created: 2022-08-31T02:02:49-05:00
You can use a high quailty neural TTS like the Larynx project to use text to speech over voice chat channels. Problem is that the browsers create and delete audio ports constantly.
You can create a virtual device, then assign a browser to the virtual device with `pavucontrol` so it will always go to that. Then you can use the same device as a microphone in the VOIP application. If you listen to the monitor of the device (or use Carla to patch it to your actual sound device) then you can hear your TTS speak.
I recommend using a throw-away browser like Falkon. The whole process will be sent to the other audio device so any youtube etc you try to open would be streamed as well.
Instructions on creating virtual devices with Pipewire
Run this stanza in a shell to create a duplex device (duplex meaning can be used as both input and output at the same time):
pactl load-module module-null-sink media.class=Audio/Duplex sink_name=my-tunnel audio.position=FL,FR,RL,RR