# speech-synthesis — VALIDATION RESULTS

## Signal hypothesis

Real Chrome installs TTS voices from the OS (5-50+ voices).
Headless Chromium ships 0 voices because there's no TTS engine.

## 3-condition results

| Condition | voiceCount | verdict |
|---|---|---|
| Vanilla headless | **0** | 🔴 Headless |
| CDP-attached | **19** | ✅ Real Chrome |
| Headful (Xvfb) | **0** | 🔴 Headless |

**The hypothesis is INVERTED on this server**: CDP-attached Chrome has more
voices than vanilla headless. And headful Chrome (on this Linux server, no
TTS voices installed) shows 0 voices — same as headless.

## Verdict: ❌ REJECTED — false positive risk too high

This signal is unreliable:
- On real desktops: vanilla headless would show 0, real Chrome would show 5-50+
  → correct behavior, but we can't validate without a real desktop.
- On this server (no TTS engine installed): all three conditions show 0 voices,
  which would flag every user as headless.
- The CDP-attached result (19 voices) is anomalous — probably a server-specific
  TTS package installation that the CDP debugger triggers.

**False positive risk:** catastrophic on Linux servers, headless Docker images,
CI runners, and any environment without TTS voices installed.

## Recommendation

DO NOT SHIP. Linux servers are common client environments (corporate
intranets, embedded systems, kiosks). A signal that flags all of them as
bots is unusable.

## Alternative

Check `speechSynthesis` API *availability* + voice count separately, with a
high threshold (e.g., voiceCount > 5) AND require `navigator.platform`
to be Mac/Win. This would catch headless only on platforms where voices
should exist.

## Files

- `demo.html`
- (test.py not needed — direct playwright script)
