Skip to content

Commit

Permalink
Merge pull request #5 from rerender2021/fix/no-server-crash
Browse files Browse the repository at this point in the history
fix no server dir crash
  • Loading branch information
rerender2021 authored Mar 29, 2023
2 parents 1e9dd7f + cbb7db8 commit 0923742
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/whisper/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export class Whisper {
console.log("try to init vosk asr engine");
const dir = path.resolve(process.cwd(), "whisper-gpu-server");
const exePath = path.resolve(dir, "./Whisper-API.exe");
if (dir && exePath) {
if (fs.existsSync(dir) && fs.existsSync(exePath)) {
return new Promise((resolve, reject) => {
console.log("asrDir exists, start asr server", dir);

Expand Down

0 comments on commit 0923742

Please sign in to comment.