TeamSpeak: Audio Quality Optimization Guide
Master Opus codecs, audio settings, and quality optimization techniques for crystal-clear voice communication on your TeamSpeak server.
Codec Overview
TeamSpeak Codecs
| Codec | Quality | Bandwidth | Best For |
|---|---|---|---|
| Opus Voice | Excellent | 6-40 kbps | General voice chat |
| Opus Music | Superior | 40-128 kbps | Music streaming, high fidelity |
| CELT Mono | Good | 16-48 kbps | Legacy compatibility |
| Speex | Fair | 8-32 kbps | Low bandwidth (deprecated) |
Opus Codec Advantages
- Low Latency: 5-20ms encoding delay
- Adaptive Bitrate: Adjusts to network conditions
- Wide Range: 6 kHz to 48 kHz sampling
- Efficient: Better quality at lower bitrates
Server-Side Audio Configuration
Default Codec Settings
# Via ServerQuery
use sid=1
# Set default codec to Opus Voice
serveredit virtualserver_codec_encryption_mode=2
# Configure voice codec quality (0-10)
serveredit virtualserver_default_channel_codec=4 # Opus Voice
serveredit virtualserver_default_channel_codec_quality=7
# Set max bandwidth
serveredit virtualserver_max_download_total_bandwidth=6553600
serveredit virtualserver_max_upload_total_bandwidth=6553600
Channel-Specific Codec Configuration
# Create high-quality music channel
channelcreate channel_name=Music\ Room \
channel_codec=5 \ # Opus Music
channel_codec_quality=10 \
channel_codec_is_unencrypted=0
# Create low-bandwidth channel
channelcreate channel_name=Mobile\ Users \
channel_codec=4 \ # Opus Voice
channel_codec_quality=4 \
channel_maxclients=50
# Edit existing channel codec
channeledit cid=CHANNEL_ID channel_codec=5 channel_codec_quality=10
Client-Side Audio Settings
Optimal Client Configuration
🎤 Capture Settings
Mode: Voice Activation or Push-to-Talk
Sensitivity: Adjust to filter background noise
Sample Rate: 48 kHz
🔊 Playback Settings
Output Device: High-quality headphones/speakers
Volume: 80-90% for clarity
3D Sound: Enable for positional audio
⚙️ Processing
Echo Cancellation: Enable
Noise Reduction: Medium
AGC: Automatic Gain Control ON
Voice Activation Detection (VAD)
| Setting | Quiet Environment | Noisy Environment |
|---|---|---|
| Sensitivity | -40 dB | -20 dB |
| Voice Hold | 200ms | 500ms |
| Voice Delay | 50ms | 100ms |
Bandwidth Management
Bandwidth Requirements by Quality
| Quality Level | Codec | Bitrate | Bandwidth/User |
|---|---|---|---|
| Low (Mobile) | Opus Voice | 12 kbps | ~15 kbps |
| Medium (Standard) | Opus Voice | 24 kbps | ~30 kbps |
| High (Gaming) | Opus Voice | 40 kbps | ~50 kbps |
| Ultra (Music) | Opus Music | 96 kbps | ~120 kbps |
Calculate Server Bandwidth
# Formula: Total Bandwidth = Users × Bitrate × 1.25 (overhead)
# Example: 100 users at 40 kbps
100 users × 40 kbps × 1.25 = 5,000 kbps = 5 Mbps upload
# Configure server bandwidth limits
serveredit virtualserver_max_download_total_bandwidth=10485760 # 10 MB/s
serveredit virtualserver_max_upload_total_bandwidth=10485760 # 10 MB/s
Audio Quality Optimization
Recommended Quality Presets
Gaming/Voice Chat (Balanced)
# Server settings
virtualserver_default_channel_codec=4 # Opus Voice
virtualserver_default_channel_codec_quality=7 # High quality
# Channel settings
channel_codec=4
channel_codec_quality=7
channel_codec_latency_factor=1 # Low latency
Music Streaming (Maximum Quality)
# Server settings
virtualserver_default_channel_codec=5 # Opus Music
virtualserver_default_channel_codec_quality=10 # Maximum
# Channel settings
channel_codec=5
channel_codec_quality=10
channel_codec_latency_factor=2 # Higher quality over latency
Mobile/Low Bandwidth (Efficient)
# Server settings
virtualserver_default_channel_codec=4 # Opus Voice
virtualserver_default_channel_codec_quality=4 # Medium
# Channel settings
channel_codec=4
channel_codec_quality=4
channel_codec_latency_factor=1
Advanced Audio Features
3D Positional Audio
# Enable 3D sound in channel
channeledit cid=CHANNEL_ID channel_flag_are_subscribed=1
# Client must enable 3D sound in settings
# Options > Playback > Enable 3D Sound
# Useful for:
# - Gaming communities
# - Virtual meetings
# - Spatial audio experiences
Audio Recording Quality
# Server-side recording settings
# Note: Recording requires explicit user consent
# High-quality recording
recording_codec=5 # Opus Music
recording_quality=10
recording_sample_rate=48000
# Storage-efficient recording
recording_codec=4 # Opus Voice
recording_quality=6
recording_sample_rate=24000
Troubleshooting Audio Issues
Common Audio Problems
| Issue | Cause | Solution |
|---|---|---|
| Robotic voice | Packet loss, low bandwidth | Reduce codec quality, check network |
| Echo/feedback | Microphone picking up speakers | Use headphones, enable echo cancellation |
| Cutting out | VAD sensitivity too high | Lower sensitivity or use PTT |
| Background noise | Poor noise suppression | Enable noise reduction, adjust mic gain |
| Low volume | Gain settings too low | Increase capture volume, enable AGC |
Audio Diagnostic Commands
# Check server codec settings
serverinfo | grep codec
# View channel codec configuration
channelinfo cid=CHANNEL_ID | grep codec
# Monitor bandwidth usage
serverrequestconnectioninfo
# Check client audio stats
clientinfo clid=CLIENT_ID | grep -E "(bytes|packets)"
Performance Monitoring
Audio Quality Metrics
#!/bin/bash
# monitor_audio_quality.sh
# Check packet loss
echo "Checking packet loss..."
serverrequestconnectioninfo | grep -E "(packetloss|ping)"
# Monitor bandwidth usage
echo "Bandwidth usage:"
serverinfo | grep -E "(bandwidth|bytes)"
# Check codec distribution
echo "Active codecs:"
channellist | grep codec
# Alert if packet loss > 5%
PACKET_LOSS=$(serverrequestconnectioninfo | grep packetloss | cut -d= -f2)
if [ "$PACKET_LOSS" -gt 5 ]; then
echo "WARNING: High packet loss detected: ${PACKET_LOSS}%"
fi
Bandwidth Usage Dashboard
#!/usr/bin/env python3
# bandwidth_monitor.py
import ts3
import time
with ts3.query.TS3Connection("localhost") as ts3conn:
ts3conn.login(
client_login_name="serveradmin",
client_login_password="password"
)
ts3conn.use(sid=1)
while True:
# Get server info
info = ts3conn.serverinfo()
# Calculate bandwidth
bytes_sent = int(info['connection_bytes_sent_total'])
bytes_received = int(info['connection_bytes_received_total'])
print(f"Upload: {bytes_sent / 1024 / 1024:.2f} MB")
print(f"Download: {bytes_received / 1024 / 1024:.2f} MB")
time.sleep(60)
Pro Tip: For music streaming, use Opus Music codec at quality 10. For voice chat, Opus Voice at quality 7 provides excellent clarity with reasonable bandwidth.
Deliver crystal-clear audio to your community. Host your TeamSpeak server with Supercraft for optimized audio performance.