{
  "schema": "toneperfect.capsule.v1",
  "version": "2026-10-07",
  "purpose": "Exercise the integration path (schema, errors, billing, idempotency, timing). Synthetic audio: scores are not indicative of real learners.",
  "fixtures": [
    {
      "id": "zh-speech",
      "file": "speech-zh-nihao.ogg",
      "language": "zh-CN",
      "text": "你好",
      "expect": "200, compact schema, 1 credit",
      "expected": {
        "status": 200,
        "schema": "toneperfect.compact.v1",
        "credits": 1
      },
      "source": "eSpeak NG 1.52 (synthetic)"
    },
    {
      "id": "zh-speech-2",
      "file": "speech-zh-maishu.ogg",
      "language": "zh-CN",
      "text": "我想买书",
      "expect": "200, compact schema, 1 credit; tone units per syllable",
      "expected": {
        "status": 200,
        "schema": "toneperfect.compact.v1",
        "credits": 1,
        "units": [
          "initial",
          "final",
          "tone"
        ]
      },
      "source": "eSpeak NG 1.52 (synthetic)"
    },
    {
      "id": "en-speech",
      "file": "speech-en-sunny.ogg",
      "language": "en-US",
      "text": "I like sunny days.",
      "expect": "200, compact schema, 1 credit",
      "expected": {
        "status": 200,
        "schema": "toneperfect.compact.v1",
        "credits": 1
      },
      "source": "eSpeak NG 1.52 (synthetic)"
    },
    {
      "id": "replay",
      "file": "speech-zh-nihao.ogg",
      "language": "zh-CN",
      "text": "你好",
      "replay_of": "zh-speech",
      "expect": "Same result, Idempotent-Replayed: true, no new charge",
      "expected": {
        "status": 200,
        "replayed": true
      },
      "source": "eSpeak NG 1.52 (synthetic)"
    },
    {
      "id": "silence",
      "file": "silence-1s.wav",
      "language": "zh-CN",
      "text": "你好",
      "expect": "200, assessable false, 0 credits",
      "expected": {
        "status": 200,
        "assessable": false,
        "credits": 0
      },
      "source": "generated by the build (synthetic)"
    },
    {
      "id": "digits",
      "file": "silence-1s.wav",
      "language": "zh-CN",
      "text": "我有3个",
      "expect": "422 invalid_assessment, 0 credits",
      "expected": {
        "status": 422,
        "code": "invalid_assessment"
      },
      "source": "generated by the build (synthetic)"
    },
    {
      "id": "too-short",
      "file": "too-short-0.1s.wav",
      "language": "en-US",
      "text": "Hello",
      "expect": "422 invalid_audio",
      "expected": {
        "status": 422,
        "code": "invalid_audio"
      },
      "source": "generated by the build (synthetic)"
    },
    {
      "id": "too-long",
      "file": "too-long-31s.wav",
      "language": "en-US",
      "text": "Hello",
      "expect": "422 invalid_audio",
      "expected": {
        "status": 422,
        "code": "invalid_audio"
      },
      "source": "generated by the build (synthetic)"
    },
    {
      "id": "not-audio",
      "file": "not-audio.wav",
      "language": "en-US",
      "text": "Hello",
      "expect": "422 invalid_audio",
      "expected": {
        "status": 422,
        "code": "invalid_audio"
      },
      "source": "generated by the build (synthetic)"
    },
    {
      "id": "bad-locale",
      "file": "silence-1s.wav",
      "language": "xx-XX",
      "text": "Hello",
      "expect": "422 unsupported_language",
      "expected": {
        "status": 422,
        "code": "unsupported_language"
      },
      "source": "generated by the build (synthetic)"
    }
  ],
  "timings": {
    "note": "Customer calls Sept 10 - Oct 7 2026 (n=274 completed)",
    "median_ms": 1240,
    "p90_ms": 2240,
    "p99_ms": 6200
  }
}