Skip to main content
Glama

Text to Speech API

MCP Server x402 License: MIT

将文本转换为语音音频——支持 20+ 种语言,输出 base64 编码的 MP3。采用 Google TTS 引擎,快速可靠。通过 x402 按调用付费(Base L2 上的 USDC)——无需 API 密钥、无需注册、没有限流门槛。

klymax402 市场的一部分——面向 AI 智能体的 100 个 x402 微支付 API,一个钱包,Base 上的 USDC。

快速开始 -- MCP

在 MCP 客户端配置(Claude Desktop、Cursor、ElizaOS 等)中添加以下内容:

{
  "mcpServers": {
    "text-to-speech": {
      "url": "https://text-to-speech.api.klymax402.com/mcp"
    }
  }
}

Related MCP server: Voice MCP

快速开始 -- HTTP (x402)

curl -X POST "https://text-to-speech.api.klymax402.com/api/speak" \
  -H "Content-Type: application/json" \
  -d '{"text":"..."}'
# -> 402 Payment Required, with an x402 payment challenge in the response body

任何支持 x402 的客户端(@x402/fetchx402-agent-tools、ATXP)都会自动处理 402 -> 签名 -> 重试 的循环。

工具

工具

方法

路径

价格

描述

media_text_to_speech

POST

/api/speak

$0.012

将文本转换为语音音频

media_text_to_speech

当你需要将文本转换为语音音频时使用。返回 JSON 中 base64 编码的 MP3 音频。

参数

名称

类型

必填

描述

text

string

要转换为语音的文本(每个请求最多 200 个字符)

language

string

语言代码:en、fr、es、de、it、pt、ja、ko、zh、ar、ru、hi 等(默认:en)

响应示例:

{"audio":"SUQzBAAAAAAAI1RTU0UAAAAP...","language":"en","textLength":45,"durationEstimate":3.2,"format":"mp3"}

适用场景:生成音频旁白、构建语音助手、创建文章的音频版本、无障碍功能、语言学习应用。

不适用于:语言检测(使用 text_detect_language)、文本翻译(使用 text_translate)、图片 OCR(使用 media_extract_text_from_image)。

示例智能体提示词

  • “将文本转换为语音音频”

支付

  • 协议:x402 —— 基于 HTTP 的按调用付费,无需注册,无需 API 密钥

  • 网络:Base L2(eip155:8453

  • 资产:USDC

  • 协调者:Coinbase CDP(主),PayAI(备用)

  • 也可通过 ATXP 访问(OAuth 包装的 x402,RFC 9728 受保护资源元数据)

属于 klymax402

100 个面向 AI 智能体的 x402 微支付 API —— 一个钱包,Base 上的 USDC,零注册费用。

可在

MIT

A
license - permissive license
Not graded
quality - not tested
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

View all related MCP servers

Related MCP Connectors

  • Hosted pay-per-use TTS: 54 neural voices, 9 languages incl. Brazilian Portuguese. $10 free credits.

  • Discover and call pay-per-request (x402) APIs, ranked by reliability, latency and price.

  • Agent-payable web data over x402: 18 keyless services an agent pays per call.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Br0ski777/text-to-speech-x402'

If you have feedback or need assistance with the MCP directory API, please join our Discord server