File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change 12
12
"author" : " buxuku" ,
13
13
"license" : " ISC" ,
14
14
"dependencies" : {
15
+ "@ffmpeg-installer/ffmpeg" : " ^1.1.0" ,
15
16
"@volcengine/openapi" : " ^1.14.0" ,
16
17
"axios" : " ^1.6.2" ,
17
18
"crypto" : " ^1.0.1" ,
18
19
"dotenv" : " ^16.4.5" ,
19
20
"fluent-ffmpeg" : " ^2.1.2"
20
21
}
21
- }
22
+ }
Original file line number Diff line number Diff line change 1
1
import { spawn } from 'child_process' ;
2
2
import fs from 'fs' ;
3
3
import path from 'path' ;
4
+ import ffmpegInstaller from '@ffmpeg-installer/ffmpeg' ;
4
5
import ffmpeg from 'fluent-ffmpeg' ;
5
6
import { translateConfig , videoDir , whisperModel } from './config.js' ;
6
7
8
+ ffmpeg . setFfmpegPath ( ffmpegInstaller . path ) ;
9
+
7
10
// 将字符串转成模板字符串
8
11
export const renderTemplate = ( template , data ) => {
9
12
const names = Object . keys ( data ) ;
@@ -89,4 +92,4 @@ export const installWhisper = async () => {
89
92
console . log ( '正在编译 whisper.cpp' ) ;
90
93
await runCommand ( 'make' , [ '-C' , './whisper.cpp' ] ) ;
91
94
}
92
- } ;
95
+ } ;
You can’t perform that action at this time.
0 commit comments