node-edge-tts is a Node.js module providing an interface to Microsoft Edge's free online Text-to-Speech (TTS) service. Currently at version 1.2.10, this library allows developers to convert text into speech without needing an API key, relying on the public Edge TTS endpoint. It offers both a programmatic API for integrating TTS into Node.js applications and a command-line interface for quick conversions. Key features include configurable voices, languages, output formats, and the ability to save detailed subtitles alongside the audio. Unlike cloud-based TTS solutions that often require authentication and consumption-based billing, node-edge-tts leverages a readily available service, making it suitable for projects requiring an accessible and free text-to-speech option, though with potential limitations inherited from the underlying Edge service regarding supported speech configurations. The project appears to be actively maintained, with regular updates indicated by its current version number.
npm install node-edge-ttsVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to instantiate EdgeTTS, configure it with a voice and output format, and generate an audio file with corresponding subtitles.
Test specific pitch/rate/volume settings thoroughly. For critical applications requiring precise control, consider official Azure Cognitive Services Speech SDKs.
Regularly test the library's functionality, especially after major Edge browser updates or if speech generation starts failing unexpectedly. Consider contributing to the project or having a fallback TTS solution for mission-critical use cases.
Always expect both an audio and a `.json` subtitle file if `saveSubtitles` is enabled. Implement logic to manage or delete both files together.
Verify your internet connection, check firewall settings, ensure any specified `proxy` option is correct and reachable, and consider increasing the `timeout` option for slower networks.
Refer to Microsoft's documentation for supported voices and languages (linked in the README) and ensure the exact string is used. Test with common, well-known voices first (e.g., 'en-US-AriaNeural').
Before calling `ttsPromise`, ensure the directory for the output file exists. Use `fs.mkdirSync(path.dirname(audioFilePath), { recursive: true });` if the directory might not exist.No dependency data recorded yet.