The Speech Synthesis API allows websites to enumerate available text-to-speech voices, which varies by operating system and installed language packs.
🔬 Voice Enumeration
const voices = speechSynthesis.getVoices();
voices.forEach(voice => {
console.log(voice.name); // "Microsoft David"
console.log(voice.lang); // "en-US"
console.log(voice.localService); // true/false
console.log(voice.default); // true/false
});
📊 What It Reveals
- Operating system: Windows, macOS, Linux have different voices
- Language packs: Installed language support
- Third-party voices: Additional TTS software
- Voice count: Number of available voices
🎯 OS Detection
| OS | Typical Voices |
|---|---|
| Windows | Microsoft David, Zira, etc. |
| macOS | Alex, Samantha, etc. |
| Linux | eSpeak voices |
| Android | Google TTS voices |
🛡️ Antidetect Handling
Antidetect browsers return a voice list matching the spoofed operating system to maintain consistency.