mirror of
https://github.com/openai/whisper.git
synced 2025-11-24 14:35:57 +00:00
docs: updated README to specify translation model limitation
Updated README given info from https://github.com/openai/whisper/discussions/2483
This commit is contained in:
parent
517a43ecd1
commit
13c50c64a8
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
|
## Command-line usage
|
||||||
|
|
||||||
The following command will transcribe speech in audio files, using the `turbo` model:
|
The following command will transcribe speech in audio files, using the `turbo` model:
|
||||||
|
|
||||||
|
```bash
|
||||||
whisper audio.flac audio.mp3 audio.wav --model turbo
|
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
|
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:
|
Run the following to view all available options:
|
||||||
|
|
||||||
|
```bash
|
||||||
whisper --help
|
whisper --help
|
||||||
|
```
|
||||||
|
|
||||||
See [tokenizer.py](https://github.com/openai/whisper/blob/main/whisper/tokenizer.py) for the list of all available languages.
|
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