Skip to content

Commit 8b8b5cf

Browse files
authored
Merge pull request #1067 from schreibfaul1/OPUS-Hybrid-Node
MP3 decode error -1 : INDATA_UNDERFLOW #1056
2 parents b8914f7 + 787a321 commit 8b8b5cf

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Audio.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
audio.cpp
44
55
Created on: Oct 28.2018 */char audioI2SVers[] ="\
6-
Version 3.3.2 ";
6+
Version 3.3.2a ";
77
/* Updated on: Jun 14.2025
88
99
Author: Wolle (schreibfaul1)
@@ -456,6 +456,7 @@ bool Audio::openai_speech(const String& api_key, const String& model, const Stri
456456
if (response_format == "aac") m_expectedCodec = CODEC_AAC;
457457
if (response_format == "flac") m_expectedCodec = CODEC_FLAC;
458458
m_dataMode = HTTP_RESPONSE_HEADER;
459+
m_f_tts = true;
459460
} else {
460461
log_info("Request %s failed!", host);
461462
}
@@ -3448,7 +3449,7 @@ void Audio::processWebStream() {
34483449
// if the buffer is often almost empty issue a warning - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
34493450
if(m_f_stream) {
34503451
if(!m_f_allDataReceived) if(streamDetection(availableBytes)) return;
3451-
if(!f_clientIsConnected) {if(!m_f_allDataReceived) m_f_allDataReceived = true;} // connection closed
3452+
if(!f_clientIsConnected) {if(m_f_tts && !m_f_allDataReceived) m_f_allDataReceived = true;} // connection closed (OpenAi)
34523453
}
34533454

34543455
// buffer fill routine - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

0 commit comments

Comments
 (0)