First, some context: I'm a part of a TF2 server that includes lots of micspam. I'm in the process of writing a guide on how to do this properly- namely using a media player and some form of audio pipe. On Windows, we achieved this by using Virtual Audio Cable or VB-Cable. I really haven't found any sort of equivalent on Ubuntu, at least none that worked for me.

For this, I want to know if there's some way to take audio from a single program, such as Banshee, and route the sound output into a mic input. Ideally, I'd like to be able to do this without changing sound servers.

Thanks in advance!


To redirect to mic input is not possible AFAIK, but fortunately it is not needed. What you have to do is just set up a new pulseaudio SINK which will automatically have a monitor SOURCE. No external programs needed, pulseaudio does the job. (Basically to accomplish such things is why pulseaudio was developed.)

So the question is whether you want to hear the sounds which you redirect to your new sink? (Play it on your speakers.) Or you don't.

If you DO want to hear what you are redirecting then follow the technique what I use for sending music over skype:

  1. Get the name of your default sink:

    pactl list sinks

    In the output search for the name of the sink. It will be something similar to this: "alsa_output.pci-0000_00_14.2.analog-stereo"

  2. Run the following command with the appropriate change in the master= section to your above found default sink name:

    pactl load-module module-remap-sink sink_name=secondary master=alsa_output.pci-0000_00_14.2.analog-stereo
  3. Open the application FROM which you want to redirect sound and start playing the sound in it.

  4. Open the application TO which you want to redirect sound and start recording in it.

  5. Start pavucontrol (If you don't have it: sudo apt-get install pavucontrol)

  6. While your applications are playing/recording sounds: In pavucontrol, on the Playback tab change the sink from what it is on (Built-in ...) to the remapped sink (Remapped Built-in ....) for your application. On the Recording tab make similar changes for your recording application: change it to something like Monitor of Remapped...

  7. Still in pavucontrol on the Input devices and Output devices tabs: change Show: to All Input devices and All Output devices and make sure that the remapped sink and its monitor source is not muted and have enough volume.

  8. After this your setup should be working.

If you want to make your new sink to be automatically setup when pulseaudio starts: Edit the /etc/pulse/default.pa file and add the following line with your default master sink name in it (You will need root permissions to edit the file, so use sudo or gksu)

    load-module module-remap-sink sink_name=secondary master=alsa_output.pci-0000_00_14.2.analog-stereo

Pavucontrol stores our changes (or at least for me it does), so next time you won't have to redirect the sinks-sources in it. (But if it won't save it for you, then do redirect them when you need.)

If you don't want to hear the sounds what you redirect then use simply

 load-module module-null-sink

in the appropriate places (without sink_name or master section) and change the redirections in pavucontrol similarly as you did with the remapped sink but now with the null-sink and its monitor.

| improve this answer | |
  • Alright. It'll be a little while until I can test this fully (my only Ubuntu PC is the textbook definition of "old", and will probably explode if faced with the Source Engine). However, when I tried to run the null-sink command on my test machine, initialization failed. – VmKid Dec 10 '13 at 18:59
  • @VmKid So you tried pactl load-module module-null-sink ? On my system it doesn't need sudo but try with it. If it still not succeeds then please do what is written here And try running the pactl command again, so we can see some more meaningful output from pulse. Of course don't post the log at Launchpad but put it on pastebin and give a link here. – falconer Dec 10 '13 at 19:35
  • @VmKid Ohh. Or maybe my answer wasn't clear, and maybe you tried pactl load-module module-null-sink sink_name=secondary master=alsa_output... ? When you load the null-sink then no other options are needed, just pactl load-module module-null-sink Of course a sink_name can be added if you want, but master is not. The null-sink is just a dummy sink. – falconer Dec 10 '13 at 20:28
  • That appears to have worked in a recorder. Hopefully it'll work within the Source Engine when I get a chance to test it for real. Thanks a lot! – VmKid Dec 10 '13 at 20:43
  • I'm following these instructions, but when I get to the part with pavucontrol, there's a problem. When I select to remapped audio channel, it doesn't change. It just continues to show the original default. – StarCrashr Dec 18 '19 at 16:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.