Skip to content

cli: voice conversation batch against scripted characters (layer B, no carrier) - #75

Open
FORIFOR wants to merge 1 commit into
mainfrom
claude/conversation-batch
Open

FORIFOR wants to merge 1 commit into
mainfrom
claude/conversation-batch

Conversation

@FORIFOR

@FORIFOR FORIFOR commented Oct 19, 2026

Copy link
Copy Markdown
Owner

概要

実電話の前段(層 B)として、電話会社を使わずに本物の音声エンジンとシミュレーターの店員キャラクターを会話させ、誤完了と取りこぼしを測る試験を追加します。計画は docs/launch/real-call-plan.md、実装と初回試験の記録は docs/quality/conversation-batch.md にあります。

pnpm oathra phone test --level conversation --engine gpt-live --scenario restaurant-reservation \
  --mutation none,tentative-hold,ask-back --condition clean,quiet,fast,noise-10db \
  --runs 5 --max-usd 0.3 --max-usd-total 20

変更

  • packages/cli/src/local-conversation.ts: 相手役に台本キャラクターを使えるようにしました(敵対的な変異にも対応)。report に evaluate() の判定、キャラクターの truth、誤完了の有無を出します。順番の判定は、実際に声が出ている部分だけで行います。実行時の致命的なエラーも report に出します。
  • packages/cli/src/audio-degrade.ts(新規): 相手側の音の条件として、小声(−18 dB)、騒音(指定の SNR、ピンクノイズまたは WAV)、早口(話す速さ 1.5 倍)を追加しました。
  • packages/cli/src/conversation-batch.ts(新規)、phone.ts、commands.ts: 変異 × 条件 × 回数をまとめて実行します。summary.json に集計を出し、合計の予算上限を超える前に止まります。誤完了が出たとき、または途中で止まったときは exit 1 で終わります。
  • providers/openai/src/tts.ts: 任意の speed を追加しました。指定しなければ従来どおりです。
  • providers/simulator/src/character.ts: 「お忙しいところ失礼いたします」を別れの挨拶と誤認していたのを直しました。

検証

コマンド 結果
pnpm build 成功
pnpm test 4,321 件成功(追加 11 件)/ 1 skip
pnpm test:gateway 637 件成功
pnpm lint:deps ok
pnpm oathra eval False Completion 0(7/8。未完了は意図した false-completion-trap)
pnpm oathra eval --adversarial 10000 False Completion: 0 / 10000
有料の試験 2 回(gpt-live、通常と騒音 10 dB、約 $0.08) 誤完了 0。2 回とも、音声認識が「承りました」を聞き違えて取りこぼしました(安全側)

未検証

  • 早口と小声の条件、敵対的な変異は、有料の API ではまだ試していません。
  • 約 100 回の本番実行はまだ行っていません。
  • 営業アポ(ゲートウェイ側)はこの PR の対象外です。
  • 相手の声は合成音声なので、人の声や実際の電話回線の代わりにはなりません。

🤖 Generated with Claude Code

https://claude.ai/code/session_0195nzJ5oDJAnjHtFzHM9sL3

…conditions (layer B, no carrier)

- `phone test --level conversation --scenario <id>` runs the simulator's character (optionally adversarial)
  over the local μ-law line and reports evaluate()'s verdict, the character's truth and false completions
- --mutation / --condition (clean, quiet, fast, noise-<snr>db, --noise-file) / --runs / --seed / --max-usd-total;
  summary.json with false completions, as-expected rate, reply latency p50/p95, cost; exit 1 on a false completion
- turn-taking uses audible agent audio only; fatal runtime errors surface in the report
- OpenAITTS: optional speed
- simulator: 「お忙しいところ失礼いたします」 is an opening, not a goodbye
- docs: real-call verification plan (layers A/B/C) and the first smoke findings

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0195nzJ5oDJAnjHtFzHM9sL3

This branch has not been deployed

No deployments
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.

1 participant