quiniouben / vban

VBAN protocol open-source implementation
GNU General Public License v3.0
450 stars 63 forks source link

Trying to route mic from Voicemeeter via VBAN to act as mic on Pi #30

Open ToxMox opened 5 years ago

ToxMox commented 5 years ago

Hi there. I'm trying to do something similar to the comment I added below.

I've got audio out from my Pi via vban_emitter working using the Pulseaudio instructions below. I'd also like to at the same time bring my mic audio from my PC into my Pi as a mic input using vban_receptor (and Pulseaudio) but I'm not sure how to configure it or if it is possible.

Any insights would be greatly appreciated :)


Well what I am trying to do is forward the desktop audio of my Linux machine to Windows, right? I assumed that emitter was the correct way to do that, since... emit. But I guess based on what you said, the correct way to do it is receptor?

No, you are right, if you want to emit, use an emitter :). My explanations above stand for Alsa backend and you cannot simply achieve what you want with alsa. If you want to forward all your audio (including software sources), you should be successful with using pulseaudio backend + ensuring PulseAudio settings are correct.

Explanation

Illustration vban_emitter -i 192.168.1.1 -p6789 -sStream -bpulseaudio -r48000

pavucontrol_vban

Originally posted by @quiniouben in https://github.com/quiniouben/vban/issues/26#issuecomment-426418780

quiniouben commented 5 years ago

Hi, Thank you for your interest. To transmit some audio from your PC to your Raspberry pi, you need:

  1. To emit from the PC. I assume you use a Windows PC, in which case, you need to use vb-audio VoiceMeeter Banana software. If you use a Mac, I think it exists something, please refer to vb audio websites. If you use a Linux, you can do the same thing than you did on the Raspberry Pi with the emitter.
  2. To receive in the Raspberry Pi, for which you simply need something like: vban_receptor -i 192.168.1.1. -p6980 -sStream1 -bpulseaudio -r48000, assuming your PC has IP address 192.168.1.1, listens on port 6980 and expect stream name Stream1.

Hope that helps

ToxMox commented 5 years ago

Hi. Thanks for the response but I already got this far. I'm trying to make the receptor act as the mic on the Pi not an output.

quiniouben commented 5 years ago

Ah sorry, I misunderstood your intent. Then I fear you cannot do it directly with vban_receptor, as you observed already. However, there exists another github project that seems to have this exact intent: https://github.com/004helix/vban2pipe I never really tried to run it and I have no contact with the developer, but you might want to give it a try.

ToxMox commented 5 years ago

Ah awesome. I'll check it out and report back how well it works or not. Thank you so much 👍😀

NeroBurner commented 4 years ago

any updates on this?

the pipe feature was merged into vban if I'm not mistaken

GregSatre commented 3 years ago

I'm also interested in this. I can use vban_receptor with the pulseaudio backend but am not able to use it as a mic. I've tried using the pipe backend but don't see any output.

Am I right that

vban_receptor -i ip -p port -s stream -b pipe

should output to stdout?

Edit: I solved my problem. Steps for future reference:

  1. Create a new FIFO source

    pacmd load-module module-pipe-source source_name=virtmic file=/tmp/virtmic rate=48000

    rate is an optional parameter with a default of 44100. More details here

  2. Create a VBAN stream from the device you want to stream from. Make sure the sample rate matches the rate of the FIFO source created in step 1

  3. Receive this stream with vban_receptor

    vban_receptor -i IP_OF_STEP_2_DEVICE -p PORT -s STREAM_NAME -b file -d /tmp/virtmic
quiniouben commented 3 years ago

Sorry for the long time since your latest messages. Do I understand right that this works as expected ?