A Python application for streaming 16-channel communications audio from Digital Loggers Inc. devices to Icecast servers on Linux.
Information about the Digital Loggers Inc. device is available at https://dlidirect.com/products/16-channel-usb-call-logger. It is an excellent product. If this software doesn't work properly, it is not the fault of the DLI product.
DLI-TEA interfaces with Digital Loggers Inc. 16-channel audio recording devices to provide real-time streaming to Icecast servers. Perfect for emergency services, public safety communications, and professional audio monitoring.
- Device: Digital Loggers Inc. 16-channel communications audio recorder
- Controller: XILINX XC95144 CPLD with 16x WM8510G Audio Codecs
- USB Interface: FTDI FT2232H Dual Channel (VID: 0403, PID: 6010)
- Serial Number: FTWIQIS4 (device-specific)
- Platform: Linux (tested on Ubuntu 20.04+) and macOS
- USB: USB 2.0/3.0 port for device connection
- 16-Channel Audio Streaming: Real-time streaming of all 16 audio channels (16x WM8510G codecs)
- Sample Rate: 3049 Hz per channel with 16-bit depth
- WAV Recording: Simultaneous streaming and multi-channel WAV file recording
- LCD Status Monitoring: Enhanced terminal-based status monitoring (LCD protocol proprietary)
- Configuration-Driven: JSON-based device and streaming configuration
- Icecast Integration: Professional streaming server integration
- Production Ready: Robust error handling, logging, and graceful LCD timeout handling
- FTDI Interface: High-speed USB data transfer via pyftdi (FT2232H)
- Hardware Verified: Configuration based on actual hardware disassembly and analysis
# Linux (Ubuntu/Debian)
sudo apt-get update
sudo apt-get install libusb-1.0-0-dev python3-dev icecast2
# Audio format conversion dependencies
sudo apt-get install ffmpeg lame
# Install uv package manager
curl -LsSf https://astral.sh/uv/install.sh | shNote: FFmpeg and LAME are required for audio format conversion (MP3, OGG, etc.)
# Clone and setup
git clone <repository-url>
cd DLI-TEA
uv sync
# Configure your device and Icecast settings
cp config.json.example config.json
# Edit config.json with your device serial and Icecast credentials
# See CONFIG_SETUP.md for detailed instructions# Test 16-channel configuration
uv run python test_16ch_config.py
# Enhanced streaming with status monitoring
uv run python dli_enhanced_streamer.py
# Streaming with WAV recording
uv run python dli_streamer_with_recording.py
# Production streaming
uv run python dli_production_streamer.py
# Record 16-channel sample
uv run python record_16ch_sample.py
# Test LCD functionality (timeouts expected)
uv run python test_lcd_display.pyDLI-TEA/
βββ dli_streamer.py # Core 16-channel device interface
βββ dli_enhanced_streamer.py # Enhanced streaming with status monitoring
βββ dli_streamer_with_recording.py # Streaming + WAV recording
βββ dli_production_streamer.py # Production-ready streamer
βββ dli_status_monitor.py # Real-time status monitoring
βββ dli_lcd_controller.py # LCD control framework (protocol unknown)
βββ dli_lcd_research.py # LCD protocol analysis
βββ config.json # 16-channel device configuration (not in git)
βββ config.json.example # Template configuration (safe to commit)
βββ CONFIG_SETUP.md # Configuration setup instructions
βββ test_16ch_config.py # 16-channel configuration test
βββ test_lcd_display.py # LCD functionality test
βββ record_16ch_sample.py # 16-channel sample recording
βββ dli_16ch_hardware_verified.wav # Verified 16-channel sample
βββ recordings/ # Output WAV files directory
βββ docs/ # Documentation
βββ examples/ # Usage examples
The 16-channel DLI device configuration:
{
"device": {
"name": "Digital Loggers Inc. 16-Channel Audio Recorder",
"serial_number": "FTWIQIS4",
"vendor_id": "0x0403",
"product_id": "0x6010",
"description": "FT2232H Dual Channel - 16x WM8510G Codecs",
"sample_rate": 3049,
"bits_per_sample": 16,
"total_channels": 16
},
"global_settings": {
"enable_lcd_control": false,
"logging_level": "INFO",
"chunk_size": 2048,
"buffer_size": 65536
},
"icecast": {
"server": "localhost",
"port": 8000,
"password": "hackme",
"mount": "/dli_audio.mp3"
}
}- Controller: XILINX XC95144 CPLD (main controller)
- Audio Codecs: 16x WM8510G (Wolfson/Cirrus Logic)
- Channel Count: 16 (one codec per channel)
- Sample Rate: 3049 Hz per channel
- Bit Depth: 16-bit
- Interface: FTDI FT2232H (dual channel USB)
- USB VID:PID: 0403:6010 (FTDI FT2232H)
- Serial Number: FTWIQIS4
- Description: "USB <-> Serial Converter"
Hardware Limitation:
- Front Panel LCD: Shows "Waiting for PC" (proprietary protocol)
- Protocol: DLI-specific commands (documentation not available)
- Timeout Behavior: Standard LCD commands result in USB timeouts
- Solution: Enhanced terminal-based status monitoring
Status Monitoring Features:
π§ DLI DEVICE STATUS MONITOR
=====================================
π Device Status: CONNECTED (2m 45s)
π΅ Streaming Status: ACTIVE (2m 30s)
π Active Channels: 16/16
π Total Samples: 487,235
β‘ Data Flow: π’ LIVE
π Device Health: π’ EXCELLENT
- Enhanced Streaming:
dli_enhanced_streamer.py- Real-time status monitoring - Recording Mode:
dli_streamer_with_recording.py- Stream + WAV recording - Production Mode:
dli_production_streamer.py- Production-ready operation - Sample Recording:
record_16ch_sample.py- Create 16-channel WAV samples
# Check FTDI device detection
uv run python -c "
from pyftdi.ftdi import Ftdi
devices = Ftdi.list_devices()
print('Available FTDI devices:')
for device in devices:
print(f' {device}')
"
# Test 16-channel configuration
uv run python test_16ch_config.py
# Verify hardware with sample recording
uv run python record_16ch_sample.py# Disable LCD initialization (recommended)
# In config.json:
"global_settings": {
"enable_lcd_control": false
}
# Enable LCD attempts (will timeout with proprietary protocol)
"global_settings": {
"enable_lcd_control": true
}# Create systemd service
sudo cp scripts/dli-streamer.service /etc/systemd/system/
sudo systemctl enable dli-streamer
sudo systemctl start dli-streamer
# Monitor logs
journalctl -u dli-streamer -f# Test 16-channel device configuration
uv run python test_16ch_config.py
# Test LCD timeout handling
uv run python test_lcd_graceful.py
# Verify LCD is disabled
uv run python test_lcd_disabled.py
# Record verification sample
uv run python record_16ch_sample.py
# Test enhanced streaming
uv run python dli_enhanced_streamer.pyβββββββββββββββββββββββββββ
β Digital Loggers Device β β 16-channel audio input
β XILINX XC95144 + 16x β β CPLD + WM8510G codecs
β WM8510G Audio Codecs β
β (FTDI FT2232H USB) β
βββββββββββββββ¬ββββββββββββ
β USB data stream (3049Hz Γ 16ch)
βΌ
βββββββββββββββββββββββββββ
β DLIAudioDevice β β pyftdi interface
β β’ FTDI FT2232H comm β
β β’ Device detection β
β β’ 16-channel parsing β
β β’ Sample rate: 3049Hz β
βββββββββββββββ¬ββββββββββββ
β 16-channel audio data
βΌ
βββββββββββββββββββββββββββ
β Enhanced Streaming β β Status monitoring
β β’ Real-time monitoring β
β β’ WAV recording β
β β’ Terminal status β
β β’ LCD timeout handling β
βββββββββββββββ¬ββββββββββββ
β Processed streams
βΌ
βββββββββββββββββββββββββββ
β Icecast Integration β β Audio distribution
β β’ MP3 streaming β
β β’ Multi-channel WAV β
β β’ Status monitoring β
βββββββββββββββββββββββββββ
DLI-TEA includes advanced audio processing to eliminate pulsing noise and artifacts:
- Consistent Chunking: Fixed 800-sample chunks (~100ms) for stable encoding
- DC Offset Removal: Eliminates low-frequency pulsing from DC bias
- Soft Clipping: Prevents harsh digital artifacts from audio peaks
- Smooth Streaming: Thread-safe buffering with consistent timing
- Optimized Encoding: Efficient MP3/audio format conversion
# Test audio format conversion quality
uv run python test_audio_formats.py
# Diagnose audio quality issues
uv run python diagnose_audio.py
# Verify pulsing noise fixes
uv run python test_pulsing_fix.py| Issue | Cause | Solution |
|---|---|---|
| Pulsing noise | Inconsistent chunks, DC offset | Use smooth streaming (automatic) |
| Clipping artifacts | Audio levels too high | Enable soft clipping in config |
| Low volume | Gain settings | Adjust audio.gain in config.json |
| Format errors | Codec issues | Check FFmpeg/LAME installation |
{
"audio_format": {
"output_format": "mp3", // Use mp3 for best compatibility
"quality": "high", // Use high for clear audio
"sample_rate": 8000, // Match DLI device rate
"channels": 1 // Communications audio is mono
},
"audio": {
"gain": 1.0, // 1.0 = no change, >1.0 = boost
"high_pass_filter": true, // Remove low frequency noise
"noise_gate": true // Reduce background noise
}
}Based on hardware disassembly, the DLI device contains:
- 1x XILINX XC95144 TQ100AEM0017: CPLD controller chip
- 16x WM8510G Audio Codecs: Wolfson/Cirrus Logic audio ICs
- FTDI FT2232H Interface: Dual-channel USB-to-serial converter
- Configuration: One audio codec per channel = 16 total channels
# Verify 16-channel configuration
uv run python test_16ch_config.py
# Record hardware-verified 16-channel sample
uv run python record_16ch_sample.py
# Check generated WAV file
file dli_16ch_hardware_verified.wav
# Output: WAVE audio, Microsoft PCM, 16 bit, 16 channels 3049 Hz# Install development dependencies
uv sync --dev
# Test device connection
uv run python test_16ch_config.py
# Test streaming functionality
uv run python dli_enhanced_streamer.pypyftdi>=0.54.0- FTDI device communicationpyusb>=1.2.1- USB device interface
libusb-1.0-0-dev- USB libraryicecast2- Streaming serverpython3-dev- Python development headers
# Check USB connection (correct VID:PID for FT2232H)
lsusb | grep "0403:6010"
# Check for specific serial number
lsusb -v | grep -A 10 -B 10 "FTWIQIS4"
# Test FTDI device detection
uv run python -c "from pyftdi.ftdi import Ftdi; print(Ftdi.list_devices())"
# Check permissions
groups | grep dialout
# Reset USB
sudo udevadm control --reload-rules# Check Icecast status
sudo systemctl status icecast2
# Test connection
curl http://localhost:8000/admin/
# Check mount limits in /etc/icecast2/icecast.xml# LCD shows "Waiting for PC" - this is normal
# The device uses proprietary LCD protocol
# Disable LCD timeout attempts
# Set "enable_lcd_control": false in config.json
# Test that LCD timeouts are handled gracefully
uv run python test_lcd_graceful.py
# Use terminal status monitoring instead
uv run python dli_enhanced_streamer.pyThis project is open source. See LICENSE file for details.
- Fork the repository
- Create a feature branch
- Run tests:
uv run pytest - Submit a pull request
Professional Communications Audio Streaming Solution