faster-whisper icon indicating copy to clipboard operation
faster-whisper copied to clipboard

I can't use language='zh' when I use large-v3

Open wntg opened this issue 10 months ago • 3 comments

warning: The current model is English-only but the language parameter is set to 'zh'; using 'en' instead.

wntg avatar Apr 02 '24 10:04 wntg

@wntg, hello. It seems you are using an English-only model like tiny.en, small.en, etc. Could you try again with other multilingual models ? Ex:

from faster_whisper import WhisperModel

model = WhisperModel("large-v3", device="cuda")
segments, info = model.transcribe("audio.mp3", language="zh")
for segment in segments:
    print("[%.2fs -> %.2fs] %s" % (segment.start, segment.end, segment.text))

trungkienbkhn avatar Apr 02 '24 15:04 trungkienbkhn

@wntg, hello. It seems you are using an English-only model like tiny.en, small.en, etc. Could you try again with other multilingual models ? Ex:

from faster_whisper import WhisperModel

model = WhisperModel("large-v3", device="cuda")
segments, info = model.transcribe("audio.mp3", language="zh")
for segment in segments:
    print("[%.2fs -> %.2fs] %s" % (segment.start, segment.end, segment.text))

I used large-v3: model_size = "large-v3" model = WhisperModel(model_size, device="cuda", compute_type="float16")

wntg avatar Apr 03 '24 02:04 wntg

It's a bit weird because "large-v3" is a multilingual model. This warning appears only with condition from here. Could you show full code and attach your audio ?

trungkienbkhn avatar Apr 03 '24 02:04 trungkienbkhn