Contents
| File | Locale | Reference text | Expected outcome | Audio source |
|---|---|---|---|---|
| speech-zh-nihao.ogg | zh-CN | 你好 | 200, compact schema, 1 credit | eSpeak NG 1.52 (synthetic) |
| speech-zh-maishu.ogg | zh-CN | 我想买书 | 200, compact schema, 1 credit; tone units per syllable | eSpeak NG 1.52 (synthetic) |
| speech-en-sunny.ogg | en-US | I like sunny days. | 200, compact schema, 1 credit | eSpeak NG 1.52 (synthetic) |
| speech-zh-nihao.ogg | zh-CN | 你好 | Same result, Idempotent-Replayed: true, no new charge | eSpeak NG 1.52 (synthetic) |
| silence-1s.wav | zh-CN | 你好 | 200, assessable false, 0 credits | generated by the build (synthetic) |
| silence-1s.wav | zh-CN | 我有3个 | 422 invalid_assessment, 0 credits | generated by the build (synthetic) |
| too-short-0.1s.wav | en-US | Hello | 422 invalid_audio | generated by the build (synthetic) |
| too-long-31s.wav | en-US | Hello | 422 invalid_audio | generated by the build (synthetic) |
| not-audio.wav | en-US | Hello | 422 invalid_audio | generated by the build (synthetic) |
| silence-1s.wav | xx-XX | Hello | 422 unsupported_language | generated by the build (synthetic) |
Plus manifest.json (the table above, machine-readable), compact.schema.json (JSON Schema of toneperfect.compact.v1), errors.json (every error code with its meaning) and run_capsule.py (standard-library Python).
Run it
mkdir tp-capsule && cd tp-capsule
for f in manifest.json compact.schema.json errors.json run_capsule.py $(curl -s https://api.toneperfect.app/capsule/manifest.json | python3 -c "import json,sys;print(' '.join(x['file'] for x in json.load(sys.stdin)['fixtures']))"); do curl -sO https://api.toneperfect.app/capsule/$f; done
export TONEPERFECT_API_KEY=tp_live_...
python3 run_capsule.py # about 3 credits of your 50 free ones
python3 run_capsule.py --dry-run # list what would be sent
# with a tp_test_ key: checks the request path and schema only, freeEach line of output shows the fixture, the HTTP status, the error code or score, the credits charged and the time taken, and whether it matched the expected outcome. Every recording is synthetic: tones and noise generated by the build script, and speech from the open-source eSpeak NG synthesizer, which sounds robotic, so its scores say nothing about how real learners score. The point is the path, not the number.