feat: MiniMax TTS集成、口播批量剪辑流水线、执黑先行二号账号

- 新增 minimax-tts.js 和 minimax-voice-clone.js 脚本
- 新增口播批量剪辑流水线 (口播_assemble.js, 口播_pipeline.js)
- 更新 video-from-script 各阶段脚本 (kling, images, tts, videos)
- 新增执黑先行二号-风格延伸账号
- 更新执黑先行 account.json 配置
- 替换 ugc_product_seeding 参考图
- 更新 CLAUDE.md 和依赖配置

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
lc
2026-05-24 20:05:56 +08:00
parent 817c181cb5
commit 1e110219ff
31 changed files with 5098 additions and 34 deletions

View File

@@ -37,12 +37,19 @@ const cfg = loadConfig()
const Config = {
apiBase: (cfg.kelingApiBaseUrl || 'https://api-beijing.klingai.com').replace(/\/+$/, ''),
model: cfg.kelingModel || 'kling-v3',
yunwuApiBase: (cfg.kelingYunwuApiBase || '').replace(/\/+$/, ''),
yunwuApiKey: cfg.kelingYunwuApiKey || cfg.minimaxApiKey || '',
model: cfg.kelingModel || 'kling-v2-5-turbo',
pollInterval: 10000,
maxPollTime: 600000,
maxRetries: 3,
}
// 是否走云雾代理模式(用 Bearer token 而非 JWT
function isYunwuMode() {
return !!(Config.yunwuApiBase && Config.yunwuApiKey)
}
// ============================================================================
// JWT 鉴权(来自可灵官方 API 规范)
// ============================================================================
@@ -180,7 +187,7 @@ function extractCoreSubject(prompt) {
}
// ============================================================================
// 官方可灵 API
// 可灵 API(官方 JWT 模式 + 云雾 Bearer Token 模式)
// ============================================================================
const KlingApi = {
@@ -192,8 +199,11 @@ const KlingApi = {
lastFrameUrl = '',
} = options
const creds = loadCredentials()
const token = makeJwt(creds.ak, creds.sk)
const yunwu = isYunwuMode()
const apiBase = yunwu ? Config.yunwuApiBase : Config.apiBase
const authHeader = yunwu
? `Bearer ${Config.yunwuApiKey}`
: `Bearer ${makeJwt(...Object.values(loadCredentials()))}`
const body = {
model_name: model,
@@ -210,8 +220,8 @@ const KlingApi = {
const modeLabel = lastFrameUrl ? '首尾帧' : '单图'
console.log(`\n📡 提交可灵视频任务 [${modeLabel}]`)
console.log(` API: ${Config.apiBase}`)
console.log(`\n📡 提交可灵视频任务 [${modeLabel}]${yunwu ? ' [云雾]' : ' [官方]'}`)
console.log(` API: ${apiBase}`)
console.log(` 模型: ${model}`)
console.log(` 提示词: ${prompt.substring(0, 80)}...`)
if (lastFrameUrl) {
@@ -222,11 +232,11 @@ const KlingApi = {
}
console.log(` 时长: ${duration}s | 画质: ${mode}`)
const res = await fetch(`${Config.apiBase}/v1/videos/image2video`, {
const res = await fetch(`${apiBase}/v1/videos/image2video`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${token}`,
'Authorization': authHeader,
},
body: JSON.stringify(body),
})
@@ -249,12 +259,15 @@ const KlingApi = {
},
async query(taskId) {
const creds = loadCredentials()
const token = makeJwt(creds.ak, creds.sk)
const yunwu = isYunwuMode()
const apiBase = yunwu ? Config.yunwuApiBase : Config.apiBase
const authHeader = yunwu
? `Bearer ${Config.yunwuApiKey}`
: `Bearer ${makeJwt(...Object.values(loadCredentials()))}`
const res = await fetch(`${Config.apiBase}/v1/videos/image2video/${taskId}`, {
const res = await fetch(`${apiBase}/v1/videos/image2video/${taskId}`, {
headers: {
'Authorization': `Bearer ${token}`,
'Authorization': authHeader,
'Content-Type': 'application/json',
},
})