| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393 |
- {
- "name": "transcript-to-video",
- "displayName": "閫愬瓧绋緼I瑙嗛鐢熸垚宸ヤ綔娴?,
- "description": "杈撳叆閫愬瓧绋挎枃鏈紝AI鑷姩鎷嗗垎闀滆剼鏈紝鎵归噺璋冪敤鍗虫ⅵ瑙嗛鐢熸垚锛岃緭鍑鸿棰戠墖娈礥RL鍒楄〃+SRT瀛楀箷鏂囦欢銆傛敮鎸佹枃鐢熻棰戝拰鍏堝浘鍚庤棰戜袱绉嶆ā寮忋€?,
- "category": "video-creation",
- "version": "1.0.0",
- "type": "orchestration",
- "parameters": {
- "type": "object",
- "required": ["transcript"],
- "properties": {
- "transcript": {
- "type": "string",
- "description": "閫愬瓧绋垮叏鏂囷紙涓枃锛夛紝Agent灏嗚嚜鍔ㄦ媶鍒嗕负鍒嗛暅娈?
- },
- "segmentDuration": {
- "type": "number",
- "description": "姣忔鐩爣鏃堕暱锛堢锛夛紝褰卞搷鍒嗛暅鎷嗗垎绮掑害",
- "default": 15
- },
- "videoModel": {
- "type": "string",
- "enum": ["720p", "1080p", "pro"],
- "description": "瑙嗛鐢熸垚妯″瀷璐ㄩ噺绛夌骇",
- "default": "720p"
- },
- "videoMethod": {
- "type": "string",
- "enum": ["text2video", "img2video"],
- "description": "text2video=绾枃鐢熻棰戯紙蹇€燂級锛宨mg2video=鍏堢敓鍥惧啀鍥剧敓瑙嗛锛堟晥鏋滄洿鍙帶锛?,
- "default": "text2video"
- },
- "aspectRatio": {
- "type": "string",
- "enum": ["16:9", "9:16", "1:1", "4:3", "3:4", "21:9"],
- "description": "瑙嗛鐢婚潰姣斾緥",
- "default": "16:9"
- },
- "frames": {
- "type": "integer",
- "enum": [121, 241],
- "description": "瑙嗛甯ф暟锛?21=5绉掞紝241=10绉?,
- "default": 121
- }
- }
- },
- "pipeline": [
- {
- "step": 1,
- "name": "AI鍒嗛暅鑴氭湰鐢熸垚",
- "type": "ai",
- "description": "Agent灏嗛€愬瓧绋挎媶鍒嗕负鍒嗛暅JSON鍜孲RT瀛楀箷",
- "aiConfig": {
- "systemPrompt": "浣犳槸涓撲笟鐨勮棰戝垎闀滆剼鏈紪鍐欎笓瀹躲€傚皢閫愬瓧绋挎媶鍒嗕负鍒嗛暅娈碉紝姣忔绾?0-45涓腑鏂囧瓧锛堢害15绉掕閫燂級銆備负姣忔鐢熸垚鑻辨枃瑙嗛鐢熸垚鎻愮ず璇嶏紙prompt锛夛紝鎻忚堪鐢婚潰鍐呭銆侀暅澶寸被鍨嬨€佹皼鍥村拰鐢昏川銆?,
- "userPromptTemplate": "璇峰皢浠ヤ笅閫愬瓧绋挎媶鍒嗕负鍒嗛暅鑴氭湰锛屾瘡娈电害${segmentDuration}绉掋€俓n\n閫愬瓧绋匡細\n${transcript}\n\n杈撳嚭JSON鏁扮粍鏍煎紡锛歕n[{\"id\":\"S-01\",\"act\":\"娈佃惤鍚峔",\"narration\":\"涓枃鏃佺櫧鍘熸枃\",\"type\":\"ai-gen\",\"prompt\":\"English video generation prompt with scene, camera, mood, quality keywords\",\"duration\":\"15s\"}]\n\n鍚屾椂杈撳嚭SRT瀛楀箷鏂囦欢鍐呭銆?,
- "outputFormat": {
- "storyboard": "Array<{id, act, narration, type, prompt, duration}>",
- "srt": "String (SRT format subtitle content)"
- },
- "temperature": 0.3
- },
- "output": {
- "storyboard": "鍒嗛暅JSON鏁扮粍",
- "srt": "SRT瀛楀箷鏂囦欢鍐呭"
- }
- },
- {
- "step": 2,
- "name": "鎵归噺鐢熸垚瑙嗛绱犳潗",
- "type": "api",
- "description": "瀵规瘡涓垎闀滄骞惰璋冪敤鍗虫ⅵ瑙嗛鐢熸垚API",
- "forEach": "storyboard",
- "forEachAs": "segment",
- "parallel": {
- "maxConcurrent": 5,
- "delayMs": 1000
- },
- "branches": {
- "text2video": {
- "condition": "videoMethod === 'text2video'",
- "steps": [
- {
- "id": "2a",
- "name": "鏂囩敓瑙嗛",
- "skill": "jimeng/jimeng-video-v3-720p",
- "skillVariants": {
- "720p": "jimeng/jimeng-video-v3-720p",
- "1080p": "jimeng/jimeng-video-v3-1080p",
- "pro": "jimeng/jimeng-video-v3-pro"
- },
- "input": {
- "prompt": "${segment.prompt}",
- "method": "1",
- "frames": "${frames}",
- "config": {
- "aspect_ratio": "${aspectRatio}"
- }
- },
- "output": "workIds[${segment.id}]"
- }
- ]
- },
- "img2video": {
- "condition": "videoMethod === 'img2video'",
- "steps": [
- {
- "id": "2b-1",
- "name": "鏂囩敓鍥撅紙棣栧抚锛?,
- "skill": "jimeng/jimeng-img-v4",
- "input": {
- "prompt": "${segment.prompt}",
- "sizeDate": {
- "width": "${aspectRatio === '16:9' ? 2560 : aspectRatio === '9:16' ? 1440 : 2048}",
- "height": "${aspectRatio === '16:9' ? 1440 : aspectRatio === '9:16' ? 2560 : 2048}"
- }
- },
- "output": "imageWorkIds[${segment.id}]"
- },
- {
- "id": "2b-2",
- "name": "杞鍥剧墖缁撴灉",
- "skill": "jimeng/jimeng-task-query",
- "dependsOn": ["2b-1"],
- "input": {
- "workId": "${imageWorkIds[segment.id]}",
- "routerName": "getImgV4"
- },
- "pollingConfig": {
- "intervalMs": 3000,
- "maxAttempts": 30,
- "completionCondition": "data.isFinish === true"
- }
- },
- {
- "id": "2b-3",
- "name": "鑾峰彇鍥剧墖URL",
- "skill": "jimeng/jimeng-work-result",
- "dependsOn": ["2b-2"],
- "input": {
- "workId": "${imageWorkIds[segment.id]}"
- },
- "output": "imageUrls[${segment.id}]",
- "responseExtract": "images[0]"
- },
- {
- "id": "2b-4",
- "name": "鍥剧敓瑙嗛锛堥甯э級",
- "skill": "jimeng/jimeng-video-v3-720p",
- "dependsOn": ["2b-3"],
- "input": {
- "prompt": "${segment.prompt}",
- "method": "2",
- "frames": "${frames}",
- "config": {
- "image_urls": ["${imageUrls[segment.id]}"]
- }
- },
- "output": "workIds[${segment.id}]"
- }
- ]
- }
- }
- },
- {
- "step": 3,
- "name": "杞瑙嗛鐢熸垚缁撴灉",
- "type": "api",
- "forEach": "workIds",
- "forEachAs": "workId",
- "parallel": {
- "maxConcurrent": 10,
- "delayMs": 500
- },
- "steps": [
- {
- "id": "3a",
- "name": "杞浠诲姟鐘舵€?,
- "skill": "jimeng/jimeng-task-query",
- "input": {
- "workId": "${workId}",
- "routerName": "${videoModel === '720p' ? 'getVideoV3_720p' : videoModel === '1080p' ? 'getVideoV3_1080p' : 'getVideoV3_Pro'}"
- },
- "pollingConfig": {
- "intervalMs": 5000,
- "maxAttempts": 60,
- "completionCondition": "data.isFinish === true",
- "timeoutMs": 300000
- }
- },
- {
- "id": "3b",
- "name": "鑾峰彇瑙嗛URL",
- "skill": "jimeng/jimeng-work-result",
- "dependsOn": ["3a"],
- "input": {
- "workId": "${workId}"
- },
- "output": "videoResults[${segmentId}]",
- "responseExtract": {
- "videoUrl": "videos[0]",
- "images": "images"
- }
- }
- ]
- },
- {
- "step": 4,
- "name": "缁撴灉姹囨€?,
- "type": "compute",
- "logic": "aggregateResults(storyboard, srt, videoResults)",
- "algorithm": {
- "merge": "灏嗗垎闀淛SON涓庤棰慤RL鍚堝苟",
- "stats": "缁熻鎴愬姛/澶辫触鏁伴噺",
- "failedRetry": "澶辫触鐨勫垎闀滄鏍囪涓篺ailedIds锛屽彲閲嶈瘯"
- },
- "output": "finalOutput"
- },
- {
- "step": 5,
- "name": "鍙€夛細涓€閿垚鐗?,
- "type": "api",
- "optional": true,
- "condition": "user requests quick compilation && successCount <= 50 && totalDuration <= 30",
- "skill": "video-creation/quickly-video-create",
- "input": {
- "material_list": "${videoResults.map(r => ({ type: 'video', value: r.videoUrl }))}",
- "tags": "${extractKeywords(transcript)}",
- "proportion": "${aspectRatio === '9:16' ? '9:16' : aspectRatio === '1:1' ? '1:1' : '9:16'}",
- "video_duration": { "min": 15, "max": 30 },
- "pre_id": "${Date.now().toString()}",
- "ai_voice": 1,
- "ai_bgm": 1,
- "ai_subtitle": 1
- },
- "output": "quicklyTaskId",
- "downstream": "video-creation/quickly-video-query"
- }
- ],
- "response": {
- "type": "object",
- "properties": {
- "storyboard": {
- "type": "array",
- "description": "鍒嗛暅鑴氭湰JSON",
- "items": {
- "type": "object",
- "properties": {
- "id": { "type": "string" },
- "act": { "type": "string" },
- "narration": { "type": "string" },
- "prompt": { "type": "string" },
- "duration": { "type": "string" },
- "videoUrl": { "type": "string", "description": "鐢熸垚鐨勮棰慤RL锛堟案涔呮湁鏁堬級" },
- "imageUrl": { "type": "string", "description": "鐢熸垚鐨勯甯у浘URL锛坕mg2video妯″紡锛? }
- }
- }
- },
- "srt": {
- "type": "string",
- "description": "SRT瀛楀箷鏂囦欢鍐呭"
- },
- "segments": {
- "type": "array",
- "description": "瑙嗛鐗囨姹囨€?,
- "items": {
- "type": "object",
- "properties": {
- "id": { "type": "string" },
- "videoUrl": { "type": "string" },
- "duration": { "type": "number" },
- "prompt": { "type": "string" }
- }
- }
- },
- "totalSegments": { "type": "integer" },
- "successCount": { "type": "integer" },
- "failedCount": { "type": "integer" },
- "failedIds": { "type": "array", "items": { "type": "string" } }
- }
- },
- "relatedSkills": [
- "jimeng/jimeng-video-v3-720p",
- "jimeng/jimeng-video-v3-1080p",
- "jimeng/jimeng-video-v3-pro",
- "jimeng/jimeng-img-v4",
- "jimeng/jimeng-task-query",
- "jimeng/jimeng-work-result",
- "video-creation/quickly-video-create",
- "video-creation/quickly-video-query"
- ],
- "pricing": {
- "text2video_720p_5s": {
- "perSegment": 1.4,
- "unit": "CNY",
- "formula": "0.28鍏?绉?脳 5绉?
- },
- "text2video_720p_10s": {
- "perSegment": 2.8,
- "unit": "CNY",
- "formula": "0.28鍏?绉?脳 10绉?
- },
- "img2video_720p_5s": {
- "perSegment": 1.62,
- "unit": "CNY",
- "formula": "0.22鍏?鍥? + 0.28鍏?绉捗?绉?瑙嗛)"
- },
- "example_71segments_5s": {
- "text2video": "鈮?9鍏?,
- "img2video": "鈮?15鍏?
- }
- },
- "limitations": {
- "videoDuration": "浠呮敮鎸?绉?121甯?鎴?0绉?241甯?锛屾棤娉曠簿纭尮閰峉RT鏃堕棿鎴?,
- "noTTS": "鏃燭TS閰嶉煶鑳藉姏锛岄渶鐢ㄦ埛鍦ㄥ壀鏄犱腑閰嶉煶",
- "noAutoStitch": "鏃犺嚜鍔ㄦ嫾鎺ラ暱瑙嗛鑳藉姏锛宷uickly鏈€闀?0绉?,
- "parallelLimit": "鍗虫ⅵAPI寤鸿鈮?骞惰锛岄伩鍏嶉鐜囬檺鍒?
- },
- "futureExtensions": [
- {
- "name": "tts-voiceover",
- "description": "TTS閰嶉煶Skill锛氭寜閫愬瓧绋跨敓鎴愯闊抽煶棰?,
- "status": "planned"
- },
- {
- "name": "video-stitch",
- "description": "瑙嗛鎷兼帴Skill锛欶Fmpeg鏈嶅姟绔寜SRT鏃堕棿杞寸簿纭嫾鎺?,
- "status": "planned"
- },
- {
- "name": "seeddance-video",
- "description": "seeddance2.0妯″瀷鎺ュ叆锛氭洿楂樿川閲忚棰戠敓鎴?,
- "status": "planned"
- }
- ],
- "tokenConfig": {
- "type": "body",
- "tokenField": "token",
- "format": "Bearer r:{{jimengToken}}",
- "configFile": "~/.openclaw/voc-credentials.json",
- "currentToken": "Bearer r:f0333969e312a40e4703e8fe4ed1c600",
- "resolutionOrder": ["configFile", "currentToken"],
- "onMissing": {
- "action": "showPaymentQR",
- "qrCodeUrl": "https://pwa.fmode.cn/apig-pay.html?authid=T0iOotHcDX&fun_id=HOkkX72PMF",
- "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
- "pollingIntervalMs": 3000,
- "pollingTimeoutMs": 300000,
- "onPaymentSuccess": "retrySkillWithNewToken",
- "title": "鎵爜寮€閫氬嵆姊I瑙嗛鐢熸垚鏈嶅姟",
- "message": "璇锋壂鎻忎笅鏂逛簩缁寸爜瀹屾垚鏀粯锛屾敮浠樻垚鍔熷悗灏嗚嚜鍔ㄨ幏鍙?Token 骞剁户缁墽琛屻€?
- },
- "onBalanceInsufficient": {
- "action": "showPaymentQR",
- "qrCodeUrl": "https://pwa.fmode.cn/apig-pay.html?authid=T0iOotHcDX&fun_id=HOkkX72PMF",
- "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
- "pollingIntervalMs": 3000,
- "pollingTimeoutMs": 300000,
- "onPaymentSuccess": "retrySkillWithNewToken",
- "title": "鍗虫ⅵAI Token 浣欓涓嶈冻锛岃鎵爜鍏呭€?,
- "message": "褰撳墠 Token 浣欓涓嶈冻锛岃鎵弿浜岀淮鐮佸厖鍊硷紝鏀粯瀹屾垚鍚庡皢鑷姩缁х画鎵ц銆?
- }
- },
- "errorHandling": {
- "balanceInsufficient": {
- "conditions": [
- { "responseField": "code", "operator": "in", "value": [-2, -3, -10, 402, 429] },
- { "responseField": "msg", "operator": "contains", "value": ["浣欓涓嶈冻", "insufficient", "balance", "quota"] }
- ],
- "matchMode": "any",
- "trigger": "tokenConfig.onBalanceInsufficient"
- },
- "segmentFailed": {
- "action": "markFailed",
- "description": "鍗曚釜鍒嗛暅娈电敓鎴愬け璐ユ椂鏍囪涓篺ailed锛屼笉闃诲鍏朵粬娈碉紝鏈€鍚庢眹鎬诲け璐ュ垪琛ㄤ緵閲嶈瘯"
- }
- },
- "timeout": 600000,
- "retry": {
- "maxAttempts": 2,
- "delay": 3000,
- "backoffMultiplier": 2
- }
- }
|