Skip to content

Commit 46fd9ae

Browse files
committed
chore: update WhisperHelper.ts to include language option in constructCommand function
1 parent 804f95c commit 46fd9ae

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/WhisperHelper.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export const constructCommand = (filePath: string, args: IOptions): string => {
2727
}
2828

2929
const modelName = MODEL_OBJECT[args.modelName as keyof typeof MODEL_OBJECT]
30-
let command = `./main ${constructOptionsFlags(args)} -l auto -m ./models/${modelName} -f ${filePath}`
30+
let command = `./main ${constructOptionsFlags(args)} -l ${args.whisperOptions?.language ? args.whisperOptions?.language : "auto"} -m ./models/${modelName} -f ${filePath}`
3131

3232
return command
3333
}

src/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ export interface WhisperOptions {
44
outputInSrt?: boolean
55
outputInCsv?: boolean
66
translateToEnglish?: boolean
7+
language?: string
78
timestamps_length?: number
89
wordTimestamps?: boolean
910
splitOnWord?: boolean

0 commit comments

Comments
 (0)