Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save diyism/5959444e324a1b38509d956beb760e6a to your computer and use it in GitHub Desktop.
Save diyism/5959444e324a1b38509d956beb760e6a to your computer and use it in GitHub Desktop.
Use your android phone as a karaoke microphone in Linux

micclient+WoMic is close source, while Mumble is open source, so on armbian tv, I can only use Mumble+Murmurd+Plumble.

====================1. "mumble+murmurd"(on arm64 armbian linux tv)+plumble(on android/ios)====================

refer: https://github.com/diyism/mic_over_mumble
sudo apt install mumble mumble-server
sudo systemctl stop mumble-server.service
sudo /lib/systemd/systemd-sysv-install disable mumble-server
wget https://github.com/pzmarzly/mic_over_mumble/raw/master/mic_over_mumble
chmod 744 mic_over_mumble
./mic_over_mumble
#config echo cancellation
#config minimal delay 20ms
#next next and exit and murmurd server started
#muble client started, input a random user name
#install plumble free version on your phone
#start plumble and cancel certification generation
#input a random user name that is different to the mumble client user name on armbian tv
#now you can sing to your phone, and your voice will be played on the armbian tv immediately

====================2. "micclient-x86_64.AppImage"(on amd64 linux pc)+Wo Mic(on android)====================

If your linux release is using pavucontrol(pulseaudio), you should do:

$ pulseaudio -k
$ killall micclient-x86_64.AppImage
$ sudo modprobe -r snd-aloop       #if pipewire + wireplumber, need killal wireplumber first
$ sudo vi /etc/pulse/default.pa

add into default.pa:

load-module module-alsa-source device=hw:CARD=Loopback,DEV=1,SUBDEV=0
$ sudo modprobe snd-aloop
$ pulseaudio --start                #if pipewire, to start:  systemctl --user start wireplumber
$ wget https://wolicheng.com/womic/softwares/micclient-x86_64.AppImage
$ sudo mv micclient-x86_64.AppImage /usr/bin/MicClient
$ sudo chmod 777 /usr/bin/MicClient
$ while true; do nohup MicClient -t Wifi 192.168.1.100 > /dev/null 2>&1; sleep 1; done &

192.168.1.100 is my phone IP in local network, you should change it to your phone's LAN ip.

In pavucontrol(Volume Control), in "Input Devices" tab, enable "Built-in Audio"(not "Built-in Audio Analog Stereo") as input device.

In kali,  pavucontrol > Configuration > Pro Audio, then Input Devices > Loopback Pro 1 > Set as fallback
if no "volume meters activity" below "Loopback Pro 1", to do:
1. pavucontrol > Configuration > Off;   2.killall MicClient then rerun it; 3. pavucontrol > Configuration > Pro Audio

And redirect MicClient audio to virtual output device, first in "pavucontrol/Input Devices" to tick "Built-in Audio" to "Set as fallback" and then:

$ pactl load-module module-loopback latency_msec=1

Now with WoMic in android and micclient-x86_64.AppImage in x64 linux, you have a set of home karaoke equipment with near 0 latency.

If you hear many noises, you could try to switch the "WO Mic Settings/Audio source" in your android phone, for example: nexus 6p should choose "Mic(mode 2)".

To disable redirecting MicCleint audio to Output Device:

$ pactl unload-module module-loopback

====================3. "audiorelay-0.27.5.deb"(on amd64 linux pc)+ AudioRelay(on android)==================== Android:

AudioRelay app > Server > Sources > Microphone

Debian linux:

$ wget https://dl.audiorelay.net/setups/linux/audiorelay-0.27.5.deb
$ sudo dpkg -i audiorelay-0.27.5.deb
$ AudioRelay  (maybe in /opt/audiorelay/bin/AudioRelay)

AudioRelay application > Player > Audio device > Default ALSA Device
AudioRelay application > Player > Servers > Click "your phone name >" to connect
now, your phone mic will play into your linux pc's speaker

If you just want to play into the linux's microphone, change the 1st setting to:
AudioRelay application > Player > Audio device > Loopback

AudioRelay is  better than WoMic while the local LAN router is busy, WoMic will produce many sawteeth wave.
@JINMORIX
Copy link

JINMORIX commented Dec 6, 2023

actually worked on my phone with android 4 and custom rom android 6

@juniorohanyere
Copy link

😥

@JINMORIX
Copy link

JINMORIX commented Dec 6, 2023

share me a record !

@juniorohanyere
Copy link

WhatsApp.Video.2023-12-06.at.3.39.45.PM.mp4

@JINMORIX
Copy link

JINMORIX commented Dec 6, 2023

so sad : ( , i will try the app on my friend phone

@juniorohanyere
Copy link

thanks @JINMORIX

@JINMORIX
Copy link

JINMORIX commented Dec 6, 2023

386826786_648366290838889_8039828218965543393_n

its working , he also using wo mic

@juniorohanyere
Copy link

do you think it has something to do with installing from the prebuilt app provided on the release page

@JINMORIX
Copy link

JINMORIX commented Dec 6, 2023

did u try to enable usb debugging !

@juniorohanyere
Copy link

yeah, of course, you can recheck the screen recording

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment