Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail to transcribe in Chinese #808

Open
mru4913 opened this issue Apr 25, 2024 · 1 comment
Open

Fail to transcribe in Chinese #808

mru4913 opened this issue Apr 25, 2024 · 1 comment

Comments

@mru4913
Copy link

mru4913 commented Apr 25, 2024

I have tried the following code according to README.md.

from faster_whisper import WhisperModel
import time

model_size = "./faster-distil-whisper-large-v2"

model = WhisperModel(model_size, device="cuda", compute_type="float16")

t1 = time.perf_counter()
segments, info = model.transcribe(
    "............./../0.mp3",
    # beam_size=5,
    language="zh",
    condition_on_previous_text=False,
)
print(time.perf_counter() - t1)
print(
    "Detected language '%s' with probability %f"
    % (info.language, info.language_probability)
)
for i in segments:
    print(i.text)

output is :

0.06374595290981233
Detected language 'zh' with probability 1.000000
 to me, so I want to say that I want to say,
 if you're if you're to my their research to try to...

Audio is in Chinese (madarain), I couldn't figure out why it outputs in English. Any help will be appreciated.

@Purfview
Copy link
Contributor

Purfview commented Apr 26, 2024

Distil models are English only, you need to use a multilanguage model.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants