SYSTRAN / faster-whisper

Faster Whisper transcription with CTranslate2
MIT License
12.6k stars 1.05k forks source link

different transcribe results with same whisper model and same audios in same process #975

Closed JH90iOS closed 2 months ago

JH90iOS commented 3 months ago

here is the test code:

if __name__ == "__main__":
    model = WhisperModel(**MODEL_OPTION, device_index=0)

    # first
    segments1, info = model.transcribe("audio_test.wav", **ASR_OPTION)
    for segment in segments1:
        print("[%.2fs -> %.2fs] %s" % (segment.start, segment.end, segment.text))

    # second
    segments2, info = model.transcribe("audio_test.wav", **ASR_OPTION)
    for segment in segments2:
        print("[%.2fs -> %.2fs] %s" % (segment.start, segment.end, segment.text))

    # third
    segments3, info = model.transcribe("audio_test.wav", **ASR_OPTION)
    for segment in segments3:
        print("[%.2fs -> %.2fs] %s" % (segment.start, segment.end, segment.text))

every time I run python test.py ,the first result is every accurate ,but the second is same as the third result and they both are not accurate.