diff --git a/services/ai_orchestrator_service/voice.py b/services/ai_orchestrator_service/voice.py index 19daeff..83657b1 100644 --- a/services/ai_orchestrator_service/voice.py +++ b/services/ai_orchestrator_service/voice.py @@ -611,10 +611,10 @@ def _voice_reply_with_name(language: str, reply_text: str, name: str | None) -> normalized_short = _voice_text_key(short_name) if reply_text.startswith(prefix): rest = reply_text[len(prefix) :].lstrip() - if _voice_text_key(rest).startswith(normalized_short): + if normalized_short in _voice_text_key(rest).split(" "): return reply_text return f"{prefix}{short_name}, {rest}" - if _voice_text_key(reply_text).startswith(normalized_short): + if normalized_short in _voice_text_key(reply_text).split(" "): return reply_text return f"{short_name}, {reply_text}"