feat: Add debug logging to Gladia STT service

- Log transcript processing including confidence checks
This commit is contained in:
James Hush
2025-09-18 11:22:26 +08:00
parent 9e7260393a
commit 45c790c7d5

View File

@@ -579,6 +579,7 @@ class GladiaSTTService(STTService):
language = utterance["language"]
transcript = utterance["text"]
is_final = content["data"]["is_final"]
if confidence >= self._confidence:
if is_final:
await self.push_frame(
@@ -605,6 +606,10 @@ class GladiaSTTService(STTService):
result=content,
)
)
else:
logger.debug(
f"{self} Skipping transcript due to low confidence: '{transcript}' (confidence: {confidence} < {self._confidence})"
)
elif content["type"] == "translation":
translated_utterance = content["data"]["translated_utterance"]
original_language = content["data"]["original_language"]