[voice_assistant] Do not consume the audio chunk when the send is refused (#18295)

This commit is contained in:
J. Nick Koston
2026-08-12 15:59:26 +12:00
committed by GitHub
parent a2feff8f68
commit 1758653330
@@ -249,7 +249,11 @@ void VoiceAssistant::stream_api_audio_() {
}
if (!this->api_client_->send_message(msg)) {
ESP_LOGV(TAG, "Audio frame dropped, TCP buffer full");
// Keep the chunk exposed and retry next pass, the same shape as
// APIConnection::try_send_camera_image_(): the slice is only lost if
// the ring buffer overflows before the TCP buffer clears, instead of
// on every refusal. The api layer already reports the refusal at V.
return;
}
this->audio_source_->consume(available);