Code Monkey home page Code Monkey logo

Comments (4)

ggerganov avatar ggerganov commented on June 3, 2024

There is a check to stop processing if less than 1s of audio remains:

whisper.cpp/whisper.cpp

Lines 5271 to 5277 in a750868

// if length of spectrogram is less than 1.0s (100 frames), then return
// basically don't process anything that is less than 1.0s
// see issue #39: https://github.com/ggerganov/whisper.cpp/issues/39
if (seek_end < seek_start + (params.speed_up ? 50 : 100)) {
WHISPER_LOG_DEBUG("%s: input is too short - %d ms < 1000 ms\n", __func__, (seek_end - seek_start)*10);
return 0;
}

I've figured it helps in most situations, but obviously can affect negatively in cases like yours. This should become an input parameter

from whisper.cpp.

jploski avatar jploski commented on June 3, 2024

There is a check to stop processing if less than 1s of audio remains:

whisper.cpp/whisper.cpp

Lines 5271 to 5277 in a750868

// if length of spectrogram is less than 1.0s (100 frames), then return
// basically don't process anything that is less than 1.0s
// see issue #39: https://github.com/ggerganov/whisper.cpp/issues/39
if (seek_end < seek_start + (params.speed_up ? 50 : 100)) {
WHISPER_LOG_DEBUG("%s: input is too short - %d ms < 1000 ms\n", __func__, (seek_end - seek_start)*10);
return 0;
}

I've figured it helps in most situations, but obviously can affect negatively in cases like yours. This should become an input parameter

Thanks for pointing it out. However, even if I comment out this block of code, the result is the same (no output).

If it improves behavior in some scenarios, the guard condition could stay as is, but it would be nice if a more prominent output message was shown at least when running via "main" in interactive mode (otherwise it just looks as if it's "broken somehow", which may be off-putting for first-time users).

(And quick processing of short audio files is needed for implementing interactive voice interfaces a'la Talon/Alexa etc.)

from whisper.cpp.

royshil avatar royshil commented on June 3, 2024

@jploski you can pad your input with 0s until you hit 1000ms in length

from whisper.cpp.

itsthisjustin avatar itsthisjustin commented on June 3, 2024

I'm not 100% sure if this is the same issue, but I'm currently having a problem where if the first bit of audio is blank it just doesnt bother transcribing the rest. So if my audio file has say 10 seconds of silence at the beginning but then a minute of audio after that, it outputs a blank transcript.

I think what's happening is if the first segment is empty, whisper doesn't try for the next segment.

(Small update, I think this only occurs if you have single segment set to true)

from whisper.cpp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.