Skip to content

Feat/pre greeting audio gate#69

Merged
HyeonsangKim merged 2 commits into
mainfrom
feat/pre-greeting-audio-gate
Jul 5, 2026
Merged

Feat/pre greeting audio gate#69
HyeonsangKim merged 2 commits into
mainfrom
feat/pre-greeting-audio-gate

Conversation

@HyeonsangKim

Copy link
Copy Markdown
Contributor

No description provided.

moriroKim and others added 2 commits July 6, 2026 03:46
수신자가 말없이 전화를 받거나 첫 발화가 Local VAD에 안 잡히면
인사말과 pre-greeting 오디오 게이트가 영원히 안 열리는 데드락 방지.

- media stream 연결(= 통신사 수신 확정) 후 first_message_fallback_s
  (기본 5초, 0 이하 비활성) 안에 수신자 발화가 없으면 인사말 강제 발사
- on_recipient_speech_detected가 first_message_sent 플래그로 멱등이라
  VAD 경로와 경합해도 인사말은 1회만 발사됨
- 타이머 태스크는 기존 _call_timer_task 패턴대로 stop()에서 취소

Quality Score: 94/100
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…errupt clear

수신자가 "안내문이 끊겼다"고 보고한 문제(prod 콜 0b76c79f, 8ee94fdc)의
근본 원인 수정. 인사말은 수신자 첫 발화 "시작" 순간 트리거되는데,
TTS 청크가 is_recipient_speaking(발화 중 + 1.5s 쿨다운) 드랍 로직에
걸려 앞부분이 통째로 삭제되고, 재생 중 수신자 재발화 시 인터럽트의
Twilio send_clear로 뒷부분이 잘렸다.

- 인사말 보호막(greeting shield): 발사 시점부터 예상 재생 완료
  (첫 청크 시각 + bytes/8000 + 0.5s jitter 마진)까지
  ① TTS 드랍 우회 ② 인터럽트 cancel/clear 억제
- allow_interrupt kwarg로 인터럽트 발화 상태 추적은 유지 (하위 호환)
- 인사말 오디오 전 도착한 이전 응답의 done은 보호막을 해제하지 않음
  (조기 해제 레이스 방지), 15s 하드캡으로 세션 드랍 시 고착 방지
- TDD 테스트 7건 추가 (총 469개 통과), 리뷰 Major 2건 반영

Quality Score: 89/100
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 5, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
wigvo-web Ready Ready Preview, Comment Jul 5, 2026 7:07pm

@HyeonsangKim HyeonsangKim merged commit cb55731 into main Jul 5, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants