Ask Ubuntu Asked by someanon on August 22, 2020
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).
If your phone has an audio jack, you can connect an aux cable from it to your desktop's microphone jack. Then just install an app that redirects your phone's microphone input out of the speaker such as Microphone.
Note: Make sure you have your phone's volume off mute. I normally have it on mute and thought it wasn't working at first.
In order to site my sources, I should mention that I didn't come up with this idea myself. I figured it out from a youtube video
Answered by bobjrsenior on August 22, 2020
From official WO Mic site:
Install WO Mic cient
Currently we only support x86 64-bits architecture. Download micclient-x86_64.AppImage, then change it to be executable
$ chmod +x micclient-x86_64.AppImage
WO Mic Client Operations
Load aloop module. The module shall form a full-duplex loopback soundcard.
$ sudo modprobe snd-aloop
Connect from client.
Run below commands to connect. WO Mic client shall write audio data into loopback device. If you meet glitches, please try to run the program as root so that its scheduling can be more aggressive.
Conenct by Wifi. You can find the IP address on WO Mic app UI.
$ ./micclient-x86_64.AppImage -t Wifi 192.168.1.100
Connect by Bluetooth. xx:xx:xx:xx:xx:xx represents phone Bluetooth address. You can query it on your phone: Settings -> About phone -> Status -> Bluetooth address.
$ ./micclient-x86_64.AppImage -t Bluetooth xx:xx:xx:xx:xx:xx
Now third party program can make use of captured data through loopback device. One example:
$ arecord -c 1 -r 48000 -f S16_LE -D "hw:CARD=Loopback,DEV=1,SUBDEV=0" foo.wav
Answered by Pablo Bianchi on August 22, 2020
If your linux release is using pavucontrol(pulseaudio), you should do:
$ pulseaudio -k
$ killall micclient-x86_64.AppImage
$ sudo modprobe -r snd-aloop
$ 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
$ sudo cp micclient-x86_64.AppImage /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.
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
Refer: https://gist.github.com/diyism/5959444e324a1b38509d956beb760e6a
Answered by diyism on August 22, 2020
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).
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 mic_over_mumble
anywhere - it will use ~/.mic_over_Mumble
as configuration directory.
Run mic_over_mumble
. It will start the server on LAN, then start Mumble (if asked for nickname, enter anything other than SuperUser). Then connect your mobile device to the LAN server manually. Please note that Mumble mobile app has some issues.
Then, set up your programs to use either "Monitor_of_Mumble" or "VirtualMic" as input device (they are linked). E.g. in OBS:
mic_over_mumble
script (rev 8c827fe)#!/bin/bash
set -euo pipefail
# 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)..."
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 '{print $2}'
}
main
Answered by pzmarzly on August 22, 2020
Mmmm I tried that app before but it does not work for me, so I recommend this method:
Answered by Maxtermax on August 22, 2020
Edit 2020-06-07: The site where the software was initially hosted seems to have been renamed. Please note: I was only answering a question of a user here. I have not used the software myself and I would not endorse a software I do not use myself.
Is WO Mic the program? Have you tried downloading the client/driver and following the instructions for Ubuntu?
Load driver module
$ sudo insmod wo_snd_capture-x86.ko
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.
Answered by LiveWireBT on August 22, 2020
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP