bofenghuang
commited on
Commit
•
fbd2b97
1
Parent(s):
c579e26
up
Browse files
README.md
CHANGED
@@ -56,9 +56,9 @@ This model is a fine-tuned version of [openai/whisper-medium](https://huggingfac
|
|
56 |
|
57 |
| Model | Common Voice 11.0 |
|
58 |
| --- | :---: |
|
59 |
-
| [bofenghuang/whisper-small-cv11-german
|
60 |
-
| [bofenghuang/whisper-medium-cv11-german
|
61 |
-
| [bofenghuang/whisper-large-v2-cv11-german
|
62 |
|
63 |
## Usage
|
64 |
|
@@ -73,7 +73,7 @@ from transformers import pipeline
|
|
73 |
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
|
74 |
|
75 |
# Load pipeline
|
76 |
-
pipe = pipeline("automatic-speech-recognition", model="bofenghuang/whisper-medium-cv11-german
|
77 |
|
78 |
# NB: set forced_decoder_ids for generation utils
|
79 |
pipe.model.config.forced_decoder_ids = pipe.tokenizer.get_decoder_prompt_ids(language="de", task="transcribe")
|
@@ -111,8 +111,8 @@ from transformers import AutoProcessor, AutoModelForSpeechSeq2Seq
|
|
111 |
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
|
112 |
|
113 |
# Load model
|
114 |
-
model = AutoModelForSpeechSeq2Seq.from_pretrained("bofenghuang/whisper-medium-cv11-german
|
115 |
-
processor = AutoProcessor.from_pretrained("bofenghuang/whisper-medium-cv11-german
|
116 |
|
117 |
# NB: set forced_decoder_ids for generation utils
|
118 |
model.config.forced_decoder_ids = processor.get_decoder_prompt_ids(language="de", task="transcribe")
|
|
|
56 |
|
57 |
| Model | Common Voice 11.0 |
|
58 |
| --- | :---: |
|
59 |
+
| [bofenghuang/whisper-small-cv11-german](https://huggingface.co/bofenghuang/whisper-small-cv11-german) | 11.35 |
|
60 |
+
| [bofenghuang/whisper-medium-cv11-german](https://huggingface.co/bofenghuang/whisper-medium-cv11-german) | 7.05 |
|
61 |
+
| [bofenghuang/whisper-large-v2-cv11-german](https://huggingface.co/bofenghuang/whisper-large-v2-cv11-german) | **5.76** |
|
62 |
|
63 |
## Usage
|
64 |
|
|
|
73 |
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
|
74 |
|
75 |
# Load pipeline
|
76 |
+
pipe = pipeline("automatic-speech-recognition", model="bofenghuang/whisper-medium-cv11-german", device=device)
|
77 |
|
78 |
# NB: set forced_decoder_ids for generation utils
|
79 |
pipe.model.config.forced_decoder_ids = pipe.tokenizer.get_decoder_prompt_ids(language="de", task="transcribe")
|
|
|
111 |
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
|
112 |
|
113 |
# Load model
|
114 |
+
model = AutoModelForSpeechSeq2Seq.from_pretrained("bofenghuang/whisper-medium-cv11-german").to(device)
|
115 |
+
processor = AutoProcessor.from_pretrained("bofenghuang/whisper-medium-cv11-german", language="german", task="transcribe")
|
116 |
|
117 |
# NB: set forced_decoder_ids for generation utils
|
118 |
model.config.forced_decoder_ids = processor.get_decoder_prompt_ids(language="de", task="transcribe")
|