Voice: others sound very quiet in Flaxative #587

Closed
opened 2026-11-15 05:13:29 +00:00 by charles · 1 comment
Owner

Report (Charles, 2026-11-15). People using Flaxative say the sound they hear from others in voice is very low. Platform not stated yet.

Checked so far, by reading the code (nothing measured):

  • fluxer-core participant_gain = curve(user volume) × curve(output volume); both are 1.0 at 100 %, same curve as the original (VoiceVolumeUtils.ts).
  • fluxer-audio Mixer::mix sums the sources at their gain and soft-clips; the clipper is linear below 0.8.
  • Microphone AGC is on by default (settings.auto_gain_control), through the WebRTC APM.

Not yet known — measure, don't guess:

  1. Playback path level: a known-level 48 kHz frame pushed with push_remote should reach the device callback at the same level (check the i16→f32 conversion, mono→stereo, resampling to the device rate, channel mapping, and whether the output stream is opened with a reduced stream/session volume on PipeWire/WASAPI).
  2. Receive path in fluxer-voice (rtc.rs): the level of the PCM LiveKit hands over versus what is pushed to the engine (any stereo→mono averaging of a mono-in-stereo signal, any division).
  3. Capture path level: speech at a typical microphone level (about −30 dBFS) through CaptureChain with the default settings; compare the output level with what Chromium's AGC produces for the original client. If everyone in the call uses Flaxative, a quiet microphone path is heard as "everyone is quiet", so this can be the cause even though the report is about what people hear.
  4. Whether a Flaxative listener hears a speaker on the original (Electron) client at normal level — this separates 1–2 from 3.
**Report (Charles, 2026-11-15).** People using Flaxative say the sound they hear from others in voice is very low. Platform not stated yet. **Checked so far, by reading the code (nothing measured):** - `fluxer-core` `participant_gain` = curve(user volume) × curve(output volume); both are 1.0 at 100 %, same curve as the original (`VoiceVolumeUtils.ts`). - `fluxer-audio` `Mixer::mix` sums the sources at their gain and soft-clips; the clipper is linear below 0.8. - Microphone AGC is on by default (`settings.auto_gain_control`), through the WebRTC APM. **Not yet known — measure, don't guess:** 1. Playback path level: a known-level 48 kHz frame pushed with `push_remote` should reach the device callback at the same level (check the i16→f32 conversion, mono→stereo, resampling to the device rate, channel mapping, and whether the output stream is opened with a reduced stream/session volume on PipeWire/WASAPI). 2. Receive path in `fluxer-voice` (`rtc.rs`): the level of the PCM LiveKit hands over versus what is pushed to the engine (any stereo→mono averaging of a mono-in-stereo signal, any division). 3. Capture path level: speech at a typical microphone level (about −30 dBFS) through `CaptureChain` with the default settings; compare the output level with what Chromium's AGC produces for the original client. If everyone in the call uses Flaxative, a quiet microphone path is heard as "everyone is quiet", so this can be the cause even though the report is about what people hear. 4. Whether a Flaxative listener hears a speaker on the original (Electron) client at normal level — this separates 1–2 from 3.
Author
Owner

Measured on textchat at 0d7ce9a. Fix in #595. Levels are dBFS RMS.

  1. Playback (push_remote → mixer → resample → device ring, NullHost): a −12.00 dBFS 1 kHz sine arrives at −12.00 at 48 and 44.1 kHz, on 1, 2 and 6 channels, from mono and stereo frames. Channels beyond the front pair are silent. cpal's i16→f32 conversion keeps full scale. No loss.
  2. Receive (LiveKit interop: Opus → livekit-server 1.12 → NativeAudioStream at 48 kHz mono): a −15.05 dBFS tone arrives at −15.05. No loss.
  3. Capture, default settings, real speech (ALSA test recordings): −30 → −30.0 and −40 → −40.0. RNNoise, the gate and the soft clip are all unity. This is the cause: automatic gain control is on by default but was never applied. audio_rt::chain_config dropped auto_gain, fluxer_voice::apm::Apm was unused, and the LiveKit source has auto_gain_control: false. Chromium brings the original's microphone to about −18 to −23. With AGC2 (the APM as the livekit FFI configures it) put in front of the chain, as Chromium does with getUserMedia: −30 → −23.2 and −40 → −22.9 after settling, and −20 → −20.4. Peaks stay under full scale.
  4. Order: the AGC now runs before RNNoise and the gate, as in the original, so the gate never attenuates what the AGC sees.

Not measured here: Electron speaker → Flaxative listener, real devices, and WASAPI or PipeWire session volume. Chromium's analog AGC (raising the OS microphone volume) is not replicated, and echo cancellation is still #90.

Measured on `textchat` at 0d7ce9a. Fix in #595. Levels are dBFS RMS. 1. **Playback** (`push_remote` → mixer → resample → device ring, NullHost): a −12.00 dBFS 1 kHz sine arrives at −12.00 at 48 and 44.1 kHz, on 1, 2 and 6 channels, from mono and stereo frames. Channels beyond the front pair are silent. cpal's `i16`→`f32` conversion keeps full scale. No loss. 2. **Receive** (LiveKit interop: Opus → livekit-server 1.12 → `NativeAudioStream` at 48 kHz mono): a −15.05 dBFS tone arrives at −15.05. No loss. 3. **Capture**, default settings, real speech (ALSA test recordings): −30 → −30.0 and −40 → −40.0. RNNoise, the gate and the soft clip are all unity. **This is the cause:** automatic gain control is on by default but was never applied. `audio_rt::chain_config` dropped `auto_gain`, `fluxer_voice::apm::Apm` was unused, and the LiveKit source has `auto_gain_control: false`. Chromium brings the original's microphone to about −18 to −23. With AGC2 (the APM as the livekit FFI configures it) put in front of the chain, as Chromium does with `getUserMedia`: −30 → −23.2 and −40 → −22.9 after settling, and −20 → −20.4. Peaks stay under full scale. 4. **Order:** the AGC now runs before RNNoise and the gate, as in the original, so the gate never attenuates what the AGC sees. Not measured here: Electron speaker → Flaxative listener, real devices, and WASAPI or PipeWire session volume. Chromium's analog AGC (raising the OS microphone volume) is not replicated, and echo cancellation is still #90.
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#587
No description provided.