Voice 13: fluxer-voice LiveKit room and interop test #74

Closed
opened 2026-11-11 12:17:37 +00:00 by charles · 0 comments
Owner

Files:

  • Create: crates/fluxer-voice/src/rtc.rs, crates/fluxer-voice/tests/livekit_interop.rs, tools/livekit-test-server.sh
  • Modify: workspace Cargo.toml (livekit), deny.toml, CI workflow (Linux job: download livekit-server v1.12.0 release binary, set FLUXER_LIVEKIT_TESTS=1; system packages the SDK needs), xtask (ci runs the interop tests when the variable is set)
  • Test: as above

Interfaces:

  • Produces: LiveKitRoom: Room — auto-subscribe off; signalling URL keeps the endpoint's path prefix; microphone published from a native audio source at 48 kHz with RED on, DTX off, max_bitrate from RoomOptions; remote audio via native audio streams at 48 kHz; active speakers, track/participant events, data packets, RTT mapped to RoomEvents. VoiceSession::livekit(events) -> VoiceHandle convenience constructor.

  • Interop test (spec §7): local server in dev mode, tokens minted in the test with the dev key (add livekit-api as a dev-dependency only), a tiny in-test reverse proxy mounting the server under /livekit; asserts tone delivery (energy at 440 Hz), mute stops it, unsubscribe stops it, data round-trip on CODEC_NEGOTIATION_TOPIC, and connection through the prefixed URL.

  • If the SDK exposes WebRTC's audio processing module, also add Apm (echo cancellation, automatic gain) behind fluxer_voice::apm with a pure-i16 interface for the runtime; if not, open a follow-up issue referencing spec §12 Q3 and say so in the PR.

  • Windows: the crate must build and its non-interop tests pass on the Windows runner. Record the target-dir size after a clean build in the PR.

  • Step 1: Write failing tests (#[ignore] unless FLUXER_LIVEKIT_TESTS=1): two_sessions_hear_a_tone, mute_and_unsubscribe_stop_audio, data_round_trip_on_negotiation_topic, connects_through_path_prefix.

  • Step 2–5: FAIL → implement → PASS locally with the server script → commit feat(voice): LiveKit room and interop test.

Plan: https://git.forked.io/charles/fluxer-native/src/branch/main/docs/superpowers/plans/2026-11-11-voice.md
Spec: https://git.forked.io/charles/fluxer-native/src/branch/main/docs/superpowers/specs/2026-11-11-fluxer-native-voice-design.md

**Files:** - Create: `crates/fluxer-voice/src/rtc.rs`, `crates/fluxer-voice/tests/livekit_interop.rs`, `tools/livekit-test-server.sh` - Modify: workspace `Cargo.toml` (`livekit`), `deny.toml`, CI workflow (Linux job: download `livekit-server` v1.12.0 release binary, set `FLUXER_LIVEKIT_TESTS=1`; system packages the SDK needs), `xtask` (`ci` runs the interop tests when the variable is set) - Test: as above **Interfaces:** - Produces: `LiveKitRoom: Room` — auto-subscribe off; signalling URL keeps the endpoint's path prefix; microphone published from a native audio source at 48 kHz with RED on, DTX off, `max_bitrate` from `RoomOptions`; remote audio via native audio streams at 48 kHz; active speakers, track/participant events, data packets, RTT mapped to `RoomEvent`s. `VoiceSession::livekit(events) -> VoiceHandle` convenience constructor. - Interop test (spec §7): local server in dev mode, tokens minted in the test with the dev key (add `livekit-api` as a dev-dependency only), a tiny in-test reverse proxy mounting the server under `/livekit`; asserts tone delivery (energy at 440 Hz), mute stops it, unsubscribe stops it, data round-trip on `CODEC_NEGOTIATION_TOPIC`, and connection through the prefixed URL. - If the SDK exposes WebRTC's audio processing module, also add `Apm` (echo cancellation, automatic gain) behind `fluxer_voice::apm` with a pure-`i16` interface for the runtime; if not, open a `follow-up` issue referencing spec §12 Q3 and say so in the PR. - Windows: the crate must build and its non-interop tests pass on the Windows runner. Record the target-dir size after a clean build in the PR. - [ ] **Step 1: Write failing tests** (`#[ignore]` unless `FLUXER_LIVEKIT_TESTS=1`): `two_sessions_hear_a_tone`, `mute_and_unsubscribe_stop_audio`, `data_round_trip_on_negotiation_topic`, `connects_through_path_prefix`. - [ ] **Step 2–5:** FAIL → implement → PASS locally with the server script → commit `feat(voice): LiveKit room and interop test`. Plan: https://git.forked.io/charles/fluxer-native/src/branch/main/docs/superpowers/plans/2026-11-11-voice.md Spec: https://git.forked.io/charles/fluxer-native/src/branch/main/docs/superpowers/specs/2026-11-11-fluxer-native-voice-design.md
charles added this to the Voice milestone 2026-11-11 12:17:37 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
charles/fluxer-native#74
No description provided.