Discord Voice Boost Bot

A Discord bot that amplifies a quiet user's microphone in real time. It joins your voice channel, receives audio from the target user, applies configurable gain with soft-clipping, and plays the boosted audio back to the channel.

Features

Real-time Amplification

Receives and boosts audio with minimal latency using raw PCM processing at 48kHz stereo.

Configurable Gain

Adjust amplification from 1x to 10x. Soft-clipping prevents harsh distortion at high levels.

Persistent Streaming

Maintains a continuous audio connection through speech gaps without dropping or cutting out.

Simple Commands

Four slash commands to control everything. Join, pick a target, set gain, and leave.

Commands

CommandDescription
/boost-joinBot joins your current voice channel
/boost-target <user>Select the quiet user to amplify
/boost-gain <1.0-10.0>Set amplification level (default 2.0)
/boost-leaveDisconnect the bot from voice

How It Works

🎤
Target User speaks in voice channel
📥
Audio Receive — bot captures Opus packets
🔄
Opus Decode — decoded to PCM S16LE 48kHz stereo
🔈
Gain Transform — amplify samples with soft-clipping
🔊
Playback — boosted audio plays to the channel

Setup

After inviting the bot to your server, join a voice channel and run /boost-join. Then use /boost-target @user to select the person whose mic you want to boost. Adjust the volume with /boost-gain (try 2.0–4.0 for most cases).

Tip: The boosted audio plays alongside the user's original voice. To avoid hearing them twice, other listeners can right-click the target user in Discord and set their User Volume to 0%.

Tech Stack

Built with TypeScript, discord.js v14, and @discordjs/voice. Audio processing uses prism-media for Opus decoding and a custom Node.js Transform stream for gain with tanh-based soft-clipping. Hosted on a VPS with pm2 for process management.