M2: tsc-audio, tsc-store and tsctl voice
- tsc-audio: Opus voice/music encoder producing TeamSpeak voice packets, framer, rubato resampling, WAV I/O, tone/Goertzel helpers, cpal capture/playback over lock-free ring buffers; the vendored AudioHandler is the jitter buffer/mixer. - tsc-store: SQLite (bundled, WAL, 0600) with migrations for identities, bookmarks, settings and paged chat history; Secrets trait with memory and OS keyring backends. - tsctl voice send (WAV or tone, real time) / record (mix to WAV, --expect-tone check). The smoke test now includes a voice round-trip: 1 kHz tone ratio ~0.95 on TS3 and TS6. - Dev profile: no debug info for dependencies (target/ 16 GB -> 2.4 GB). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NJvYyRmTjKcb9i8eyYXK5G
This commit is contained in:
20 files changed
+2379
-35
No files matched your search
@@ -6,6 +6,7 @@
|
||||
# 1. connect + channel tree (channelsubscribeall)
|
||||
# 2. server chat between two clients
|
||||
# 3. channel chat between two clients
|
||||
# 4. voice: a 1 kHz tone sent by one client is recorded by another
|
||||
#
|
||||
# Usage: scripts/it-smoke.sh [ts3|ts6]... (default: both)
|
||||
# Env: TSCTL=path/to/tsctl (default: builds target/debug/tsctl)
|
||||
@@ -77,6 +78,21 @@ chat_roundtrip() {
|
||||
grep -F "[$kind] sender" "$out"
|
||||
}
|
||||
|
||||
# One client records while another sends a tone; Goertzel checks the result.
|
||||
voice_roundtrip() {
|
||||
local addr=$1 out="$STATE_DIR/voice.log"
|
||||
"$TSCTL" connect "$addr" --nick recorder voice record "$STATE_DIR/voice.wav" \
|
||||
--seconds 6 --expect-tone 1000 >"$out" 2>&1 &
|
||||
local recorder=$!
|
||||
sleep 2
|
||||
"$TSCTL" connect "$addr" --nick talker voice send --tone 1000 --seconds 2 >/dev/null
|
||||
if ! wait "$recorder"; then
|
||||
cat "$out"
|
||||
fail "voice tone not received"
|
||||
fi
|
||||
grep "tone ratio" "$out"
|
||||
}
|
||||
|
||||
for svc in "${SERVERS[@]}"; do
|
||||
port=${PORTS[$svc]:?unknown server $svc}
|
||||
addr="127.0.0.1:$port"
|
||||
@@ -91,6 +107,7 @@ for svc in "${SERVERS[@]}"; do
|
||||
# Guests may not use the server chat by default, so the sender is the admin.
|
||||
chat_roundtrip "$addr" server "$admin"
|
||||
chat_roundtrip "$addr" channel ""
|
||||
voice_roundtrip "$addr"
|
||||
done
|
||||
|
||||
log "all smoke tests passed"
|
||||
Reference in new issue
Block a user