Edge-TTS-MCP-Server / README.md
redstoneleo's picture
Update README.md
150865f verified

A newer version of the Gradio SDK is available: 6.9.0

Upgrade
metadata
title: Microsoft Online Edge TTS & MCP Server
emoji: πŸ”Š
colorFrom: blue
colorTo: green
sdk: gradio
sdk_version: 5.44.1
app_file: app.py
pinned: false

image/png

Microsoft Online Edge TTS & MCP Server

A Model Context Protocol server that enables LLMs to convert text to speech using the free Microsoft Edge TTS, API and MCP are available.

Online Tool & Demo

https://huggingface.co/spaces/redstoneleo/Edge-TTS-MCP-Server

Available Tools

  • list_voices – Fetches the available voices from Microsoft Edge TTS.

    • Returns (object): A dictionary mapping display names (e.g., "en-US-JennyNeural - Female") to their corresponding voice metadata, in the form:

      {
        "Name": "Microsoft Server Speech Text to Speech Voice (zh-CN, XiaoxiaoNeural)",
        "ShortName": "zh-CN-XiaoxiaoNeural",
        "Gender": "Female",
        "Locale": "zh-CN",
        "SuggestedCodec": "audio-24khz-48kbitrate-mono-mp3",
        "FriendlyName": "Microsoft Xiaoxiao Online (Natural) - Chinese (Mainland)",
        "Status": "GA",
        "VoiceTag": {
          "ContentCategories": ["News", "Novel"],
          "VoicePersonalities": ["Warm"]
        }
      }
      
  • text_to_speech – Converts input text into speech audio using Microsoft Edge TTS.

    • text (string, required): The text content to be synthesized into speech.

    • voice (string, required): The selected voice in the format "ShortName - Gender".

    • rate (integer, optional): Speech rate adjustment percentage (e.g., -20% for slower, +20% for faster). Default: 0 means +0%.

    • pitch (integer, optional): Pitch adjustment in Hz. Default: 0 means +0Hz.

    • Returns (string): URL to the generated MP3 file.

Prompts

  • list_voices

    • list all available voice display names
  • text_to_speech

    • TTS <your text> with a proper voice

Installation and Configuration

  1. pip install edge_tts gradio -U

  2. Download app.py.

  3. Run python app.py, then the console will show information like this

    * Running on local URL:  http://127.0.0.1:7860
    * To create a public link, set `share=True` in `launch()`.
    
    πŸ”¨ Launching MCP server:
    ** Streamable HTTP URL: http://127.0.0.1:7860/gradio_api/mcp/
    * [Deprecated] SSE URL: http://127.0.0.1:7860/gradio_api/mcp/sse
    

You can find the exact config to copy-paste by visiting the local URL and going to the "Use via API or MCP" link in the footer of your Gradio app, and then clicking on "MCP".

image/png

For clients that support SSE (e.g. Cursor, Windsurf, Cline), simply add the following configuration to your MCP config, for detailed steps please refer here.

{
  "mcpServers": {
    "Edge TTS": {
      "url": "http://127.0.0.1:7860/gradio_api/mcp/"
    }
  }
}