Created
May 7, 2022 13:51
-
-
Save hfsaito/d26972a3d9214dee996ec9e8dd07213f to your computer and use it in GitHub Desktop.
Workaround to stream audio of an app through discord in ubuntu
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# List inputs to get the mic name | |
# pactl list sources | grep "Source\|State\|Name\|Description" | |
# List outputs to get hte output name | |
# pactl list sinks | grep "Sink\|State\|Name\|Description" | |
# Creates 2 audio nodes | |
pactl load-module module-null-sink sink_name=StreamAudio sink_properties=device.description=StreamAudio | |
pactl load-module module-null-sink sink_name=AppAudio sink_properties=device.description=AppAudio | |
# Direct mic audio direct to stream | |
pactl load-module module-loopback source=alsa_input.pci-0000_00_1b.0.analog-stereo sink=StreamAudio | |
# Direct the application audio to output and to stream | |
pactl load-module module-loopback source=AppAudio.monitor sink=alsa_output.pci-0000_00_1b.0.analog-stereo | |
pactl load-module module-loopback source=AppAudio.monitor sink=StreamAudio | |
# After running this script open PulseAudio Volume Control | |
# Set WEBRTC VoiceEngine to StreamAudio | |
# Set your application audio to AppAudio |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment