mirror of
https://github.com/openai/whisper.git
synced 2025-11-23 22:15:58 +00:00
docs: updated README to specify translation model limitation (#2547)
Updated README given info from https://github.com/openai/whisper/discussions/2483
This commit is contained in:
parent
86899243e9
commit
f50c4f264e
20
README.md
20
README.md
@ -77,25 +77,35 @@ Whisper's performance varies widely depending on the language. The figure below
|
||||
|
||||

|
||||
|
||||
|
||||
|
||||
## Command-line usage
|
||||
|
||||
The following command will transcribe speech in audio files, using the `turbo` model:
|
||||
|
||||
```bash
|
||||
whisper audio.flac audio.mp3 audio.wav --model turbo
|
||||
```
|
||||
|
||||
The default setting (which selects the `turbo` model) works well for transcribing English. To transcribe an audio file containing non-English speech, you can specify the language using the `--language` option:
|
||||
The default setting (which selects the `turbo` model) works well for transcribing English. However, **the `turbo` model is not trained for translation tasks**. If you need to **translate non-English speech into English**, use one of the **multilingual models** (`tiny`, `base`, `small`, `medium`, `large`) instead of `turbo`.
|
||||
|
||||
For example, to transcribe an audio file containing non-English speech, you can specify the language:
|
||||
|
||||
```bash
|
||||
whisper japanese.wav --language Japanese
|
||||
```
|
||||
|
||||
Adding `--task translate` will translate the speech into English:
|
||||
To **translate** speech into English, use:
|
||||
|
||||
whisper japanese.wav --language Japanese --task translate
|
||||
```bash
|
||||
whisper japanese.wav --model medium --language Japanese --task translate
|
||||
```
|
||||
|
||||
> **Note:** The `turbo` model will return the original language even if `--task translate` is specified. Use `medium` or `large` for the best translation results.
|
||||
|
||||
Run the following to view all available options:
|
||||
|
||||
```bash
|
||||
whisper --help
|
||||
```
|
||||
|
||||
See [tokenizer.py](https://github.com/openai/whisper/blob/main/whisper/tokenizer.py) for the list of all available languages.
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user