ListenHub MCP

使用示例

播客、FlowSpeech、先审后录、音色查询与账户查询的「提示词到工具调用」演练。

下面的演练展示了你对 MCP 客户端说什么、客户端据此调用哪个工具。工具的选择与入参由客户端从你的提示词中推断填充——你不需要自己写 JSON。这里的 JSON 只是一次合理调用的样子,便于你理解提示词如何映射到入参。工具名称、完整入参列表与返回结构见可用工具

截图

生成中文播客:

生成中文播客

生成英文播客:

生成英文播客

从主题生成播客

“做一期关于大模型如何改变搜索的简短英文播客,用两位主持人。”

客户端会先查询说话人,再用两个 speakerIds 调用 create_podcastcreate_podcast 会轮询直到完成并返回成片,因此你一步就能拿到音频 URL。

{
  "tool": "create_podcast",
  "input": {
    "query": "How LLMs changed search",
    "speakerIds": ["sp_aria_en", "sp_leo_en"],
    "language": "en",
    "mode": "quick"
  }
}

想要双主持人正面辩论时,让它用 debate 模式。debate 模式恰好需要 2 个 speaker ID:

{
  "tool": "create_podcast",
  "input": {
    "query": "Is remote work better than office work?",
    "speakerIds": ["sp_aria_en", "sp_leo_en"],
    "language": "en",
    "mode": "debate"
  }
}

从 URL 生成播客

“把这篇文章做成播客:https://example.com/post”

URL 和文本段落都放在 sources 里。可以把 sourcesquery 组合,用来引导切入角度。

{
  "tool": "create_podcast",
  "input": {
    "sources": ["https://example.com/post"],
    "query": "Focus on the practical takeaways",
    "speakerIds": ["sp_aria_en"],
    "language": "en",
    "mode": "deep"
  }
}

只给一个 speaker ID 会生成单人节目。querysources 至少提供其一。

FlowSpeech 朗读

“把这段公告逐字读出来。”

FlowSpeech 是单人朗读。用 direct 模式逐字朗读原文,或用 smart 模式让模型先润色。create_flowspeech 返回 episodeId 并异步运行——客户端随后轮询 get_flowspeech_status 获取音频。

{
  "tool": "create_flowspeech",
  "input": {
    "sourceType": "text",
    "sourceContent": "This quarter we shipped three major features...",
    "speakerId": "sp_aria_en",
    "language": "en",
    "mode": "direct"
  }
}

要朗读网页时,把 sourceType 设为 url,并把链接放进 sourceContent

先审后录:先看脚本再生成音频

“先写一期关于提示词工程的播客脚本,让我看一下,再生成音频。”

这是一个两步流程。先只生成脚本:

{
  "tool": "create_podcast_text_only",
  "input": {
    "query": "An introduction to prompt engineering",
    "speakerIds": ["sp_aria_en", "sp_leo_en"],
    "language": "en",
    "mode": "quick"
  }
}

客户端拿到一个 episodeId。用 get_podcast_status 读脚本,修改任意台词,再生成音频。把你的修改作为 customScripts 传入,让音频与你的版本一致:

{
  "tool": "generate_podcast_audio",
  "input": {
    "episodeId": "664e0c2b9f1a2b3c4d5e6f70",
    "customScripts": [
      { "speakerId": "sp_aria_en", "content": "Welcome back. Today: prompt engineering." },
      { "speakerId": "sp_leo_en", "content": "Let's start with what a prompt actually is." }
    ]
  }
}

不传 customScripts 则按原脚本生成音频。

查询说话人

“有哪些英文音色?”

get_speakers 返回音色库,可按语言筛选。每一项都带有 speakerId,供生成工具使用。

{
  "tool": "get_speakers",
  "input": {
    "language": "en"
  }
}

查询订阅

“我的积分够做一期深度播客吗?”

get_user_subscription 无需入参,返回你的套餐与积分余额。在长时生成前调用它,确认 totalAvailableCredits 足够。

{
  "tool": "get_user_subscription",
  "input": {}
}

每个工具的积分成本并非固定。生成前要精确估算,请使用 OpenAPI 参考 中对应的 */estimate-credits 端点,再用 get_user_subscription 查询实时余额。

下一步

On this page