Utilities
Turn a script into an MP3 with Edge neural voices
Microsoft Edge neural speech from text or a script file. No API key.
overview
What edge-tts does
You have a sentence or a script file, and the next node needs spoken audio. Set --text for one string or --text-file for a file. The wrapper calls Microsoft Edge neural voices, writes an MP3 under --outdir, and appends results.jsonl. Default voice is en-US-JennyNeural. No API key is stored on the node.
--rate and --volume accept values such as +10% or -20%. --items is a JSONL of rows to speak. An upstream folder on --indir is scanned for .txt then .md when you do not pass --text. --continue-on-error keeps a batch going; leave that boolean disconnected on a single-item smoke.
edge-tts needs a live Microsoft endpoint. A fleet IP can be rate-limited or blocked. Treat an empty folder as a failed synthesis, not a silent MP3. Use whisper when you already have audio and need text. Use ffmpeg when you already have audio and need another container.
source github.com/rany2/edge-tts
use cases
Where edge-tts fits
Speak one sentence
Set --text. The folder holds an MP3 and results.jsonl.
Speak a script file
Set --text-file to a .txt. Preferred names include script.txt and narration.txt when scanning a folder.
Pick a voice
Set --voice to an Edge neural name such as en-US-JennyNeural.
Batch a JSONL of lines
Pass --items. Use --text-field when the spoken field is not named text.
reference
edge-tts inputs and flags
| Name | Type | Flag | Description |
|---|---|---|---|
| text | STRING | --text | Text to speak (single item). |
| text-file | FILE | --text-file | Read text from a file. |
| voice | STRING | --voice | Edge neural voice. Default en-US-JennyNeural. |
| in | FOLDER | --indir | Upstream folder scanned for .txt then .md. |
Showing key inputs. edge-tts exposes 9 inputs in total.
Full flag reference (9 inputs)
| Name | Type | Flag | Description |
|---|---|---|---|
| in | FOLDER | --indir | Upstream folder. Reads .txt then .md for speech text |
| text | STRING | --text | Text to speak (single item) |
| text-file | FILE | --text-file | Read text from a file (alternative to text) |
| text-field | STRING | --text-field | Item field holding text when batching (default: text) |
| voice | STRING | --voice | Edge neural voice (default: en-US-JennyNeural) |
| rate | STRING | --rate | Speech rate, e.g. +10% or -20% (default: +0%) |
| volume | STRING | --volume | Volume, e.g. +0% or -50% (default: +0%) |
| items | FILE | --items | JSONL of items (or drop .txt/.md under /hive/in) |
| continue-on-error | BOOLEAN | --continue-on-error | Keep going when an individual synthesis fails |
example
Run edge-tts
edge-tts --text 'Trickest smoke test.' --voice en-US-JennyNeural --outdir /hive/out wrote /hive/out/speech.mp3 (13392 bytes, 20 chars, en-US-JennyNeural)done: 1 item(s), 0 failure(s) -> /hive/out/results.jsonl{"index": 0, "voice": "en-US-JennyNeural", "file": "speech.mp3", "ok": true, "bytes": 13392, "char_count": 20}guidance
Choosing edge-tts
Use edge-tts when you have text and need an MP3. Use whisper when you have audio and need text. Use ffmpeg when you already have audio and need another format.
whisper
Speech to text. The opposite direction of edge-tts.
ffmpeg
Converts audio you already have. It does not synthesize speech.
yt-dlp
Downloads existing media. It does not speak a script.
faq
edge-tts questions
related
More Utilities tools
browser-fetch
Headless Chromium render: requested URL, final URL, status, and title next to the page.
cewl
Spider a URL and return a wordlist for password crackers.
csvkit
SQL on one CSV. The table name is the file stem.
dnsgen
Wordlist and mined-word subdomain permutation.
duckdb
In-process SQL on CSV, JSON, and Parquet. No server.
exiftool
Read embedded metadata from hundreds of image, media, and document formats.
Run edge-tts yourself
A short string feeds edge-tts. The folder holds speech.mp3 and results.jsonl from a completed run.
Facts on this page come from the live Trickest tool library.