Updated Sep 21, 2026

Utilities

Turn a script into an MP3 with Edge neural voices

Microsoft Edge neural speech from text or a script file. No API key.

Agent

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

9 inputs
NameTypeFlagDescription
textSTRING--textText to speak (single item).
text-fileFILE--text-fileRead text from a file.
voiceSTRING--voiceEdge neural voice. Default en-US-JennyNeural.
inFOLDER--indirUpstream folder scanned for .txt then .md.

Showing key inputs. edge-tts exposes 9 inputs in total.

Full flag reference (9 inputs)
NameTypeFlagDescription
inFOLDER--indirUpstream folder. Reads .txt then .md for speech text
textSTRING--textText to speak (single item)
text-fileFILE--text-fileRead text from a file (alternative to text)
text-fieldSTRING--text-fieldItem field holding text when batching (default: text)
voiceSTRING--voiceEdge neural voice (default: en-US-JennyNeural)
rateSTRING--rateSpeech rate, e.g. +10% or -20% (default: +0%)
volumeSTRING--volumeVolume, e.g. +0% or -50% (default: +0%)
itemsFILE--itemsJSONL of items (or drop .txt/.md under /hive/in)
continue-on-errorBOOLEAN--continue-on-errorKeep going when an individual synthesis fails

example

Run edge-tts

edge-tts · command
edge-tts --text 'Trickest smoke test.' --voice en-US-JennyNeural --outdir /hive/out
sample output
  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

No. The wrapper uses Edge neural voices. A fleet IP can still be rate-limited.

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.