fix(voice): race slow streaming asr finalize
This commit is contained in:
@@ -1546,6 +1546,19 @@ def test_voice_postprocess_reply_rewrites_midcall_greeting_with_followup_questio
|
||||
assert "о чем именно" not in normalized
|
||||
|
||||
|
||||
def test_voice_reply_with_name_strips_midcall_greeting_and_does_not_double_prefix():
|
||||
reply_text = voice_module._voice_reply_with_name(
|
||||
"ru",
|
||||
"Здравствуйте, Ернур! Чтобы уточнить график работы, назовите город или филиал.",
|
||||
"Ернур",
|
||||
)
|
||||
|
||||
normalized = reply_text.lower()
|
||||
assert reply_text.startswith("Ернур, Чтобы уточнить")
|
||||
assert normalized.count("ернур") == 1
|
||||
assert "здравствуйте" not in normalized
|
||||
|
||||
|
||||
def test_voice_postprocess_reply_reuses_active_topic_after_frustration_turn():
|
||||
reply_text = voice_module._voice_postprocess_reply_text(
|
||||
language="ru",
|
||||
|
||||
Reference in New Issue
Block a user