GUIDE

PowerShell text to speech with natural voices

PowerShell can speak out of the box: Windows ships the System.Speech synthesizer, and a few lines make a script announce that a backup finished or a build failed. Those voices are the robotic ones Windows has had for years, though, and they differ from machine to machine.

The free SuperClonica engine runs natural neural voices on your own computer or server, and PowerShell reaches it with a single Invoke-RestMethod call. This guide shows both ways and when to use which.

Two ways to speak from PowerShell

For a quick beep-with-words, System.Speech is fine; for anything people listen to, use a natural voice.

  • System.Speech: built into Windows; load it with Add-Type -AssemblyName System.Speech and use the SpeechSynthesizer class.
  • It works offline and needs nothing extra, but the voices sound robotic and depend on the installed Windows voices.
  • SuperClonica: a local HTTP server with natural voices, character voices and your own trained voice.
  • It speaks 31 languages; Chinese is not supported yet.

Hear the voices free

On the page of any voice, type the sentence your script will say, 30 to 100 characters, choose the language and press Voice it. In a few seconds you hear the difference, with no account.

Call a local SuperClonica server

Windows PowerShell 5.1 sends a text body in the wrong encoding, so pass UTF-8 bytes as above, and it reads a .ps1 file without a BOM as ANSI: save scripts with non-Latin text as UTF-8 with BOM.

  • Start the server once, with Docker Desktop on Windows: docker run -d -p 8000:8000 -v superclonica-models:/models superclonica/superclonica:cpu.
  • Voice a line from PowerShell: $json = @{text='The nightly backup finished'; voice='F1'; lang='en'} | ConvertTo-Json; Invoke-RestMethod -Method Post -Uri http://localhost:8000/synthesize -ContentType 'application/json' -Body ([Text.Encoding]::UTF8.GetBytes($json)) -OutFile hello.wav.
  • The file is a 16-bit mono WAV that any player, video editor or script can use.
  • Set SUPERCLONICA_API_KEY on the server and add -Headers @{Authorization="Bearer YOUR-KEY"} if other machines can reach it.

Scripts that talk

Play the WAV right away with (New-Object Media.SoundPlayer "hello.wav").PlaySync(), or save announcements for later. A scheduled task can voice a morning summary, a CI job can announce a failed build on the office speaker, and a loop over a CSV can voice hundreds of prompts in one run. A short phrase takes well under a second on an ordinary processor.

When System.Speech is enough

System.Speech is enough when the voice only needs to be understood, not enjoyed: a quick alert while you are at the desk, an accessibility test, a machine with no Docker. Use SuperClonica when the audio leaves your desk, in videos, prompts, announcements or products, or when the same voice must sound the same on every machine.