Update README.md
Browse files
README.md
CHANGED
@@ -49,11 +49,15 @@ model_id = "litus-ai/whisper-small-ita"
|
|
49 |
processor = WhisperProcessor.from_pretrained(model_id)
|
50 |
model = WhisperForConditionalGeneration.from_pretrained(model_id)
|
51 |
|
52 |
-
# load
|
53 |
ds = load_dataset("facebook/voxpopuli", "it", split="test")
|
54 |
-
sample = ds[171]["audio"]
|
55 |
|
56 |
-
input_features = processor(
|
|
|
|
|
|
|
|
|
57 |
|
58 |
# generate token ids
|
59 |
predicted_ids = model.generate(input_features)
|
|
|
49 |
processor = WhisperProcessor.from_pretrained(model_id)
|
50 |
model = WhisperForConditionalGeneration.from_pretrained(model_id)
|
51 |
|
52 |
+
# load Meta voxpopuli in italian
|
53 |
ds = load_dataset("facebook/voxpopuli", "it", split="test")
|
54 |
+
sample = ds[171]["audio"] # sample having an "[UNINT]" token
|
55 |
|
56 |
+
input_features = processor(
|
57 |
+
sample["array"],
|
58 |
+
sampling_rate=sample["sampling_rate"],
|
59 |
+
return_tensors="pt",
|
60 |
+
).input_features
|
61 |
|
62 |
# generate token ids
|
63 |
predicted_ids = model.generate(input_features)
|