- Use phone as microphone in Linux
- 8 Answers 8
- For the latest version, see github.com/pzmarzly/mic_over_mumble.
- Fragments of README (rev 8c827fe)
- Copy of mic_over_mumble script (rev 8c827fe)
- Arch Linux
- #2 2019-09-16 18:57:15
- Re: WoMic noisy and unclear sound
- #3 2019-09-16 22:32:43
- Re: WoMic noisy and unclear sound
- #4 2019-10-03 10:00:57
- Re: WoMic noisy and unclear sound
- #5 2019-10-15 17:29:25
- Re: WoMic noisy and unclear sound
- #6 2019-10-15 18:57:51
- Re: WoMic noisy and unclear sound
- #7 2019-10-16 12:45:37
- Re: WoMic noisy and unclear sound
- #8 2019-10-16 13:07:42
- Re: WoMic noisy and unclear sound
- #9 2019-10-16 13:20:40
- Re: WoMic noisy and unclear sound
- #10 2021-01-25 03:32:39
- Re: WoMic noisy and unclear sound
- Как использовать Wo Mic в дискорде на Manjaro?
Use phone as microphone in Linux
I have 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 Wi-Fi or USB. (but preferably Wi-Fi).
8 Answers 8
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).
For the latest version, see github.com/pzmarzly/mic_over_mumble.
Fragments of README (rev 8c827fe)
- Install Mumble (desktop client) + Murmur (server) + Plumble (Android/iOS client). Set all 3 programs to use best quality and minimal latency. Set mobile client to always streaming.
- To install Mumble + Murmur on Ubuntu, you can use:
sudo apt install mumble mumble-server sudo systemctl stop mumble-server.service sudo systemctl disable mumble-server.service
Copy of mic_over_mumble script (rev 8c827fe)
#!/bin/bash set -euo pipefail # PAID = PulseAudio ID # / 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). " run_mumble_server_bg sleep 5 echo "Starting Mumble client. " MUMBLE_CLIENT_ID=$(run_mumble_client_bg) sleep 15 echo "Fetching PulseAudio configuration. " MUMBLE_CLIENT_PAID=$(get_mumble_client_paid) echo "Changing PulseAudio configuration. " echo "Adding sink. " SINK_MODULE_PAID=$(add_sink) sleep 3 echo "Fetching current configuration to redirect Mumble. " SINK_PAID=$(get_sink_paid) pacmd move-sink-input "$MUMBLE_CLIENT_PAID" "$SINK_PAID" echo "Adding a virtual microphone. " SOURCE_MODULE_PAID=$(add_source) echo "Done. Please use pavucontrol to ensure everything works." echo "Press Return to shut down. " read -n1 -s -r echo "Shutting down. " echo "Stopping Mumble client. " kill -KILL "$MUMBLE_CLIENT_ID" || true sleep 2 echo "Stopping Mumble server. " # TODO: find a better way to kill murmurd # (it forks, so we cannot use its PID) pkill murmurd || true echo "Restoring PulseAudio configuration. " pactl unload-module "$SOURCE_MODULE_PAID" 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 $! # TODO: here we can get murmur's PID # (uncomment the line above) >function get_mumble_client_paid () < pacmd list-sink-inputs | grep -F -e "index: " -e "media.name = " | cut_every_second_newline | grep -F -e "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 add_source () < pactl load-module \ module-virtual-source \ source_name=VirtualMic \ master=Loopback_of_Mumble.monitor \ source_properties=device.description=VirtualMic >function get_sink_paid () < pacmd list-sinks | grep -F -e "index: " -e "name: " | cut_every_second_newline | grep -F -e "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 '' > main
Arch Linux
my guesses resulted that it might be a delay in transfering data via old android phone’s hotspot and for that, i tried to create AP on my own Arch Linux (using Create_AP script) to reduce the delay as much as possible, but now again im getting the same result : noisy and unclear sound input
Im sure its not a hardware problem because im having a really clear voice on my iphone, but Womic just makes it noisy on my Arch Linux (works fine in windows, i have tested now)
1. I load the snd-aloop module (needed by womic) using the command below :
2. I run WoMic to connect to my iPhone :
sudo ./womic -t WIFI 192.168.12.19
3. I start recording sound using arecord from that sound input :
arecord -c 1 -r 48000 -f S16_LE -D "hw:CARD=Loopback,DEV=1,SUBDEV=0" Desktop.wav
this is my sound card info :
╭─erfan at erfan in /home/erfan ╰─λ lspci | grep -i audio 0 < 14:16:15 00:1b.0 Audio device: Intel Corporation 7 Series/C216 Chipset Family High Definition Audio Controller (rev 04)
edit : i also have tested sound in-action by using simplescreenrecorder and using ALSA input config on hw: 1,1 and getting the same sound on screen record
Last edited by erfanjoker (2019-09-13 09:53:43)
#2 2019-09-16 18:57:15
Re: WoMic noisy and unclear sound
#3 2019-09-16 22:32:43
Re: WoMic noisy and unclear sound
Read the Code of Conduct. We are not going to ask you again.
How to post. A sincere effort to use modest and proper language and grammar is a sign of respect toward the community.
#4 2019-10-03 10:00:57
Re: WoMic noisy and unclear sound
Also i have to mention im getting the error below after it connects in terminal :
ALSA lib pcm_dmix.c:1108:(snd_pcm_dmix_open) unable to open slave
this is the complete output and the command :
╭─erfan at erfan in /home/erfan/Wo Mic ╰─λ sudo ./womic -t WIFI 172.20.10.12 0 < 13:28:37 Connecting. ALSA lib pcm_dmix.c:1108:(snd_pcm_dmix_open) unable to open slave Connected
#5 2019-10-15 17:29:25
Re: WoMic noisy and unclear sound
Guys I have tested this feature on a live ubuntu on my laptop (the same laptop that im using arch linux) and everything worked fine !
so whats wrong with arch linux ? can u guys test wo mic on your own arch and tell me the result ? what could be possibly causing this issue ?
#6 2019-10-15 18:57:51
Re: WoMic noisy and unclear sound
dmix failed to open slave means it couldn't open up your default ALSA device. As you are using pulseaudio, you will want to install pulseaudio-alsa if you haven't yet.
#7 2019-10-16 12:45:37
Re: WoMic noisy and unclear sound
dmix failed to open slave means it couldn't open up your default ALSA device. As you are using pulseaudio, you will want to install pulseaudio-alsa if you haven't yet.
I already have pulseaudio-alsa installed
#8 2019-10-16 13:07:42
Re: WoMic noisy and unclear sound
Last edited by V1del (2019-10-16 13:08:02)
#9 2019-10-16 13:20:40
Re: WoMic noisy and unclear sound
╭─erfan at erfan in /home/erfan ╰─λ aplay -lL 0 < 16:48:07 null Discard all samples (playback) or generate zero samples (capture) jack JACK Audio Connection Kit pulse PulseAudio Sound Server default Default ALSA Output (currently PulseAudio Sound Server) sysdefault:CARD=Loopback Loopback, Loopback PCM Default Audio Device front:CARD=Loopback,DEV=0 Loopback, Loopback PCM Front speakers surround21:CARD=Loopback,DEV=0 Loopback, Loopback PCM 2.1 Surround output to Front and Subwoofer speakers surround40:CARD=Loopback,DEV=0 Loopback, Loopback PCM 4.0 Surround output to Front and Rear speakers surround41:CARD=Loopback,DEV=0 Loopback, Loopback PCM 4.1 Surround output to Front, Rear and Subwoofer speakers surround50:CARD=Loopback,DEV=0 Loopback, Loopback PCM 5.0 Surround output to Front, Center and Rear speakers surround51:CARD=Loopback,DEV=0 Loopback, Loopback PCM 5.1 Surround output to Front, Center, Rear and Subwoofer speakers surround71:CARD=Loopback,DEV=0 Loopback, Loopback PCM 7.1 Surround output to Front, Center, Side, Rear and Woofer speakers usbstream:CARD=Loopback Loopback USB Stream Output sysdefault:CARD=PCH HDA Intel PCH, ALC269VC Analog Default Audio Device front:CARD=PCH,DEV=0 HDA Intel PCH, ALC269VC Analog Front speakers surround21:CARD=PCH,DEV=0 HDA Intel PCH, ALC269VC Analog 2.1 Surround output to Front and Subwoofer speakers surround40:CARD=PCH,DEV=0 HDA Intel PCH, ALC269VC Analog 4.0 Surround output to Front and Rear speakers surround41:CARD=PCH,DEV=0 HDA Intel PCH, ALC269VC Analog 4.1 Surround output to Front, Rear and Subwoofer speakers surround50:CARD=PCH,DEV=0 HDA Intel PCH, ALC269VC Analog 5.0 Surround output to Front, Center and Rear speakers surround51:CARD=PCH,DEV=0 HDA Intel PCH, ALC269VC Analog 5.1 Surround output to Front, Center, Rear and Subwoofer speakers surround71:CARD=PCH,DEV=0 HDA Intel PCH, ALC269VC Analog 7.1 Surround output to Front, Center, Side, Rear and Woofer speakers hdmi:CARD=PCH,DEV=0 HDA Intel PCH, HDMI 0 HDMI Audio Output usbstream:CARD=PCH HDA Intel PCH USB Stream Output usbstream:CARD=ThinkPadEC ThinkPad Console Audio Control USB Stream Output **** List of PLAYBACK Hardware Devices **** card 0: Loopback [Loopback], device 0: Loopback PCM [Loopback PCM] Subdevices: 7/8 Subdevice #0: subdevice #0 Subdevice #1: subdevice #1 Subdevice #2: subdevice #2 Subdevice #3: subdevice #3 Subdevice #4: subdevice #4 Subdevice #5: subdevice #5 Subdevice #6: subdevice #6 Subdevice #7: subdevice #7 card 0: Loopback [Loopback], device 1: Loopback PCM [Loopback PCM] Subdevices: 8/8 Subdevice #0: subdevice #0 Subdevice #1: subdevice #1 Subdevice #2: subdevice #2 Subdevice #3: subdevice #3 Subdevice #4: subdevice #4 Subdevice #5: subdevice #5 Subdevice #6: subdevice #6 Subdevice #7: subdevice #7 card 1: PCH [HDA Intel PCH], device 0: ALC269VC Analog [ALC269VC Analog] Subdevices: 1/1 Subdevice #0: subdevice #0 card 1: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0] Subdevices: 1/1 Subdevice #0: subdevice #0
#10 2021-01-25 03:32:39
Re: WoMic noisy and unclear sound
Hi, I hope this is not a necrobump, but as the question is still there and not fixed and all the paramaters still remain the same, so I continue this thread.
I'm getting the Unclear and Noisy (a robot like sound which has scratches in it) when i use Womic, I can assure you my iPhone's soundcard is fine cause I tested it and is ok, I also can assure you I have tested it on Windows and Ubuntu and they both work fine !
Here are my commands and their output :
^^>>> sudo modprobe snd-aloop ^^>>> lsmod | grep snd_aloop snd_aloop 32768 3 snd_pcm 147456 10 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,soundwire_intel,snd_compress,snd_soc_core,snd_aloop,snd_hda_core,snd_pcm_dmaengine snd_timer 45056 2 snd_aloop,snd_pcm snd 114688 23 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hwdep,snd_hda_intel,snd_hda_codec,snd_hda_codec_realtek,snd_timer,snd_compress,thinkpad_acpi,snd_soc_core,snd_aloop,snd_pcm
^^>>> sudo ./womic -t Wifi 192.168.1.2 Connecting. ALSA lib pcm_dmix.c:1075:(snd_pcm_dmix_open) unable to open slave Connected
^^>>> aplay -lL null Discard all samples (playback) or generate zero samples (capture) samplerate Rate Converter Plugin Using Samplerate Library speexrate Rate Converter Plugin Using Speex Resampler jack JACK Audio Connection Kit oss Open Sound System pipewire PipeWire Sound Server pulse PulseAudio Sound Server speex Plugin using Speex DSP (resample, agc, denoise, echo, dereverb) upmix Plugin for channel upmix (4,6,8) vdownmix Plugin for channel downmix (stereo) with a simple spacialization default Default ALSA Output (currently PulseAudio Sound Server) sysdefault:CARD=PCH HDA Intel PCH, ALC269VC Analog Default Audio Device front:CARD=PCH,DEV=0 HDA Intel PCH, ALC269VC Analog Front output / input surround21:CARD=PCH,DEV=0 HDA Intel PCH, ALC269VC Analog 2.1 Surround output to Front and Subwoofer speakers surround40:CARD=PCH,DEV=0 HDA Intel PCH, ALC269VC Analog 4.0 Surround output to Front and Rear speakers surround41:CARD=PCH,DEV=0 HDA Intel PCH, ALC269VC Analog 4.1 Surround output to Front, Rear and Subwoofer speakers surround50:CARD=PCH,DEV=0 HDA Intel PCH, ALC269VC Analog 5.0 Surround output to Front, Center and Rear speakers surround51:CARD=PCH,DEV=0 HDA Intel PCH, ALC269VC Analog 5.1 Surround output to Front, Center, Rear and Subwoofer speakers surround71:CARD=PCH,DEV=0 HDA Intel PCH, ALC269VC Analog 7.1 Surround output to Front, Center, Side, Rear and Woofer speakers hdmi:CARD=PCH,DEV=0 HDA Intel PCH, HDMI 0 HDMI Audio Output usbstream:CARD=PCH HDA Intel PCH USB Stream Output sysdefault:CARD=Loopback Loopback, Loopback PCM Default Audio Device front:CARD=Loopback,DEV=0 Loopback, Loopback PCM Front output / input surround21:CARD=Loopback,DEV=0 Loopback, Loopback PCM 2.1 Surround output to Front and Subwoofer speakers surround40:CARD=Loopback,DEV=0 Loopback, Loopback PCM 4.0 Surround output to Front and Rear speakers surround41:CARD=Loopback,DEV=0 Loopback, Loopback PCM 4.1 Surround output to Front, Rear and Subwoofer speakers surround50:CARD=Loopback,DEV=0 Loopback, Loopback PCM 5.0 Surround output to Front, Center and Rear speakers surround51:CARD=Loopback,DEV=0 Loopback, Loopback PCM 5.1 Surround output to Front, Center, Rear and Subwoofer speakers surround71:CARD=Loopback,DEV=0 Loopback, Loopback PCM 7.1 Surround output to Front, Center, Side, Rear and Woofer speakers usbstream:CARD=Loopback Loopback USB Stream Output usbstream:CARD=ThinkPadEC ThinkPad Console Audio Control USB Stream Output **** List of PLAYBACK Hardware Devices **** card 0: PCH [HDA Intel PCH], device 0: ALC269VC Analog [ALC269VC Analog] Subdevices: 0/1 Subdevice #0: subdevice #0 card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0] Subdevices: 1/1 Subdevice #0: subdevice #0 card 1: Loopback [Loopback], device 0: Loopback PCM [Loopback PCM] Subdevices: 7/8 Subdevice #0: subdevice #0 Subdevice #1: subdevice #1 Subdevice #2: subdevice #2 Subdevice #3: subdevice #3 Subdevice #4: subdevice #4 Subdevice #5: subdevice #5 Subdevice #6: subdevice #6 Subdevice #7: subdevice #7 card 1: Loopback [Loopback], device 1: Loopback PCM [Loopback PCM] Subdevices: 8/8 Subdevice #0: subdevice #0 Subdevice #1: subdevice #1 Subdevice #2: subdevice #2 Subdevice #3: subdevice #3 Subdevice #4: subdevice #4 Subdevice #5: subdevice #5 Subdevice #6: subdevice #6 Subdevice #7: subdevice #7
^^>>> lspci -knn|grep -iA2 audio 07:04:24 00:1b.0 Audio device [0403]: Intel Corporation 7 Series/C216 Chipset Family High Definition Audio Controller [8086:1e20] (rev 04) Subsystem: Lenovo Device [17aa:5002] Kernel driver in use: snd_hda_intel
and for the record, you can see sample of correct sound and noisy sound that I recorded
Last edited by erfanjoker (2021-01-25 03:34:49)
Как использовать Wo Mic в дискорде на Manjaro?
Установил на Manjaro программу WoMic, юзал на Win10, очень удобно было. Перешёл на Manjaro. Тут она тоже оказалась. Подключился через Bluetooth. Написало Connecting. Connected. В интернете есть способ как записать голос в аудио, но как в live-режиме использовать нет. Помогите как это сделать!
Простой 1 комментарий
fuse2 should be added as a dependency (needed to open the .AppImage file)
Also, I wasn't ever to get this to work correctly. The Windows version worked fine for me but this Linux version is lacking. It has no PulseAudio support, very limited configurability and documentation, and is just a binary blob in an AppImage. I was trying to use this for Discord (which requires PulseAudio) but I couldn't get any PulseAudio applications to record sound off this thing no matter how much I fiddled with settings. The only thing I was able to do was record a .wav file using arecord but even that sounded extremely choppy.
I settled on using Mumble instead with this small bash script I found to set up a virtual mic in PulseAudio. GitHub link with instructions here: https://github.com/pzmarzly/mic_over_mumble
All the mumble software is open source and in the main Arch repositories and I have no problems with sound quality or getting it to work in Discord (or any other PulseAudio application since the implementation is done entirely in PulseAudio itself.)