whisper.rn
whisper.rn copied to clipboard
result and segments are empty
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