ReTeamSpeak 25af2cb295 feat: implement voice packet parsing, Opus codec, jitter buffer, and cpal playback
Voice packet parsing (tscore/protocol/voice.rs):
- VoicePacket and WhisperPacket types with parse/serialize
- Codec type, sample rate, channel count detection
- Tests for roundtrip and error cases

Opus codec (tsaudio/codec.rs):
- Real Opus encoder/decoder with opus crate (behind feature gate)
- 48kHz mono/stereo support
- Encode/decode with proper error handling

Jitter buffer (tsaudio/buffer.rs):
- Sequence number based reordering
- Adaptive output timing (20ms intervals)
- Packet loss handling with fallback to oldest frame
- Tests for basic and reorder scenarios

cpal playback (tsaudio/playback.rs):
- Default output device detection
- f32 and i16 sample format support
- Ring buffer for smooth playback
- Device listing

AudioFrame enhanced with sequence and codec fields.
2026-05-12 20:08:23 +09:00

ReTeamSpeak

Cross-platform TeamSpeak 3 client supporting Windows, macOS, Linux, iOS, and Android.

Features

  • TeamSpeak 3 protocol implementation (UDP, AES-128-EAX encryption)
  • Voice communication with Opus codec
  • Text messaging (server, channel, private)
  • Channel and client management
  • Identity and bookmark management
  • Cross-platform UI (Tauri v2 + React)

Architecture

src/
├── shared/          # Shared types (~700 lines)
├── tscore/          # Protocol core (~1800 lines)
│   ├── protocol/    # Packet parsing, commands
│   ├── crypto/      # AES-EAX, ECDH, SHA
│   └── connection/  # Handshake, state machine, resend
├── tsaudio/         # Audio engine (~280 lines)
├── tsdb/            # Database layer (~400 lines)
└── tauri-app/       # Application shell
    ├── src-tauri/   # Rust backend
    └── frontend/    # React frontend

Build

Prerequisites

  • Rust 1.70+
  • Node.js 20+
  • System dependencies (see below)

Linux

sudo apt install libdbus-1-dev pkg-config libgtk-3-dev \
  libwebkit2gtk-4.1-dev libayatana-appindicator3-dev \
  librsvg2-dev libssl-dev libasound2-dev

Build Commands

# Build core libraries
cargo build -p shared -p tscore -p tsaudio -p tsdb

# Run tests
cargo test -p shared -p tscore -p tsaudio -p tsdb

# Build frontend
cd src/tauri-app/frontend && npm install && npm run build

# Build desktop app
cd src && cargo build --release

Using Podman (no root)

podman run --rm -v $(pwd):/workspace:Z -w /workspace/src \
  docker.io/library/debian:trixie bash -c "
    apt-get update -qq &&
    apt-get install -y -qq curl pkg-config libdbus-1-dev libgtk-3-dev \
      libwebkit2gtk-4.1-dev libayatana-appindicator3-dev librsvg2-dev \
      libssl-dev libasound2-dev build-essential &&
    curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y &&
    source \$HOME/.cargo/env &&
    cargo test -p shared -p tscore -p tsaudio -p tsdb
  "

Documentation

  • SRS - Software Requirements Specification
  • SAD - Software Architecture Document
  • SDD - Software Design Document
  • Protocol - TS3 Protocol Analysis
  • Protocol Stack - Protocol Stack Details

License

MIT OR Apache-2.0

S
Description
Cross-platform TeamSpeak 3 client
Readme
589 KiB
Languages
Rust 97.2%
Shell 1.9%
Dockerfile 0.9%