Skip to main content
Glama
al-one

MCP Server for notify to weixin / telegram / bark / lark

text_to_sound

Convert text to MP3 audio links for notifications across messaging platforms like Weixin, Telegram, Bark, and Lark. Supports multiple languages and adjustable speech speed.

Instructions

将一段文本转成mp3音频链接

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYes文本内容
langNo目标语言,支持: en/zh/cte(粤语)/ara/de/fra/kor/pt/ru/spa/th, 建议根据文本内容选择en
speedNo语速,默认7

Implementation Reference

  • The core handler function for the 'text_to_sound' tool. It generates a Baidu Fanyi TTS mp3 audio URL based on input text, language code, and speech speed.
    def text_to_sound( text: str = Field(description="文本内容"), lang: str = Field("en", description="目标语言,支持: en/zh/cte(粤语)/ara/de/fra/kor/pt/ru/spa/th, 建议根据文本内容选择"), speed: int = Field(7, description="语速,默认7"), ): if not text: return "" return 'https://fanyi.baidu.com/gettts?' + urlencode({ 'lan': lang, 'spd': speed, 'text': text, 'source': 'web', })
  • Input schema using Pydantic Field for parameters: text (str), lang (str, default 'en'), speed (int, default 7). Includes descriptions in Chinese.
    text: str = Field(description="文本内容"), lang: str = Field("en", description="目标语言,支持: en/zh/cte(粤语)/ara/de/fra/kor/pt/ru/spa/th, 建议根据文本内容选择"), speed: int = Field(7, description="语速,默认7"), ):
  • Registers the text_to_sound tool with FastMCP using @mcp.tool decorator, providing Chinese title '文本转音频' (Text to Audio) and description.
    @mcp.tool( title="文本转音频", description="将一段文本转成mp3音频链接", )
  • Top-level registration invocation: calls util.add_tools(mcp) after creating FastMCP instance, which adds the text_to_sound tool.
    util.add_tools(mcp)

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/al-one/mcp-notify'

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