Skip to content

Commit 7cb9dd8

Browse files
committed
fix: transcribe error logging + timeout increase for first model download
1 parent 34ba8f4 commit 7cb9dd8

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

vite.config.ts

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1074,7 +1074,7 @@ function comfyLauncher(): Plugin {
10741074
try {
10751075
const output = execSync(`${pythonBin} ${fwScript}`, {
10761076
encoding: 'utf8',
1077-
timeout: 30000,
1077+
timeout: 120000,
10781078
}).trim()
10791079
const lines = output.split('\n')
10801080
const langLine = lines.find((l: string) => l.startsWith('LANG:'))
@@ -1084,7 +1084,10 @@ function comfyLauncher(): Plugin {
10841084
}
10851085
transcript = lines.join(' ').trim()
10861086
success = true
1087-
} catch { /* try fallback */ }
1087+
} catch (fwErr) {
1088+
console.error('[Transcribe] faster-whisper failed:', (fwErr as any).stderr || (fwErr as any).message)
1089+
/* try fallback */
1090+
}
10881091

10891092
// Try openai-whisper
10901093
if (!success) {
@@ -1101,7 +1104,10 @@ function comfyLauncher(): Plugin {
11011104
}
11021105
transcript = lines.join(' ').trim()
11031106
success = true
1104-
} catch { /* neither works */ }
1107+
} catch (owErr) {
1108+
console.error('[Transcribe] openai-whisper failed:', (owErr as any).stderr || (owErr as any).message)
1109+
/* neither works */
1110+
}
11051111
}
11061112

11071113
// Clean up temp files
@@ -1111,7 +1117,7 @@ function comfyLauncher(): Plugin {
11111117

11121118
if (!success) {
11131119
res.writeHead(200, { 'Content-Type': 'application/json' })
1114-
res.end(JSON.stringify({ error: 'Install faster-whisper: pip install faster-whisper', transcript: '' }))
1120+
res.end(JSON.stringify({ error: 'Transcription failed. Install faster-whisper: pip install faster-whisper', transcript: '' }))
11151121
return
11161122
}
11171123

0 commit comments

Comments
 (0)