Update README.md
Browse files
README.md
CHANGED
@@ -20,9 +20,6 @@ Install library and download sample audio.
|
|
20 |
pip install faster-whisper
|
21 |
wget https://huggingface.co/datasets/japanese-asr/en_asr.esb_eval/resolve/main/sample.wav -O sample_en.wav
|
22 |
wget https://huggingface.co/datasets/japanese-asr/ja_asr.jsut_basic5000/resolve/main/sample.flac -O sample_ja.flac
|
23 |
-
ffmpeg -i sample_en.wav -ar 16000 -ac 1 -c:a pcm_s16le sample_en_fixed.wav
|
24 |
-
ffmpeg -i sample_ja.flac -ar 16000 -ac 1 -c:a pcm_s16le sample_ja_fixed.wav
|
25 |
-
|
26 |
```
|
27 |
|
28 |
Inference with the kotoba-whisper-bilingual-v1.0-faster.
|
@@ -33,12 +30,12 @@ from faster_whisper import WhisperModel
|
|
33 |
model = WhisperModel("kotoba-tech/kotoba-whisper-bilingual-v1.0-faster")
|
34 |
|
35 |
# Japanese ASR
|
36 |
-
segments, info = model.transcribe("sample_ja.flac", language="ja", task="transcribe",
|
37 |
for segment in segments:
|
38 |
print("[%.2fs -> %.2fs] %s" % (segment.start, segment.end, segment.text))
|
39 |
|
40 |
# English ASR
|
41 |
-
segments, info = model.transcribe("
|
42 |
for segment in segments:
|
43 |
print("[%.2fs -> %.2fs] %s" % (segment.start, segment.end, segment.text))
|
44 |
|
|
|
20 |
pip install faster-whisper
|
21 |
wget https://huggingface.co/datasets/japanese-asr/en_asr.esb_eval/resolve/main/sample.wav -O sample_en.wav
|
22 |
wget https://huggingface.co/datasets/japanese-asr/ja_asr.jsut_basic5000/resolve/main/sample.flac -O sample_ja.flac
|
|
|
|
|
|
|
23 |
```
|
24 |
|
25 |
Inference with the kotoba-whisper-bilingual-v1.0-faster.
|
|
|
30 |
model = WhisperModel("kotoba-tech/kotoba-whisper-bilingual-v1.0-faster")
|
31 |
|
32 |
# Japanese ASR
|
33 |
+
segments, info = model.transcribe("sample_ja.flac", language="ja", task="transcribe", condition_on_previous_text=False)
|
34 |
for segment in segments:
|
35 |
print("[%.2fs -> %.2fs] %s" % (segment.start, segment.end, segment.text))
|
36 |
|
37 |
# English ASR
|
38 |
+
segments, info = model.transcribe("sample_en.wav", language="en", task="transcribe", chunk_length=15, condition_on_previous_text=False)
|
39 |
for segment in segments:
|
40 |
print("[%.2fs -> %.2fs] %s" % (segment.start, segment.end, segment.text))
|
41 |
|