fix Live Call: drop all audio chunks during ducking
The old ducking logic only skipped chunks below a threshold (RMS < 0.10), but the S25 Ultra speakers leak enough audio into the mic to exceed that. Gemini's server-side VAD picks it up as user speech, triggers interrupts, and the model starts hallucinating a conversation with itself. Now: when ducking is active (model speaking), NO mic chunks are sent. The server-side VAD handles the real speech detection after ducking ends.
This commit is contained in:
parent
45eb5dfaea
commit
3b32b208b6
1 changed files with 1 additions and 1 deletions
|
|
@ -101,7 +101,7 @@ class AudioPipeline(private val context: Context) {
|
|||
val rms = computeRms(buffer, read)
|
||||
onAmplitude?.invoke(rms)
|
||||
|
||||
if (ducking && rms < DUCKING_GAIN) continue
|
||||
if (ducking) continue
|
||||
|
||||
byteBuffer.clear()
|
||||
for (i in 0 until read) byteBuffer.putShort(buffer[i])
|
||||
|
|
|
|||
Loading…
Reference in a new issue