Update README.md
Browse files
README.md
CHANGED
@@ -10,7 +10,7 @@ pipeline_tag: automatic-speech-recognition
|
|
10 |
This is a pipeline for speech-to-text translation from Japanese speech to any target language text based on the cascaded approach, that consists of ASR and translation.
|
11 |
|
12 |
## Usage
|
13 |
-
Here is an example to translate
|
14 |
First, download a sample speech.
|
15 |
```bash
|
16 |
wget https://huggingface.co/datasets/japanese-asr/ja_asr.jsut_basic5000/resolve/main/sample.flac -O sample_ja.flac
|
@@ -24,6 +24,8 @@ from transformers import pipeline
|
|
24 |
pipe = pipeline(
|
25 |
model="japanese-asr/ja-cascaded-s2t-translation",
|
26 |
model_kwargs={"attn_implementation": "sdpa"},
|
|
|
|
|
27 |
chunk_length_s=15,
|
28 |
trust_remote_code=True,
|
29 |
)
|
|
|
10 |
This is a pipeline for speech-to-text translation from Japanese speech to any target language text based on the cascaded approach, that consists of ASR and translation.
|
11 |
|
12 |
## Usage
|
13 |
+
Here is an example to translate Japanese speech into English text translation.
|
14 |
First, download a sample speech.
|
15 |
```bash
|
16 |
wget https://huggingface.co/datasets/japanese-asr/ja_asr.jsut_basic5000/resolve/main/sample.flac -O sample_ja.flac
|
|
|
24 |
pipe = pipeline(
|
25 |
model="japanese-asr/ja-cascaded-s2t-translation",
|
26 |
model_kwargs={"attn_implementation": "sdpa"},
|
27 |
+
model_translation="facebook/nllb-200-distilled-600M",
|
28 |
+
tgt_lang="eng_Latn",
|
29 |
chunk_length_s=15,
|
30 |
trust_remote_code=True,
|
31 |
)
|