nodejs-whisper icon indicating copy to clipboard operation
nodejs-whisper copied to clipboard

Getting empty result from nodewhisper

Open kukadiyaAni opened this issue 2 years ago • 5 comments

I try to speech to text using nodejs-whisper and I got success with the below code and I checked the log get the message [Nodejs-whisper] Transcribing Done!

Now what to do next to get text from Speech, my code is below and result got empty

const result = await nodewhisper(filePath, {
      modelName: "base.en", //Downloaded models name
      autoDownloadModelName: "base.en", // (optional) autodownload a model if model is not present
      whisperOptions: {
        outputInText: true, // get output result in txt file
        outputInVtt: true, // get output result in vtt file
        outputInSrt: true, // get output result in srt file
        outputInCsv: true, // get output result in csv file
        translateToEnglish: true, //translate from source language to english
        wordTimestamps: true, // Word-level timestamps
        timestamps_length: 20, // amount of dialogue per timestamp pair
        splitOnWord: true, //split on word rather than on token
      },
    });
    // process.chdir(originalDirectory);
    console.log("Transcribing result:", data);```

kukadiyaAni avatar Oct 23 '23 11:10 kukadiyaAni

are you using windows ? and have you installed make tool and ffmpeg on your machine if you are using windows

ChetanXpro avatar Oct 26 '23 08:10 ChetanXpro

@ChetanXpro thanks for the help, I'm using a MacBook and I see documentation ffmpeg is not required in the latest version

kukadiyaAni avatar Oct 30 '23 09:10 kukadiyaAni

@ChetanXpro thanks for the help, I'm using a MacBook and I see documentation ffmpeg is not required in the latest version

can you please show me all the logs which you can see on terminal , by that i can check on which step its failing , i am also using mac and its working for me

ChetanXpro avatar Oct 30 '23 11:10 ChetanXpro

@ChetanXpro check log here:

[Nodejs-whisper]  Transcribing file: /Users/ani/project/asset/voice_file.wav

[Nodejs-whisper] Transcribing Done!
Transcribing result: 

if it works for you can share the code or GitHub repo project if possible

kukadiyaAni avatar Oct 30 '23 14:10 kukadiyaAni

Hey @kukadiyaAni sorry i was not active in this project , was busy in some other projects and job,

Please make sure you have ffmpeg installed on your system.

here is a file where i have used nodejs-whisper: https://github.com/ChetanXpro/VideoSanitizer/blob/main/src/services/transcription.service.ts

ChetanXpro avatar Feb 13 '24 12:02 ChetanXpro