feat(relay): fix AI greeting with exact utterance + localized templates#67
Merged
Conversation
VoiceToVoice의 첫 인사말이 모델 렌더링([User says in ...] 번역 지시)을 거치면서 통화마다 문구가 달라지고, 수신자 응답 전 소음 환각과 겹쳐 "안내문이 2번 나오는" 현상을 만들었다. - FIRST_MESSAGE_TEMPLATES를 수신자 언어(ko/ja/zh/vi) 네이티브 문구로 현지화 (기존엔 전부 영어 — exact 모드였던 TextToVoice에서는 한국인 수신자에게 영어 인사말이 나가던 잠재 버그도 함께 해소) - VoiceToVoicePipeline의 FirstMessageHandler에 use_exact_utterance=True 적용, 기본값도 True로 변경 (레거시 재번역 경로 차단) - SESSION_A_RELAY_TEMPLATE의 First Message 섹션이 "번역하라"고 지시하던 모순 제거 — verbatim 발화 지시로 교체 - 테스트 12건 추가 (exact 래핑, 언어별 현지화, fallback, 중복 차단) Quality Score: 91/100 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
수신자가 듣는 첫 AI 안내문을 고정 문구(exact utterance)로 전환합니다. 기존에는 인사말이 매 통화 모델 렌더링을 거쳐 문구가 달라졌고, 수신자 응답 직전 발신자 측 소음이 Session A에서 안내문으로 환각되면 "서로 다른 안내문이 2번 나오는" 현상이 발생했습니다 (prod 콜
063d76ac로그로 확인).Changes
src/prompt/templates.py—FIRST_MESSAGE_TEMPLATES를 수신자 언어(ko/ja/zh/vi) 네이티브 문구로 현지화. 기존엔 전 키가 영어 문장(번역 경로 전제)이라, 이미 exact 모드였던 TextToVoice에서 한국인 수신자에게 영어 인사말이 나가던 잠재 버그도 함께 해소src/prompt/templates.py—SESSION_A_RELAY_TEMPLATE의 First Message 섹션이 "번역하라"고 지시하던 모순 제거, verbatim 발화 지시로 교체src/realtime/pipeline/voice_to_voice.py—FirstMessageHandler(use_exact_utterance=True)적용src/realtime/first_message.py—use_exact_utterance기본값 True로 변경 (레거시 재번역 경로가 기본값이 되지 않도록), 레거시 분기에 사용 금지 주석tests/test_first_message.py(신규) +tests/test_voice_to_voice_pipeline.py— exact 래핑 / 언어별 현지화 / en fallback / 중복 전송 차단 검증Quality Gate
Test Plan
uv run pytest tests/ --ignore=tests/e2e)🤖 Generated with Claude Code