Teamspeakbot with pulseaudio

July 21, 2020, 11:47 am

Here i am going to explain, how you can forward nearly any audio into a teamspeak server.

Create a virtual loopback device

you have two options, first: you can use the kernel module:

sudo modprobe snd-aloop

or you use some pulseaudio commands:

pacmd load-module module-null-sink sink_name=Virtual
pacmd update-sink-proplist Virtual device.description=Virtual
pacmd load-module module-virtual-source source_name=VirtualSource master=Virtual.monitor

These both changes only last as long as you don't restart your system. If you want to permanently add a Virtual device checkout my (blogpost)[/posts/pulseaudio-fun] about that.

Also, these devices may be automatically set as default audio sink. You should keep an eye on that and reselect your normal audio sink.

install pavucontrol

pavucontrol is a package, that helps you select the output device for a given program. Some programs may not accept the changes from pavucontrol. Others may have their own output device setting somewhere like vlc. But i found it usefull to see, where each program tries to output to.

sudo apt install pavucontrol

Configure Teamspeak

This is probably the most complex step. I am writing this for Teamspeak 3 but i guess it may also work similar with Teamspeak5. First we need to add a new identity. Go Extra > Identity or Ctrl + i There you can create a new identity and name it what ever you like.

Safe your Identity and go to the options. (Alt+P) First create a playback profile, name it how you like and just put the volume sliders to the lowest

Then we create a recording profile. Choose pulse audio and your virtual device created in Step 1. For testing its usefull to select "Continues Transmission" later you may change to "Voice Activiation Detection" with a low threshold.

Create a Favorite

Technically you are ready to go now. But its more comfortable when you set up you favorites to easily connect to your server. Open the Favorite Menu (Ctrl+B) Add a new one and switch to expert mode. The left side settings are all your problem, but the right side settings should be set to your new identity and sound profiels, i recomend to select the hotkey profile "none". Safe and exit the menu Now in the favorite Menulist just right klick your new favorite and select "connect in new Tab"


You now should be able to forward vlc or firefox or nearly every other sound comming from you computer through teamspeak, for other memebers to hear.