wxxxcxx/ms-ra-forwarder

免费的在线文本转语音API

What it solves

It gives you a simple, self-hosted way to turn text into spoken audio. Instead of signing up for Microsoft's official paid Azure TTS service, this project wraps the free text-to-speech interfaces used by the Edge browser's "Read Aloud" feature and the Azure TTS demo page, and exposes them as a single HTTP endpoint you can call from your own apps.

How it works

You deploy the service (via Docker, Vercel, Railway, Heroku, or manually with Node.js). Once running, it serves a small web page where you can test speech synthesis, and it exposes an API endpoint at /api/text-to-speech. You call it with a GET request that includes parameters for the voice, volume, rate, pitch, and the text itself, and it returns the generated audio. If you want to stop other people from abusing your deployment, you can set a TOKEN environment variable, and then require callers to send an Authorization: Bearer <TOKEN> header. The project also supports importing the generated speech directly into the Legado (阅读) reader app.

Who it's for

People who want free, programmatic text-to-speech without paying for the official Azure TTS quota — for example, developers building reading apps or hobbyists who want to generate audio for their own use. The README explicitly notes it is for learning and reference only, not for commercial use, and that the underlying interfaces are not guaranteed to stay stable.

Highlights

  • Simple HTTP API: one GET request to /api/text-to-speech with voice, volume, rate, pitch, and text parameters returns audio.
  • Multiple deployment options: Docker (recommended), Docker Compose, Vercel, Railway, Heroku, or manual Node.js build.
  • Optional access control via a TOKEN environment variable and bearer-token authorization.
  • Includes a web page for testing, with a one-click import into the Legado (阅读) reader app.
  • Supports a lexicon/dictionary file for custom pronunciation.
  • Rebuilt with Next.js (2025-08-20) to fix a synthesis issue; supports audio formats like webm-24khz-16bit-mono-opu and MP3 variants.

Related

  • Project
  • Project
  • Project
  • Project
  • Project