| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257 |
- {
- "name": "ai-voice-synthesis",
- "display_name": "AI 语音合成",
- "version": "1.0.0",
- "description": "智能 AI 语音合成工具,支持自然语言描述、多音色、多情感、异步长文本合成。让 AI 助手一句话生成专业级语音。",
- "author": "AI Voice Team",
- "homepage": "https://your-domain.com",
- "icon": "https://your-domain.com/icon.png",
- "category": "audio",
- "tags": ["TTS", "语音合成", "配音", "有声书", "AI"],
- "license": "Commercial",
- "api": {
- "base_url": "https://api.your-domain.com",
- "auth_type": "bearer",
- "openapi_spec": "https://your-domain.com/openapi/tts-api.yaml"
- },
- "endpoints": [
- {
- "id": "list_voices",
- "name": "获取可用音色",
- "description": "列出所有可用音色,包含元数据和预览音频",
- "method": "GET",
- "path": "/v1/tts/voices",
- "parameters": [],
- "response_schema": {
- "voices": "array<Voice>"
- }
- },
- {
- "id": "detect_voice",
- "name": "智能音色推荐",
- "description": "输入文本,自动推荐最佳音色和情感。AI 助手调用合成前应先调用此接口。",
- "method": "POST",
- "path": "/v1/tts/detect",
- "parameters": [
- {
- "name": "text",
- "type": "string",
- "required": true,
- "description": "要分析的文本(10-5000 字符)",
- "example": "从前有一只小兔子,它很难过,因为它的胡萝卜被偷走了。"
- }
- ],
- "response_schema": {
- "voice_id": "string",
- "voice_name": "string",
- "emotion": "string",
- "scene": "string"
- }
- },
- {
- "id": "synthesize_short",
- "name": "短文本合成",
- "description": "适合少于 500 字的短文本,直接返回音频 URL",
- "method": "POST",
- "path": "/v1/tts/synthesize",
- "parameters": [
- {
- "name": "text",
- "type": "string",
- "required": true,
- "description": "要合成的文本(10-500 字符)",
- "example": "你好,欢迎使用 AI 语音合成"
- },
- {
- "name": "voice_id",
- "type": "string",
- "required": false,
- "description": "音色 ID,不传则自动推荐",
- "example": "female-shaonv"
- },
- {
- "name": "emotion",
- "type": "string",
- "required": false,
- "description": "情感",
- "enum": ["neutral", "happy", "sad", "angry", "fearful", "surprised", "disgusted"],
- "default": "neutral"
- },
- {
- "name": "speed",
- "type": "number",
- "required": false,
- "description": "语速倍数",
- "minimum": 0.5,
- "maximum": 2.0,
- "default": 1.0
- }
- ],
- "response_schema": {
- "audio_url": "string",
- "duration": "number",
- "characters": "number"
- }
- },
- {
- "id": "synthesize_async",
- "name": "长文本异步合成",
- "description": "适合超过 500 字的长文本(如章节、有声书),异步处理",
- "method": "POST",
- "path": "/v1/tts/async-synthesize",
- "parameters": [
- {
- "name": "text",
- "type": "string",
- "required": true,
- "description": "要合成的文本(10-100000 字符)"
- },
- {
- "name": "voice_id",
- "type": "string",
- "required": false,
- "description": "音色 ID"
- },
- {
- "name": "instruction",
- "type": "string",
- "required": false,
- "description": "自然语言指令,如:用磁性男声,悲伤语气"
- },
- {
- "name": "callback_url",
- "type": "string",
- "required": false,
- "description": "完成回调 URL"
- }
- ],
- "response_schema": {
- "task_id": "string",
- "estimated_duration": "number",
- "status_url": "string"
- }
- },
- {
- "id": "instruct_synthesize",
- "name": "自然语言指令合成",
- "description": "用自然语言描述需求(如用磁性男声,悲伤语气),自动生成音频",
- "method": "POST",
- "path": "/v1/tts/instruct",
- "parameters": [
- {
- "name": "text",
- "type": "string",
- "required": true,
- "description": "要合成的文本"
- },
- {
- "name": "instruction",
- "type": "string",
- "required": true,
- "description": "自然语言指令,如:用磁性男声,悲伤语气,最后一句慢一点",
- "example": "用温柔女声朗读,开心一点"
- }
- ],
- "response_schema": {
- "audio_url": "string",
- "parsed_params": "object"
- }
- }
- ],
- "examples": [
- {
- "title": "为睡前故事配音",
- "user_input": "帮我用温柔女声给这段睡前故事配音",
- "workflow": [
- {
- "step": 1,
- "action": "call",
- "endpoint": "synthesize_short",
- "params": {
- "text": "从前有一只小兔子...",
- "voice_id": "female-shaonv",
- "emotion": "neutral",
- "speed": 0.9
- }
- }
- ]
- },
- {
- "title": "为广告视频配音",
- "user_input": "用磁性男声配一段广告词,要有感染力",
- "workflow": [
- {
- "step": 1,
- "action": "call",
- "endpoint": "instruct_synthesize",
- "params": {
- "text": "限时特惠,仅此一天...",
- "instruction": "磁性男声,富有感染力"
- }
- }
- ]
- },
- {
- "title": "生成长篇有声书",
- "user_input": "把这一章小说转成有声书",
- "workflow": [
- {
- "step": 1,
- "action": "call",
- "endpoint": "detect_voice",
- "params": {
- "text": "第一章..."
- }
- },
- {
- "step": 2,
- "action": "call",
- "endpoint": "synthesize_async",
- "params": {
- "text": "第一章...",
- "voice_id": "<from_step_1>",
- "callback_url": "https://user-app.com/webhook"
- }
- },
- {
- "step": 3,
- "action": "wait_callback",
- "description": "等待 webhook 通知完成"
- }
- ]
- }
- ],
- "pricing": {
- "model": "pay_per_use",
- "free_tier": {
- "characters_per_month": 10000,
- "description": "每月 10000 字符免费"
- },
- "standard": {
- "price_per_character_cny": 0.001,
- "description": "超出免费额度后按字符计费,¥0.001/字符"
- },
- "enterprise": {
- "description": "企业级套餐,联系商务"
- }
- },
- "rate_limits": {
- "free": "60 次/分钟",
- "standard": "600 次/分钟",
- "enterprise": "自定义"
- },
- "supported_languages": [
- "zh-CN", "zh-TW", "en-US", "en-GB", "ja-JP", "ko-KR"
- ],
- "voice_categories": [
- "新闻播报", "有声书", "广告配音", "儿童故事",
- "客服语音", "游戏角色", "教育课件", "纪录片"
- ]
- }
|