flyfront's picture
Upload sample.py
bc5bd91 verified
raw
history blame contribute delete
416 Bytes
from faster_whisper import WhisperModel
model = WhisperModel("flyfront/anime-whisper-faster")
segments, info = model.transcribe("test.wav", language="ja", chunk_length=15, condition_on_previous_text=False)
print("Detected language '%s' with probability %f" % (info.language, info.language_probability))
for segment in segments:
print("[%.2fs -> %.2fs] %s" % (segment.start, segment.end, segment.text))