feat: Add debug logging to Gladia STT service
- Log transcript processing including confidence checks
This commit is contained in:
@@ -579,6 +579,7 @@ class GladiaSTTService(STTService):
|
|||||||
language = utterance["language"]
|
language = utterance["language"]
|
||||||
transcript = utterance["text"]
|
transcript = utterance["text"]
|
||||||
is_final = content["data"]["is_final"]
|
is_final = content["data"]["is_final"]
|
||||||
|
|
||||||
if confidence >= self._confidence:
|
if confidence >= self._confidence:
|
||||||
if is_final:
|
if is_final:
|
||||||
await self.push_frame(
|
await self.push_frame(
|
||||||
@@ -605,6 +606,10 @@ class GladiaSTTService(STTService):
|
|||||||
result=content,
|
result=content,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
else:
|
||||||
|
logger.debug(
|
||||||
|
f"{self} Skipping transcript due to low confidence: '{transcript}' (confidence: {confidence} < {self._confidence})"
|
||||||
|
)
|
||||||
elif content["type"] == "translation":
|
elif content["type"] == "translation":
|
||||||
translated_utterance = content["data"]["translated_utterance"]
|
translated_utterance = content["data"]["translated_utterance"]
|
||||||
original_language = content["data"]["original_language"]
|
original_language = content["data"]["original_language"]
|
||||||
|
|||||||
Reference in New Issue
Block a user