S

tts

tts

已认证
AI v1.0.0 · 小杨
下载 ZIP
📥 下载 256 次 📦 3.0KB 📅 2026-05-25

Text-to-Speech (TTS) via tts.102465.xyz

Convert text into spoken audio using a hosted TTS API that supports multiple providers, voices, emotions, and tuning parameters.

API Base URL

https://tts.102465.xyz

All endpoints are under the /api prefix.

Quick Reference

TaskEndpointMethod
Generate speech audio/api/ttsPOST or GET
List available voices/api/voices?provider=<name>GET
List available providers/api/providersGET

Generating Speech

Two equivalent ways to call the TTS endpoint:

POST (recommended for longer text or programmatic use)

curl -X POST https://tts.102465.xyz/api/tts \
  -H "Content-Type: application/json" \
  -d '{"text":"你好世界","voice":"晓晓","emotion":"温柔","provider":"azure"}' \
  --output output.mp3

GET (convenient for short text or browser-playable links)

https://tts.102465.xyz/api/tts?text=你好世界&voice=晓晓&provider=azure

The response is an audio file (MP3). Save it with --output in curl, or open the GET URL directly in a browser to play.

Parameters

ParameterDescriptionDefault
textText to synthesize (required)
voiceVoice name (Chinese label or English ID)Provider default
emotionEmotion or speaking style (Azure only)
rateSpeech rate adjustment, percentage (Azure/Edge)0
pitchPitch adjustment, percentage (Azure/Edge)0
providerTTS backend: azure, volcengine, or edgeazure

Providers at a Glance

  • azure — Default provider. Richest feature set: many voices, emotion/style control, rate and pitch tuning.
  • volcengine — Alternative Chinese-language voices including specialty voices (e.g. film narration).
  • edge — Microsoft Edge TTS voices including regional dialect options (e.g. Liaoning dialect). Supports rate and pitch.

Choosing a Voice and Emotion

Before generating speech, query the available voices for a provider:

curl https://tts.102465.xyz/api/voices?provider=azure

This returns a JSON list of voices and, for Azure, their supported emotions/styles. Use the voice's Chinese label (e.g. 晓晓) or English ID in the voice parameter, and pick an emotion from the voice's supported list for the emotion parameter.

Workflow

Smart auto‑selection – 当用户仅提供文本而未指明声线、情感或提供商时,系统会自动做出合适选择:

  1. 根据文字语言和长度决定使用默认提供商 azure(中文/英文),除非检测到特定关键词匹配 Volcengine(如电影解说)或 Edge(方言)专属声线。
  2. 默认女性声线 晓晓,若文本语气正式或需要男性沉稳表现,则选用男性声线 晓北
  3. 通过简单情感分析匹配情绪:
  • 正面、温和 → 温柔
  • 激昂、鼓舞 → 激情
  • 正式、严肃 → (无 emotions,使用默认)
  1. 如无明确情感,则省略 emotion 参数,保持默认。语速 rate 与音调 pitch 均保持 0,除非用户另有要求。
  1. Clarify requirements — Ask the user what text they want spoken, in what language, and whether they have a preference for voice gender, style, or emotion.
  2. Pick a provider — Default to azure unless the user needs a specialty voice from another provider. If unsure, query /api/providers and /api/voices?provider=<name> to browse options.
  3. Generate the audio — Call /api/tts with the chosen parameters. For programmatic use, POST with JSON body; for a quick shareable link, construct a GET URL.
  4. Deliver the result — If using curl/POST, save the MP3 to /mnt/user-data/outputs/ and present it to the user. If constructing a GET link, provide the URL so the user can play it in-browser.

Example GET URLs

Azure with emotion:

https://tts.102465.xyz/api/tts?text=今天天气真不错&provider=azure&voice=晓晓&emotion=温柔

Volcengine specialty voice:

https://tts.102465.xyz/api/tts?text=在遥远的东方,有一个古老的传说&provider=volcengine&voice=影视男解说%20中英混

Edge dialect voice:

https://tts.102465.xyz/api/tts?text=今天咱们唠唠嗑&provider=edge&voice=晓北%20辽宁%20女

Tips

  • URL-encode Chinese characters and spaces when constructing GET URLs (e.g. %20 for space).
  • The emotion parameter only works with Azure. Other providers ignore it.
  • rate and pitch are percentages — positive values speed up / raise pitch, negative values slow down / lower pitch. They work with Azure and Edge.
  • If the user doesn't specify a voice, omit the voice parameter to use the provider's default.
  • When generating audio files programmatically, save as .mp3.

💡 安装方法

下载 ZIP 解压到 skills/ 目录即可使用