fix: use cloud local asr fallback
This commit is contained in:
@@ -859,11 +859,14 @@ function resolveVideoModelLabel(models: RuntimeModels | undefined, model: string
|
||||
}
|
||||
|
||||
function audioModelTrace(models?: RuntimeModels): ModelTraceSpec {
|
||||
const remoteState = models?.asr_remote_enabled === false ? "已关闭" : "启用"
|
||||
const localState = models?.asr_local_fallback_enabled === false ? "关闭" : "启用"
|
||||
const localModel = models?.faster_whisper ? `faster-whisper ${models.faster_whisper}` : modelValue(models?.local_asr)
|
||||
return {
|
||||
title: "音频解析",
|
||||
model: modelList([models?.asr, models?.translate, models?.asr_fallback]),
|
||||
chain: [
|
||||
`ASR 转写:优先 ${modelValue(models?.asr)};失败后尝试本机 ${modelValue(models?.local_asr)};仍失败才回退 ${modelValue(models?.asr_fallback)},并拒绝假字幕/重复时间轴`,
|
||||
`ASR 转写:远端 ${remoteState},模型 ${modelValue(models?.asr)}${models?.asr_language ? `,语言 ${models.asr_language}` : ""};本机转写 ${localState},使用 ${localModel};多模态兜底${models?.asr_audio_fallback_enabled === false ? "关闭" : `为 ${modelValue(models?.asr_fallback)}`},并拒绝假字幕/重复时间轴`,
|
||||
`字幕翻译:${modelValue(models?.translate)} 按 ASR 段落输出中文;失败时保留原文时间轴,中文可为空`,
|
||||
`讲话人 / 节奏 / 背景音:${modelValue(models?.asr_fallback)} 读取 audio.wav + 转写时间轴做多模态分析;失败时用本地时长/段落估算兜底`,
|
||||
],
|
||||
|
||||
@@ -254,6 +254,12 @@ export interface GeneratedVideo {
|
||||
|
||||
export interface RuntimeModels {
|
||||
asr?: string
|
||||
asr_language?: string
|
||||
asr_base_url?: string
|
||||
asr_remote_enabled?: boolean
|
||||
asr_local_fallback_enabled?: boolean
|
||||
asr_audio_fallback_enabled?: boolean
|
||||
faster_whisper?: string
|
||||
local_asr?: string
|
||||
asr_fallback?: string
|
||||
translate?: string
|
||||
|
||||
Reference in New Issue
Block a user