Update README.md
Browse files
README.md
CHANGED
@@ -42,7 +42,7 @@ model = WhisperForConditionalGeneration.from_pretrained("NhutP/ViWhisper-small")
|
|
42 |
model.config.forced_decoder_ids = None
|
43 |
|
44 |
# load a sample
|
45 |
-
array, sampling_rate = librosa.load(
|
46 |
input_features = processor(array, sampling_rate=sampling_rate, return_tensors="pt").input_features
|
47 |
# generate token ids
|
48 |
predicted_ids = model.generate(input_features)
|
|
|
42 |
model.config.forced_decoder_ids = None
|
43 |
|
44 |
# load a sample
|
45 |
+
array, sampling_rate = librosa.load('path_to_audio', sr = 16000) # Load some audio sample
|
46 |
input_features = processor(array, sampling_rate=sampling_rate, return_tensors="pt").input_features
|
47 |
# generate token ids
|
48 |
predicted_ids = model.generate(input_features)
|