Explorar o código

fix(tts): keep audio int16, fix indentation

wenhongquan hai 3 semanas
pai
achega
c80cfcdb22
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      asr_agent/conversation_worker.py

+ 1 - 1
asr_agent/conversation_worker.py

@@ -282,7 +282,7 @@ async def _tts_stream(text: str, voice: str = "Chloe"):
                         if audio and isinstance(audio, dict) and "data" in audio:
                             pcm = np.frombuffer(
                                 base64.b64decode(audio["data"]), dtype=np.int16
-                            ).astype(np.float32) / 32768.0
+                            )
                             if len(pcm) > 0:
                                 yield pcm, 24000, False
                     except Exception: