Stream your PC audio to a Discord voice channel in real time with ultra-low latency.
Perfect for hearing your PC through your PS5, phone, or any device that runs Discord.
A lightweight Discord bot that captures your PC's audio output through a virtual audio cable and retransmits it into a Discord voice channel — in real time with minimal delay.
The main use case: You're gaming on PS5 with Discord open, but you also want to hear your PC (music, videos, game audio from your second monitor). This bot bridges that gap — your PC audio plays through the Discord voice channel, and you hear it on any connected device.
| Feature | Description |
|---|---|
| Ultra-Low Latency | Optimized FFmpeg pipeline with tuned buffers — audio delay is barely perceptible |
| Auto-Reconnect | Drops happen — the bot reconnects automatically with exponential backoff |
| Fully Configurable | Every setting lives in a .env file — tweak latency, priority, devices, and more |
| Secure by Design | No hardcoded tokens — secrets stay in .env which is git-ignored |
| Process Priority Boost | Optionally runs at Realtime or High priority to minimize jitter |
| Self-Deafened | Bot deafens itself by default to prevent echo loops |
| Health Monitoring | Continuously checks the audio stream and restarts it if it stops |
| Quality Presets | Choose from Low, Balanced, High, or Ultra — zero latency impact |
| Bad Internet Mode | Enables Opus FEC + reduced bitrate for unstable connections |
| Live Commands | Change quality, toggle bad-internet, check status — all while running |
| Clean Codebase | Clear function names, full documentation — easy to read and modify |
| Minimal Footprint | Only enables the Discord intents it actually needs |
PC Audio Output
|
v
Virtual Audio Cable (VB-Audio / VoiceMeeter)
|
v
FFmpeg (DirectShow capture, ultra-low latency)
|
v
Discord Bot → Voice Channel
|
v
Any device on Discord (PS5, phone, tablet...)
- A virtual audio cable (like VB-Audio) routes your PC audio to a virtual input device
- FFmpeg captures from that device with aggressively tuned low-latency settings
- The Discord bot streams the raw PCM audio into your voice channel
- You join the same channel on your PS5 / phone / other device and hear everything
- Python 3.10+ — Download
- FFmpeg — Download (place
ffmpeg.exein the project folder, or set the path in.env) - VB-Audio Virtual Cable — Download (free)
- A Discord Bot — Create one here
git clone https://github.com/Gonic1/discord-audio-bridge.git
cd discord-audio-bridgepip install -r requirements.txtcp .env.example .envOpen .env and fill in:
BOT_TOKEN— your Discord bot tokenVOICE_CHANNEL_ID— right-click the voice channel in Discord → Copy Channel IDAUDIO_DEVICE— the name of your virtual cable (check Windows Sound settings)
python bot.pyThe bot will connect and start streaming. You'll see:
[PRIORITY] High — reduced latency jitter.
[BOT] Logged in as YourBot#1234
[STREAM] Connecting to #your-channel (Your Server)...
[STREAM] Audio streaming started.
[QUALITY] balanced — 64kbps stereo
Once the bot is running, type commands directly in the terminal:
| Command | Description |
|---|---|
quality <preset> |
Switch audio quality: low, balanced, high, ultra |
bad-internet <on|off> |
Toggle bad internet mode (FEC + low bitrate) |
status |
Show current settings and connection state |
help |
List all commands |
quit / exit |
Stop the bot |
Changes apply instantly — no restart needed. Only the Opus encoder bitrate changes; the FFmpeg pipeline is never touched.
All settings live in your .env file. Only BOT_TOKEN and VOICE_CHANNEL_ID are required.
| Variable | Default | Description |
|---|---|---|
BOT_TOKEN |
required | Your Discord bot token |
VOICE_CHANNEL_ID |
required | Target voice channel ID |
AUDIO_DEVICE |
CABLE Output (VB-Audio Virtual Cable) |
Virtual audio cable device name |
FFMPEG_PATH |
ffmpeg.exe |
Path to FFmpeg binary |
RECONNECT_DELAY |
2 |
Initial reconnect delay (seconds) |
AUDIO_QUALITY |
balanced |
Quality preset: low, balanced, high, ultra |
BAD_INTERNET |
false |
Enable FEC + reduced bitrate for unstable connections |
ENABLE_CONSOLE |
true |
Enable/disable the live command console |
| Preset | Bitrate | Best for |
|---|---|---|
low |
48 kbps | Saving bandwidth, voice content |
balanced |
128 kbps | General use — music, games, videos (default) |
high |
256 kbps | High-fidelity music streaming |
ultra |
384 kbps | Maximum quality Discord supports |
Presets only change the Opus encoder bitrate — the FFmpeg audio pipeline is never modified. Zero additional latency, zero risk of breaking audio.
Set BAD_INTERNET=true if your connection is unstable. This enables:
- Opus FEC (Forward Error Correction) — embeds recovery data so lost packets can be reconstructed from the next one
- 32kbps bitrate — reduces bandwidth requirements
- 25% expected packet loss — tells Opus to optimize for lossy conditions
FEC is built into the Opus codec and adds no extra latency — it's recovery data piggybacked onto existing packets.
AUDIO_BUFFER_SIZE=10is the sweet spot for most systems. Go lower (5) if you have a fast CPU, higher (20-50) if you hear cracklingPROCESS_PRIORITY=realtimegives the best latency but requires running as AdministratorHEALTH_CHECK_INTERVAL=0.5means the bot detects a dead stream within half a second
- Install VB-Audio Virtual Cable
- Open Windows Sound Settings
- Set your default playback device to CABLE Input (this routes audio into the cable)
- The bot captures from CABLE Output (the other end of the cable)
Tip: If you want to hear audio on your PC and stream it, use VoiceMeeter to split the output to both your speakers and the virtual cable.
- Go to the Discord Developer Portal
- Click New Application → name it anything
- Go to Bot → click Reset Token → copy the token into your
.env - Under Privileged Gateway Intents, no special intents are needed
- Go to OAuth2 → URL Generator:
- Scopes:
bot - Permissions:
Connect,Speak
- Scopes:
- Open the generated URL to invite the bot to your server
discord-audio-bridge/
├── bot.py # Main bot — the only file you need to run
├── .env.example # Configuration template
├── .env # Your local config (git-ignored)
├── requirements.txt # Python dependencies
├── ffmpeg.exe # FFmpeg binary (git-ignored, download separately)
├── LICENSE # MIT License
└── README.md # This file
A compiled .exe release is also available in Releases — no Python install required.
| Problem | Solution |
|---|---|
BOT_TOKEN is missing |
Create a .env file from .env.example and add your token |
FFmpeg not found |
Download FFmpeg and place ffmpeg.exe in the project folder |
Channel not found |
Make sure VOICE_CHANNEL_ID is correct and the bot is in the server |
| Audio crackling | Increase AUDIO_BUFFER_SIZE to 20 or 50 |
| High delay | Decrease AUDIO_BUFFER_SIZE, set PROCESS_PRIORITY=realtime, run as admin |
| Bot keeps reconnecting | Check that your virtual audio cable is installed and the device name matches |
MIT License — see LICENSE for details.
Made by Blank