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

LOG [sizzling] [sizzling] [sizzling] [sizzling] LOG [engine revving] ????

Open ghost opened this issue 1 year ago • 2 comments

LOG [sizzling] [sizzling] [sizzling] [sizzling] [sizzling] [sizzling] [sizzling] [sizzling] [sizzling] [sizzling] [sizzling] [sizzling] [sizzling] [sizzling] [sizzling] [sizzling] [sizzling] [sizzling] [sizzling] [sizzling] [sizzling] [sizzling] [sizzling] [sizzling] (engine revving) [splashing] LOG [engine revving]

why is it transcribing everything like this? the audio file contains speech but this is all i get with whisper tiny

ghost avatar Feb 06 '24 10:02 ghost

Real time works for me but I can't get it to work from a file. I get the same engine revving result when opening from a file.

sooryranga avatar Feb 23 '24 04:02 sooryranga

I encountered the same issue. I use the expo-av package for microphone recording. I resolved it by modifying the output file configuration to match the one mentioned here.

const AUDIO_WAV = {
  isMeteringEnabled: true,
  android: {
    ...Audio.RecordingOptionsPresets.HIGH_QUALITY.android,
    extension: '.wav',
    outputFormat: AndroidOutputFormat.DEFAULT,
    audioEncoder: AndroidAudioEncoder.DEFAULT,
    sampleRate: 16000, // Set sample rate to 16kHz
    numberOfChannels: 1, // Set number of channels to mono
  },
  ios: {
    ...Audio.RecordingOptionsPresets.HIGH_QUALITY.ios,
    extension: '.wav',
    outputFormat: IOSOutputFormat.LINEARPCM,
    audioQuality: IOSAudioQuality.MAX,
    sampleRate: 16000, // Set sample rate to 16kHz
    numberOfChannels: 1, // Set number of channels to mono
  },
  web: {
    mimeType: 'audio/wav',
    bitsPerSecond: 128000,
  },
};

const { recording } = await Audio.Recording.createAsync(AUDIO_WAV);

...

const uri = recording.getURI();
const { promise } = whisper.transcribe(uri, {
  language: 'en',
});

wojciechkrol avatar Apr 05 '24 20:04 wojciechkrol