whisper.rn icon indicating copy to clipboard operation
whisper.rn copied to clipboard

result and segments are empty

Open illusion77 opened this issue 1 year ago • 3 comments

For this code

const filePath = `${RNFS.DocumentDirectoryPath}/whisper/ggml-tiny.en.bin`
const sampleFilePath = `${RNFS.DocumentDirectoryPath}/youtube_audio_3LopI4YeC4I.wav`

const whisperContext = await initWhisper({ filePath })

const options = { language: 'en' }
const { stop, promise } = whisperContext.transcribe(sampleFilePath, options)

const { result, segments } = await promise
// result: (The inference text result from audio file)

console.log('---result---', result);
console.log('---segments---',segments);

I got this print

---result--- ---segments--- Array []

This audio file is a English content, and the pronunciation is pretty clear I do not know why got this.

Thanks! @jhen0409

illusion77 avatar Apr 26 '23 17:04 illusion77