edobobo commited on
Commit
bac5d75
1 Parent(s): e59b479

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +7 -3
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 dummy dataset and read audio files
53
  ds = load_dataset("facebook/voxpopuli", "it", split="test")
54
- sample = ds[171]["audio"]
55
 
56
- input_features = processor(sample["array"], sampling_rate=sample["sampling_rate"], return_tensors="pt").input_features
 
 
 
 
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)