Working on whisper

This commit is contained in:
James Ketr 2025-09-13 18:53:13 -07:00
parent bcc187e8cc
commit eb5416c4f0
3 changed files with 828 additions and 393 deletions

File diff suppressed because it is too large Load Diff

View File

@ -9,7 +9,7 @@ import sys
import os
# Add the voicebot directory to the path
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from shared.logger import logger

View File

@ -648,9 +648,11 @@ class WebRTCSignalingClient:
logger.debug(f"Received status_response from server with data: {data}")
# This confirms the connection is healthy and provides session info
elif msg_type == "chat_message":
logger.info("Received chat message")
try:
validated = ChatMessageModel.model_validate(data)
if validated.sender_session_id == self.session_id:
logger.debug("Ignoring chat message from ourselves")
return
except ValidationError as e:
logger.error(f"Invalid chat_message payload: {e}", exc_info=True)
return