skill.json 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257
  1. {
  2. "name": "ai-voice-synthesis",
  3. "display_name": "AI 语音合成",
  4. "version": "1.0.0",
  5. "description": "智能 AI 语音合成工具,支持自然语言描述、多音色、多情感、异步长文本合成。让 AI 助手一句话生成专业级语音。",
  6. "author": "AI Voice Team",
  7. "homepage": "https://your-domain.com",
  8. "icon": "https://your-domain.com/icon.png",
  9. "category": "audio",
  10. "tags": ["TTS", "语音合成", "配音", "有声书", "AI"],
  11. "license": "Commercial",
  12. "api": {
  13. "base_url": "https://api.your-domain.com",
  14. "auth_type": "bearer",
  15. "openapi_spec": "https://your-domain.com/openapi/tts-api.yaml"
  16. },
  17. "endpoints": [
  18. {
  19. "id": "list_voices",
  20. "name": "获取可用音色",
  21. "description": "列出所有可用音色,包含元数据和预览音频",
  22. "method": "GET",
  23. "path": "/v1/tts/voices",
  24. "parameters": [],
  25. "response_schema": {
  26. "voices": "array<Voice>"
  27. }
  28. },
  29. {
  30. "id": "detect_voice",
  31. "name": "智能音色推荐",
  32. "description": "输入文本,自动推荐最佳音色和情感。AI 助手调用合成前应先调用此接口。",
  33. "method": "POST",
  34. "path": "/v1/tts/detect",
  35. "parameters": [
  36. {
  37. "name": "text",
  38. "type": "string",
  39. "required": true,
  40. "description": "要分析的文本(10-5000 字符)",
  41. "example": "从前有一只小兔子,它很难过,因为它的胡萝卜被偷走了。"
  42. }
  43. ],
  44. "response_schema": {
  45. "voice_id": "string",
  46. "voice_name": "string",
  47. "emotion": "string",
  48. "scene": "string"
  49. }
  50. },
  51. {
  52. "id": "synthesize_short",
  53. "name": "短文本合成",
  54. "description": "适合少于 500 字的短文本,直接返回音频 URL",
  55. "method": "POST",
  56. "path": "/v1/tts/synthesize",
  57. "parameters": [
  58. {
  59. "name": "text",
  60. "type": "string",
  61. "required": true,
  62. "description": "要合成的文本(10-500 字符)",
  63. "example": "你好,欢迎使用 AI 语音合成"
  64. },
  65. {
  66. "name": "voice_id",
  67. "type": "string",
  68. "required": false,
  69. "description": "音色 ID,不传则自动推荐",
  70. "example": "female-shaonv"
  71. },
  72. {
  73. "name": "emotion",
  74. "type": "string",
  75. "required": false,
  76. "description": "情感",
  77. "enum": ["neutral", "happy", "sad", "angry", "fearful", "surprised", "disgusted"],
  78. "default": "neutral"
  79. },
  80. {
  81. "name": "speed",
  82. "type": "number",
  83. "required": false,
  84. "description": "语速倍数",
  85. "minimum": 0.5,
  86. "maximum": 2.0,
  87. "default": 1.0
  88. }
  89. ],
  90. "response_schema": {
  91. "audio_url": "string",
  92. "duration": "number",
  93. "characters": "number"
  94. }
  95. },
  96. {
  97. "id": "synthesize_async",
  98. "name": "长文本异步合成",
  99. "description": "适合超过 500 字的长文本(如章节、有声书),异步处理",
  100. "method": "POST",
  101. "path": "/v1/tts/async-synthesize",
  102. "parameters": [
  103. {
  104. "name": "text",
  105. "type": "string",
  106. "required": true,
  107. "description": "要合成的文本(10-100000 字符)"
  108. },
  109. {
  110. "name": "voice_id",
  111. "type": "string",
  112. "required": false,
  113. "description": "音色 ID"
  114. },
  115. {
  116. "name": "instruction",
  117. "type": "string",
  118. "required": false,
  119. "description": "自然语言指令,如:用磁性男声,悲伤语气"
  120. },
  121. {
  122. "name": "callback_url",
  123. "type": "string",
  124. "required": false,
  125. "description": "完成回调 URL"
  126. }
  127. ],
  128. "response_schema": {
  129. "task_id": "string",
  130. "estimated_duration": "number",
  131. "status_url": "string"
  132. }
  133. },
  134. {
  135. "id": "instruct_synthesize",
  136. "name": "自然语言指令合成",
  137. "description": "用自然语言描述需求(如用磁性男声,悲伤语气),自动生成音频",
  138. "method": "POST",
  139. "path": "/v1/tts/instruct",
  140. "parameters": [
  141. {
  142. "name": "text",
  143. "type": "string",
  144. "required": true,
  145. "description": "要合成的文本"
  146. },
  147. {
  148. "name": "instruction",
  149. "type": "string",
  150. "required": true,
  151. "description": "自然语言指令,如:用磁性男声,悲伤语气,最后一句慢一点",
  152. "example": "用温柔女声朗读,开心一点"
  153. }
  154. ],
  155. "response_schema": {
  156. "audio_url": "string",
  157. "parsed_params": "object"
  158. }
  159. }
  160. ],
  161. "examples": [
  162. {
  163. "title": "为睡前故事配音",
  164. "user_input": "帮我用温柔女声给这段睡前故事配音",
  165. "workflow": [
  166. {
  167. "step": 1,
  168. "action": "call",
  169. "endpoint": "synthesize_short",
  170. "params": {
  171. "text": "从前有一只小兔子...",
  172. "voice_id": "female-shaonv",
  173. "emotion": "neutral",
  174. "speed": 0.9
  175. }
  176. }
  177. ]
  178. },
  179. {
  180. "title": "为广告视频配音",
  181. "user_input": "用磁性男声配一段广告词,要有感染力",
  182. "workflow": [
  183. {
  184. "step": 1,
  185. "action": "call",
  186. "endpoint": "instruct_synthesize",
  187. "params": {
  188. "text": "限时特惠,仅此一天...",
  189. "instruction": "磁性男声,富有感染力"
  190. }
  191. }
  192. ]
  193. },
  194. {
  195. "title": "生成长篇有声书",
  196. "user_input": "把这一章小说转成有声书",
  197. "workflow": [
  198. {
  199. "step": 1,
  200. "action": "call",
  201. "endpoint": "detect_voice",
  202. "params": {
  203. "text": "第一章..."
  204. }
  205. },
  206. {
  207. "step": 2,
  208. "action": "call",
  209. "endpoint": "synthesize_async",
  210. "params": {
  211. "text": "第一章...",
  212. "voice_id": "<from_step_1>",
  213. "callback_url": "https://user-app.com/webhook"
  214. }
  215. },
  216. {
  217. "step": 3,
  218. "action": "wait_callback",
  219. "description": "等待 webhook 通知完成"
  220. }
  221. ]
  222. }
  223. ],
  224. "pricing": {
  225. "model": "pay_per_use",
  226. "free_tier": {
  227. "characters_per_month": 10000,
  228. "description": "每月 10000 字符免费"
  229. },
  230. "standard": {
  231. "price_per_character_cny": 0.001,
  232. "description": "超出免费额度后按字符计费,¥0.001/字符"
  233. },
  234. "enterprise": {
  235. "description": "企业级套餐,联系商务"
  236. }
  237. },
  238. "rate_limits": {
  239. "free": "60 次/分钟",
  240. "standard": "600 次/分钟",
  241. "enterprise": "自定义"
  242. },
  243. "supported_languages": [
  244. "zh-CN", "zh-TW", "en-US", "en-GB", "ja-JP", "ko-KR"
  245. ],
  246. "voice_categories": [
  247. "新闻播报", "有声书", "广告配音", "儿童故事",
  248. "客服语音", "游戏角色", "教育课件", "纪录片"
  249. ]
  250. }