Use phone as microphone in Linux












8















I dual boot Windows and Ubuntu. Since I don't use any microphone on my desktop, I started using an app named "WO Mic" to connect my Android phone's microphone to my desktop in Windows. A good alternative, right?



Well, sadly, WO Mic is not supported on any Linux-based OS, so I would like to know if there are any alternatives or any app that could use my phone as microphone on Ubuntu over WiFi or USB. (but preferably wifi).










share|improve this question





























    8















    I dual boot Windows and Ubuntu. Since I don't use any microphone on my desktop, I started using an app named "WO Mic" to connect my Android phone's microphone to my desktop in Windows. A good alternative, right?



    Well, sadly, WO Mic is not supported on any Linux-based OS, so I would like to know if there are any alternatives or any app that could use my phone as microphone on Ubuntu over WiFi or USB. (but preferably wifi).










    share|improve this question



























      8












      8








      8








      I dual boot Windows and Ubuntu. Since I don't use any microphone on my desktop, I started using an app named "WO Mic" to connect my Android phone's microphone to my desktop in Windows. A good alternative, right?



      Well, sadly, WO Mic is not supported on any Linux-based OS, so I would like to know if there are any alternatives or any app that could use my phone as microphone on Ubuntu over WiFi or USB. (but preferably wifi).










      share|improve this question
















      I dual boot Windows and Ubuntu. Since I don't use any microphone on my desktop, I started using an app named "WO Mic" to connect my Android phone's microphone to my desktop in Windows. A good alternative, right?



      Well, sadly, WO Mic is not supported on any Linux-based OS, so I would like to know if there are any alternatives or any app that could use my phone as microphone on Ubuntu over WiFi or USB. (but preferably wifi).







      sound android microphone phone audio-recording






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jul 30 '17 at 17:43









      Zanna

      50.6k13135241




      50.6k13135241










      asked Mar 3 '17 at 13:45









      someanonsomeanon

      41112




      41112






















          3 Answers
          3






          active

          oldest

          votes


















          6














          Is this the program? Have you tried downloading the client/driver and following the instructions for Ubuntu?






          1. Load driver module



            $ sudo insmod wo_snd_capture-x86.ko



          2. Connect from client





            • Conenct by Wifi. You can find the IP address on WO Mic app UI.



              $ micclient-ubuntu-x86 -t Wifi 192.168.1.100



            • Connect by Bluetooth.



              $ micclient-ubuntu-x86 -t Bluetooth xx:xx:xx:xx:xx:xx


              xx:xx:xx:xx:xx:xx represents phone Bluetooth address. You can query it on your phone: Settings -> About phone -> Status -> Bluetooth address.






          The above examples are for 32-bit Ubuntu. If you are using 64-bit, replace client and driver file name to xxx-x86_64 ones as downloaded.







          share|improve this answer



















          • 1





            I got Please first load ALSA snd-aloop., so I needed to do: sudo modprobe snd-aloop and then I had to run the micclient-ubuntu-x86 as root (using sudo). And then it worked, yay.

            – Amichai Schreiber
            Jul 15 '17 at 7:09











          • This does not work. Only silence is recorded from the loopback device...

            – Calmarius
            Feb 1 '18 at 20:52



















          4














          Mmmm I tried that app before but it does not work for me, so I recommend this method:




          • First install ip camera on the phone, then install pulseaudio, when you have that done, open ipcamera and start the server on you phone, make sure that you pc is connected on the same network.

          • Open Chrome or Firefox and type the IP address that ipcamera provides you (the ip will show in the app).

          • In the browser click on audio player and choose HTML5, and make sure that you hear something.

          • Open pulseaudio and go to the Playback tab, then click and show and select All Streams. You will see the chrome or firefox application playing the microphone.

          • On the application section select Lookback for Chrome or Firefox; that will redirect the audio from you phone to the microphone channel, you can do the same but using VLC and deal better with issues like the lag.






          share|improve this answer


























          • Anyway to solved the lag issue?

            – swdev
            Jun 5 '18 at 4:55






          • 2





            Mmmm i am not sure but i think that this post can help you if you use vlc How to Fix Skipping and Lagging in VLC @swdev

            – Maxtermax
            Jun 6 '18 at 5:15



















          0














          I use Mumble (desktop client) + Murmur (as LAN server) + Plumble (Android/iOS client). This results in the lowest latency I've ever achieved (sounds almost like normal loopback, theoretically 7ms WiFi delay + 2x 10ms codec delay = 27 ms).



          https://github.com/pzmarzly/mic_over_mumble



          Fragments of README (rev 59091372580f481320224532aeaaea84c9c07848)



          Set all 3 programs to use best quality and minimal latency. Set mobile client to always streaming. Copy mic_over_mumble anywhere - it will use ~/.mic_over_Mumble as configuration directory. Run mic_over_mumble, then connect your mobile device to LAN server. Then, set up your programs to use monitor of Mumble as input device. E.g. in OBS:



          Screenshot of OBS configuration



          Copy of mic_over_mumble script (rev 59091372580f481320224532aeaaea84c9c07848)



          #!/bin/bash
          set -e
          # PAID = PulseAudio ID
          # ID = PID / process ID

          function main () {
          if [ ! -e ~/.mic_over_Mumble ]; then
          mkdir ~/.mic_over_Mumble
          fi
          cd ~/.mic_over_Mumble

          rm murmur.ini | true
          echo "bonjour=true" >> murmur.ini
          echo "bandwidth=130000" >> murmur.ini

          if [ ! -e ./initdone ]; then
          echo "You will need to configure Mumble client to use the lowest possible latency."
          echo "We will start Mumble now. Please complete setup wizard and go to settings to increase quality and decrease latency."
          echo "Also, mute your microphone (if you have one) in Mumble."
          echo "Then close Mumble."
          run_mumble_client_wizard
          touch ./initdone
          fi

          echo "Starting Mumble server (murmurd)..."
          MUMBLE_SERVER_ID=`run_mumble_server_bg`
          sleep 5
          echo "Starting Mumble client..."
          MUMBLE_CLIENT_ID=`run_mumble_client_bg`
          sleep 5
          echo "Fetching PulseAudio configuration..."
          MUMBLE_CLIENT_PAID=`get_mumble_client_paid`

          echo "Changing PulseAudio configuration..."
          SINK_MODULE_PAID=`add_sink`
          sleep 3
          SINK_PAID=`get_sink_paid`

          pacmd move-sink-input $MUMBLE_CLIENT_PAID $SINK_PAID

          echo "Done. Please use pavucontrol to ensure everything works."
          echo "Press Return to shut down..."
          read -n1 -s
          echo "Shutting down..."

          echo "Stopping Mumble client..."
          kill -KILL $MUMBLE_CLIENT_ID | true
          sleep 2
          echo "Stopping Mumble server..."
          kill -KILL $MUMBLE_SERVER_ID | true
          echo "Restoring PulseAudio configuration..."
          pactl unload-module $SINK_MODULE_PAID
          }

          function run_mumble_client_wizard () {
          mumble >/dev/null 2&>1
          }

          function run_mumble_client_bg () {
          MUMBLE_URL="mumble://localhost"
          mumble $MUMBLE_URL >/dev/null 2&>1 &
          echo $!
          }

          function run_mumble_server_bg () {
          murmurd -ini ./murmur.ini &
          echo $!
          }

          function get_mumble_client_paid () {
          pacmd list-sink-inputs |
          egrep "index: |application.name = " |
          cut_every_second_newline |
          egrep Mumble |
          print_second_column
          }

          function add_sink () {
          pactl load-module
          module-null-sink
          sink_name="Loopback_of_Mumble"
          sink_properties=device.description="Loopback_of_Mumble"
          }

          function get_sink_paid () {
          pacmd list-sinks |
          egrep "index: |name: " |
          cut_every_second_newline |
          egrep Loopback |
          print_second_column
          }

          # https://serverfault.com/a/375098/449626
          function cut_every_second_newline () {
          awk 'ORS=NR%2?" ":"n"'
          }

          function print_second_column () {
          awk '{print $2}'
          }

          main





          share|improve this answer

























            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "89"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f889164%2fuse-phone-as-microphone-in-linux%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            3 Answers
            3






            active

            oldest

            votes








            3 Answers
            3






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            6














            Is this the program? Have you tried downloading the client/driver and following the instructions for Ubuntu?






            1. Load driver module



              $ sudo insmod wo_snd_capture-x86.ko



            2. Connect from client





              • Conenct by Wifi. You can find the IP address on WO Mic app UI.



                $ micclient-ubuntu-x86 -t Wifi 192.168.1.100



              • Connect by Bluetooth.



                $ micclient-ubuntu-x86 -t Bluetooth xx:xx:xx:xx:xx:xx


                xx:xx:xx:xx:xx:xx represents phone Bluetooth address. You can query it on your phone: Settings -> About phone -> Status -> Bluetooth address.






            The above examples are for 32-bit Ubuntu. If you are using 64-bit, replace client and driver file name to xxx-x86_64 ones as downloaded.







            share|improve this answer



















            • 1





              I got Please first load ALSA snd-aloop., so I needed to do: sudo modprobe snd-aloop and then I had to run the micclient-ubuntu-x86 as root (using sudo). And then it worked, yay.

              – Amichai Schreiber
              Jul 15 '17 at 7:09











            • This does not work. Only silence is recorded from the loopback device...

              – Calmarius
              Feb 1 '18 at 20:52
















            6














            Is this the program? Have you tried downloading the client/driver and following the instructions for Ubuntu?






            1. Load driver module



              $ sudo insmod wo_snd_capture-x86.ko



            2. Connect from client





              • Conenct by Wifi. You can find the IP address on WO Mic app UI.



                $ micclient-ubuntu-x86 -t Wifi 192.168.1.100



              • Connect by Bluetooth.



                $ micclient-ubuntu-x86 -t Bluetooth xx:xx:xx:xx:xx:xx


                xx:xx:xx:xx:xx:xx represents phone Bluetooth address. You can query it on your phone: Settings -> About phone -> Status -> Bluetooth address.






            The above examples are for 32-bit Ubuntu. If you are using 64-bit, replace client and driver file name to xxx-x86_64 ones as downloaded.







            share|improve this answer



















            • 1





              I got Please first load ALSA snd-aloop., so I needed to do: sudo modprobe snd-aloop and then I had to run the micclient-ubuntu-x86 as root (using sudo). And then it worked, yay.

              – Amichai Schreiber
              Jul 15 '17 at 7:09











            • This does not work. Only silence is recorded from the loopback device...

              – Calmarius
              Feb 1 '18 at 20:52














            6












            6








            6







            Is this the program? Have you tried downloading the client/driver and following the instructions for Ubuntu?






            1. Load driver module



              $ sudo insmod wo_snd_capture-x86.ko



            2. Connect from client





              • Conenct by Wifi. You can find the IP address on WO Mic app UI.



                $ micclient-ubuntu-x86 -t Wifi 192.168.1.100



              • Connect by Bluetooth.



                $ micclient-ubuntu-x86 -t Bluetooth xx:xx:xx:xx:xx:xx


                xx:xx:xx:xx:xx:xx represents phone Bluetooth address. You can query it on your phone: Settings -> About phone -> Status -> Bluetooth address.






            The above examples are for 32-bit Ubuntu. If you are using 64-bit, replace client and driver file name to xxx-x86_64 ones as downloaded.







            share|improve this answer













            Is this the program? Have you tried downloading the client/driver and following the instructions for Ubuntu?






            1. Load driver module



              $ sudo insmod wo_snd_capture-x86.ko



            2. Connect from client





              • Conenct by Wifi. You can find the IP address on WO Mic app UI.



                $ micclient-ubuntu-x86 -t Wifi 192.168.1.100



              • Connect by Bluetooth.



                $ micclient-ubuntu-x86 -t Bluetooth xx:xx:xx:xx:xx:xx


                xx:xx:xx:xx:xx:xx represents phone Bluetooth address. You can query it on your phone: Settings -> About phone -> Status -> Bluetooth address.






            The above examples are for 32-bit Ubuntu. If you are using 64-bit, replace client and driver file name to xxx-x86_64 ones as downloaded.








            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Mar 3 '17 at 14:17









            LiveWireBTLiveWireBT

            21.4k1872154




            21.4k1872154








            • 1





              I got Please first load ALSA snd-aloop., so I needed to do: sudo modprobe snd-aloop and then I had to run the micclient-ubuntu-x86 as root (using sudo). And then it worked, yay.

              – Amichai Schreiber
              Jul 15 '17 at 7:09











            • This does not work. Only silence is recorded from the loopback device...

              – Calmarius
              Feb 1 '18 at 20:52














            • 1





              I got Please first load ALSA snd-aloop., so I needed to do: sudo modprobe snd-aloop and then I had to run the micclient-ubuntu-x86 as root (using sudo). And then it worked, yay.

              – Amichai Schreiber
              Jul 15 '17 at 7:09











            • This does not work. Only silence is recorded from the loopback device...

              – Calmarius
              Feb 1 '18 at 20:52








            1




            1





            I got Please first load ALSA snd-aloop., so I needed to do: sudo modprobe snd-aloop and then I had to run the micclient-ubuntu-x86 as root (using sudo). And then it worked, yay.

            – Amichai Schreiber
            Jul 15 '17 at 7:09





            I got Please first load ALSA snd-aloop., so I needed to do: sudo modprobe snd-aloop and then I had to run the micclient-ubuntu-x86 as root (using sudo). And then it worked, yay.

            – Amichai Schreiber
            Jul 15 '17 at 7:09













            This does not work. Only silence is recorded from the loopback device...

            – Calmarius
            Feb 1 '18 at 20:52





            This does not work. Only silence is recorded from the loopback device...

            – Calmarius
            Feb 1 '18 at 20:52













            4














            Mmmm I tried that app before but it does not work for me, so I recommend this method:




            • First install ip camera on the phone, then install pulseaudio, when you have that done, open ipcamera and start the server on you phone, make sure that you pc is connected on the same network.

            • Open Chrome or Firefox and type the IP address that ipcamera provides you (the ip will show in the app).

            • In the browser click on audio player and choose HTML5, and make sure that you hear something.

            • Open pulseaudio and go to the Playback tab, then click and show and select All Streams. You will see the chrome or firefox application playing the microphone.

            • On the application section select Lookback for Chrome or Firefox; that will redirect the audio from you phone to the microphone channel, you can do the same but using VLC and deal better with issues like the lag.






            share|improve this answer


























            • Anyway to solved the lag issue?

              – swdev
              Jun 5 '18 at 4:55






            • 2





              Mmmm i am not sure but i think that this post can help you if you use vlc How to Fix Skipping and Lagging in VLC @swdev

              – Maxtermax
              Jun 6 '18 at 5:15
















            4














            Mmmm I tried that app before but it does not work for me, so I recommend this method:




            • First install ip camera on the phone, then install pulseaudio, when you have that done, open ipcamera and start the server on you phone, make sure that you pc is connected on the same network.

            • Open Chrome or Firefox and type the IP address that ipcamera provides you (the ip will show in the app).

            • In the browser click on audio player and choose HTML5, and make sure that you hear something.

            • Open pulseaudio and go to the Playback tab, then click and show and select All Streams. You will see the chrome or firefox application playing the microphone.

            • On the application section select Lookback for Chrome or Firefox; that will redirect the audio from you phone to the microphone channel, you can do the same but using VLC and deal better with issues like the lag.






            share|improve this answer


























            • Anyway to solved the lag issue?

              – swdev
              Jun 5 '18 at 4:55






            • 2





              Mmmm i am not sure but i think that this post can help you if you use vlc How to Fix Skipping and Lagging in VLC @swdev

              – Maxtermax
              Jun 6 '18 at 5:15














            4












            4








            4







            Mmmm I tried that app before but it does not work for me, so I recommend this method:




            • First install ip camera on the phone, then install pulseaudio, when you have that done, open ipcamera and start the server on you phone, make sure that you pc is connected on the same network.

            • Open Chrome or Firefox and type the IP address that ipcamera provides you (the ip will show in the app).

            • In the browser click on audio player and choose HTML5, and make sure that you hear something.

            • Open pulseaudio and go to the Playback tab, then click and show and select All Streams. You will see the chrome or firefox application playing the microphone.

            • On the application section select Lookback for Chrome or Firefox; that will redirect the audio from you phone to the microphone channel, you can do the same but using VLC and deal better with issues like the lag.






            share|improve this answer















            Mmmm I tried that app before but it does not work for me, so I recommend this method:




            • First install ip camera on the phone, then install pulseaudio, when you have that done, open ipcamera and start the server on you phone, make sure that you pc is connected on the same network.

            • Open Chrome or Firefox and type the IP address that ipcamera provides you (the ip will show in the app).

            • In the browser click on audio player and choose HTML5, and make sure that you hear something.

            • Open pulseaudio and go to the Playback tab, then click and show and select All Streams. You will see the chrome or firefox application playing the microphone.

            • On the application section select Lookback for Chrome or Firefox; that will redirect the audio from you phone to the microphone channel, you can do the same but using VLC and deal better with issues like the lag.







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Jul 30 '17 at 17:47









            Zanna

            50.6k13135241




            50.6k13135241










            answered May 16 '17 at 1:10









            MaxtermaxMaxtermax

            413




            413













            • Anyway to solved the lag issue?

              – swdev
              Jun 5 '18 at 4:55






            • 2





              Mmmm i am not sure but i think that this post can help you if you use vlc How to Fix Skipping and Lagging in VLC @swdev

              – Maxtermax
              Jun 6 '18 at 5:15



















            • Anyway to solved the lag issue?

              – swdev
              Jun 5 '18 at 4:55






            • 2





              Mmmm i am not sure but i think that this post can help you if you use vlc How to Fix Skipping and Lagging in VLC @swdev

              – Maxtermax
              Jun 6 '18 at 5:15

















            Anyway to solved the lag issue?

            – swdev
            Jun 5 '18 at 4:55





            Anyway to solved the lag issue?

            – swdev
            Jun 5 '18 at 4:55




            2




            2





            Mmmm i am not sure but i think that this post can help you if you use vlc How to Fix Skipping and Lagging in VLC @swdev

            – Maxtermax
            Jun 6 '18 at 5:15





            Mmmm i am not sure but i think that this post can help you if you use vlc How to Fix Skipping and Lagging in VLC @swdev

            – Maxtermax
            Jun 6 '18 at 5:15











            0














            I use Mumble (desktop client) + Murmur (as LAN server) + Plumble (Android/iOS client). This results in the lowest latency I've ever achieved (sounds almost like normal loopback, theoretically 7ms WiFi delay + 2x 10ms codec delay = 27 ms).



            https://github.com/pzmarzly/mic_over_mumble



            Fragments of README (rev 59091372580f481320224532aeaaea84c9c07848)



            Set all 3 programs to use best quality and minimal latency. Set mobile client to always streaming. Copy mic_over_mumble anywhere - it will use ~/.mic_over_Mumble as configuration directory. Run mic_over_mumble, then connect your mobile device to LAN server. Then, set up your programs to use monitor of Mumble as input device. E.g. in OBS:



            Screenshot of OBS configuration



            Copy of mic_over_mumble script (rev 59091372580f481320224532aeaaea84c9c07848)



            #!/bin/bash
            set -e
            # PAID = PulseAudio ID
            # ID = PID / process ID

            function main () {
            if [ ! -e ~/.mic_over_Mumble ]; then
            mkdir ~/.mic_over_Mumble
            fi
            cd ~/.mic_over_Mumble

            rm murmur.ini | true
            echo "bonjour=true" >> murmur.ini
            echo "bandwidth=130000" >> murmur.ini

            if [ ! -e ./initdone ]; then
            echo "You will need to configure Mumble client to use the lowest possible latency."
            echo "We will start Mumble now. Please complete setup wizard and go to settings to increase quality and decrease latency."
            echo "Also, mute your microphone (if you have one) in Mumble."
            echo "Then close Mumble."
            run_mumble_client_wizard
            touch ./initdone
            fi

            echo "Starting Mumble server (murmurd)..."
            MUMBLE_SERVER_ID=`run_mumble_server_bg`
            sleep 5
            echo "Starting Mumble client..."
            MUMBLE_CLIENT_ID=`run_mumble_client_bg`
            sleep 5
            echo "Fetching PulseAudio configuration..."
            MUMBLE_CLIENT_PAID=`get_mumble_client_paid`

            echo "Changing PulseAudio configuration..."
            SINK_MODULE_PAID=`add_sink`
            sleep 3
            SINK_PAID=`get_sink_paid`

            pacmd move-sink-input $MUMBLE_CLIENT_PAID $SINK_PAID

            echo "Done. Please use pavucontrol to ensure everything works."
            echo "Press Return to shut down..."
            read -n1 -s
            echo "Shutting down..."

            echo "Stopping Mumble client..."
            kill -KILL $MUMBLE_CLIENT_ID | true
            sleep 2
            echo "Stopping Mumble server..."
            kill -KILL $MUMBLE_SERVER_ID | true
            echo "Restoring PulseAudio configuration..."
            pactl unload-module $SINK_MODULE_PAID
            }

            function run_mumble_client_wizard () {
            mumble >/dev/null 2&>1
            }

            function run_mumble_client_bg () {
            MUMBLE_URL="mumble://localhost"
            mumble $MUMBLE_URL >/dev/null 2&>1 &
            echo $!
            }

            function run_mumble_server_bg () {
            murmurd -ini ./murmur.ini &
            echo $!
            }

            function get_mumble_client_paid () {
            pacmd list-sink-inputs |
            egrep "index: |application.name = " |
            cut_every_second_newline |
            egrep Mumble |
            print_second_column
            }

            function add_sink () {
            pactl load-module
            module-null-sink
            sink_name="Loopback_of_Mumble"
            sink_properties=device.description="Loopback_of_Mumble"
            }

            function get_sink_paid () {
            pacmd list-sinks |
            egrep "index: |name: " |
            cut_every_second_newline |
            egrep Loopback |
            print_second_column
            }

            # https://serverfault.com/a/375098/449626
            function cut_every_second_newline () {
            awk 'ORS=NR%2?" ":"n"'
            }

            function print_second_column () {
            awk '{print $2}'
            }

            main





            share|improve this answer






























              0














              I use Mumble (desktop client) + Murmur (as LAN server) + Plumble (Android/iOS client). This results in the lowest latency I've ever achieved (sounds almost like normal loopback, theoretically 7ms WiFi delay + 2x 10ms codec delay = 27 ms).



              https://github.com/pzmarzly/mic_over_mumble



              Fragments of README (rev 59091372580f481320224532aeaaea84c9c07848)



              Set all 3 programs to use best quality and minimal latency. Set mobile client to always streaming. Copy mic_over_mumble anywhere - it will use ~/.mic_over_Mumble as configuration directory. Run mic_over_mumble, then connect your mobile device to LAN server. Then, set up your programs to use monitor of Mumble as input device. E.g. in OBS:



              Screenshot of OBS configuration



              Copy of mic_over_mumble script (rev 59091372580f481320224532aeaaea84c9c07848)



              #!/bin/bash
              set -e
              # PAID = PulseAudio ID
              # ID = PID / process ID

              function main () {
              if [ ! -e ~/.mic_over_Mumble ]; then
              mkdir ~/.mic_over_Mumble
              fi
              cd ~/.mic_over_Mumble

              rm murmur.ini | true
              echo "bonjour=true" >> murmur.ini
              echo "bandwidth=130000" >> murmur.ini

              if [ ! -e ./initdone ]; then
              echo "You will need to configure Mumble client to use the lowest possible latency."
              echo "We will start Mumble now. Please complete setup wizard and go to settings to increase quality and decrease latency."
              echo "Also, mute your microphone (if you have one) in Mumble."
              echo "Then close Mumble."
              run_mumble_client_wizard
              touch ./initdone
              fi

              echo "Starting Mumble server (murmurd)..."
              MUMBLE_SERVER_ID=`run_mumble_server_bg`
              sleep 5
              echo "Starting Mumble client..."
              MUMBLE_CLIENT_ID=`run_mumble_client_bg`
              sleep 5
              echo "Fetching PulseAudio configuration..."
              MUMBLE_CLIENT_PAID=`get_mumble_client_paid`

              echo "Changing PulseAudio configuration..."
              SINK_MODULE_PAID=`add_sink`
              sleep 3
              SINK_PAID=`get_sink_paid`

              pacmd move-sink-input $MUMBLE_CLIENT_PAID $SINK_PAID

              echo "Done. Please use pavucontrol to ensure everything works."
              echo "Press Return to shut down..."
              read -n1 -s
              echo "Shutting down..."

              echo "Stopping Mumble client..."
              kill -KILL $MUMBLE_CLIENT_ID | true
              sleep 2
              echo "Stopping Mumble server..."
              kill -KILL $MUMBLE_SERVER_ID | true
              echo "Restoring PulseAudio configuration..."
              pactl unload-module $SINK_MODULE_PAID
              }

              function run_mumble_client_wizard () {
              mumble >/dev/null 2&>1
              }

              function run_mumble_client_bg () {
              MUMBLE_URL="mumble://localhost"
              mumble $MUMBLE_URL >/dev/null 2&>1 &
              echo $!
              }

              function run_mumble_server_bg () {
              murmurd -ini ./murmur.ini &
              echo $!
              }

              function get_mumble_client_paid () {
              pacmd list-sink-inputs |
              egrep "index: |application.name = " |
              cut_every_second_newline |
              egrep Mumble |
              print_second_column
              }

              function add_sink () {
              pactl load-module
              module-null-sink
              sink_name="Loopback_of_Mumble"
              sink_properties=device.description="Loopback_of_Mumble"
              }

              function get_sink_paid () {
              pacmd list-sinks |
              egrep "index: |name: " |
              cut_every_second_newline |
              egrep Loopback |
              print_second_column
              }

              # https://serverfault.com/a/375098/449626
              function cut_every_second_newline () {
              awk 'ORS=NR%2?" ":"n"'
              }

              function print_second_column () {
              awk '{print $2}'
              }

              main





              share|improve this answer




























                0












                0








                0







                I use Mumble (desktop client) + Murmur (as LAN server) + Plumble (Android/iOS client). This results in the lowest latency I've ever achieved (sounds almost like normal loopback, theoretically 7ms WiFi delay + 2x 10ms codec delay = 27 ms).



                https://github.com/pzmarzly/mic_over_mumble



                Fragments of README (rev 59091372580f481320224532aeaaea84c9c07848)



                Set all 3 programs to use best quality and minimal latency. Set mobile client to always streaming. Copy mic_over_mumble anywhere - it will use ~/.mic_over_Mumble as configuration directory. Run mic_over_mumble, then connect your mobile device to LAN server. Then, set up your programs to use monitor of Mumble as input device. E.g. in OBS:



                Screenshot of OBS configuration



                Copy of mic_over_mumble script (rev 59091372580f481320224532aeaaea84c9c07848)



                #!/bin/bash
                set -e
                # PAID = PulseAudio ID
                # ID = PID / process ID

                function main () {
                if [ ! -e ~/.mic_over_Mumble ]; then
                mkdir ~/.mic_over_Mumble
                fi
                cd ~/.mic_over_Mumble

                rm murmur.ini | true
                echo "bonjour=true" >> murmur.ini
                echo "bandwidth=130000" >> murmur.ini

                if [ ! -e ./initdone ]; then
                echo "You will need to configure Mumble client to use the lowest possible latency."
                echo "We will start Mumble now. Please complete setup wizard and go to settings to increase quality and decrease latency."
                echo "Also, mute your microphone (if you have one) in Mumble."
                echo "Then close Mumble."
                run_mumble_client_wizard
                touch ./initdone
                fi

                echo "Starting Mumble server (murmurd)..."
                MUMBLE_SERVER_ID=`run_mumble_server_bg`
                sleep 5
                echo "Starting Mumble client..."
                MUMBLE_CLIENT_ID=`run_mumble_client_bg`
                sleep 5
                echo "Fetching PulseAudio configuration..."
                MUMBLE_CLIENT_PAID=`get_mumble_client_paid`

                echo "Changing PulseAudio configuration..."
                SINK_MODULE_PAID=`add_sink`
                sleep 3
                SINK_PAID=`get_sink_paid`

                pacmd move-sink-input $MUMBLE_CLIENT_PAID $SINK_PAID

                echo "Done. Please use pavucontrol to ensure everything works."
                echo "Press Return to shut down..."
                read -n1 -s
                echo "Shutting down..."

                echo "Stopping Mumble client..."
                kill -KILL $MUMBLE_CLIENT_ID | true
                sleep 2
                echo "Stopping Mumble server..."
                kill -KILL $MUMBLE_SERVER_ID | true
                echo "Restoring PulseAudio configuration..."
                pactl unload-module $SINK_MODULE_PAID
                }

                function run_mumble_client_wizard () {
                mumble >/dev/null 2&>1
                }

                function run_mumble_client_bg () {
                MUMBLE_URL="mumble://localhost"
                mumble $MUMBLE_URL >/dev/null 2&>1 &
                echo $!
                }

                function run_mumble_server_bg () {
                murmurd -ini ./murmur.ini &
                echo $!
                }

                function get_mumble_client_paid () {
                pacmd list-sink-inputs |
                egrep "index: |application.name = " |
                cut_every_second_newline |
                egrep Mumble |
                print_second_column
                }

                function add_sink () {
                pactl load-module
                module-null-sink
                sink_name="Loopback_of_Mumble"
                sink_properties=device.description="Loopback_of_Mumble"
                }

                function get_sink_paid () {
                pacmd list-sinks |
                egrep "index: |name: " |
                cut_every_second_newline |
                egrep Loopback |
                print_second_column
                }

                # https://serverfault.com/a/375098/449626
                function cut_every_second_newline () {
                awk 'ORS=NR%2?" ":"n"'
                }

                function print_second_column () {
                awk '{print $2}'
                }

                main





                share|improve this answer















                I use Mumble (desktop client) + Murmur (as LAN server) + Plumble (Android/iOS client). This results in the lowest latency I've ever achieved (sounds almost like normal loopback, theoretically 7ms WiFi delay + 2x 10ms codec delay = 27 ms).



                https://github.com/pzmarzly/mic_over_mumble



                Fragments of README (rev 59091372580f481320224532aeaaea84c9c07848)



                Set all 3 programs to use best quality and minimal latency. Set mobile client to always streaming. Copy mic_over_mumble anywhere - it will use ~/.mic_over_Mumble as configuration directory. Run mic_over_mumble, then connect your mobile device to LAN server. Then, set up your programs to use monitor of Mumble as input device. E.g. in OBS:



                Screenshot of OBS configuration



                Copy of mic_over_mumble script (rev 59091372580f481320224532aeaaea84c9c07848)



                #!/bin/bash
                set -e
                # PAID = PulseAudio ID
                # ID = PID / process ID

                function main () {
                if [ ! -e ~/.mic_over_Mumble ]; then
                mkdir ~/.mic_over_Mumble
                fi
                cd ~/.mic_over_Mumble

                rm murmur.ini | true
                echo "bonjour=true" >> murmur.ini
                echo "bandwidth=130000" >> murmur.ini

                if [ ! -e ./initdone ]; then
                echo "You will need to configure Mumble client to use the lowest possible latency."
                echo "We will start Mumble now. Please complete setup wizard and go to settings to increase quality and decrease latency."
                echo "Also, mute your microphone (if you have one) in Mumble."
                echo "Then close Mumble."
                run_mumble_client_wizard
                touch ./initdone
                fi

                echo "Starting Mumble server (murmurd)..."
                MUMBLE_SERVER_ID=`run_mumble_server_bg`
                sleep 5
                echo "Starting Mumble client..."
                MUMBLE_CLIENT_ID=`run_mumble_client_bg`
                sleep 5
                echo "Fetching PulseAudio configuration..."
                MUMBLE_CLIENT_PAID=`get_mumble_client_paid`

                echo "Changing PulseAudio configuration..."
                SINK_MODULE_PAID=`add_sink`
                sleep 3
                SINK_PAID=`get_sink_paid`

                pacmd move-sink-input $MUMBLE_CLIENT_PAID $SINK_PAID

                echo "Done. Please use pavucontrol to ensure everything works."
                echo "Press Return to shut down..."
                read -n1 -s
                echo "Shutting down..."

                echo "Stopping Mumble client..."
                kill -KILL $MUMBLE_CLIENT_ID | true
                sleep 2
                echo "Stopping Mumble server..."
                kill -KILL $MUMBLE_SERVER_ID | true
                echo "Restoring PulseAudio configuration..."
                pactl unload-module $SINK_MODULE_PAID
                }

                function run_mumble_client_wizard () {
                mumble >/dev/null 2&>1
                }

                function run_mumble_client_bg () {
                MUMBLE_URL="mumble://localhost"
                mumble $MUMBLE_URL >/dev/null 2&>1 &
                echo $!
                }

                function run_mumble_server_bg () {
                murmurd -ini ./murmur.ini &
                echo $!
                }

                function get_mumble_client_paid () {
                pacmd list-sink-inputs |
                egrep "index: |application.name = " |
                cut_every_second_newline |
                egrep Mumble |
                print_second_column
                }

                function add_sink () {
                pactl load-module
                module-null-sink
                sink_name="Loopback_of_Mumble"
                sink_properties=device.description="Loopback_of_Mumble"
                }

                function get_sink_paid () {
                pacmd list-sinks |
                egrep "index: |name: " |
                cut_every_second_newline |
                egrep Loopback |
                print_second_column
                }

                # https://serverfault.com/a/375098/449626
                function cut_every_second_newline () {
                awk 'ORS=NR%2?" ":"n"'
                }

                function print_second_column () {
                awk '{print $2}'
                }

                main






                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Jan 16 at 16:16

























                answered Dec 30 '18 at 20:23









                pzmarzlypzmarzly

                1013




                1013






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Ask Ubuntu!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f889164%2fuse-phone-as-microphone-in-linux%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    How to change which sound is reproduced for terminal bell?

                    Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents

                    Can I use Tabulator js library in my java Spring + Thymeleaf project?