Update README.md
Browse files
README.md
CHANGED
@@ -38,7 +38,10 @@ import librosa
|
|
38 |
# load model and processor
|
39 |
processor = WhisperProcessor.from_pretrained("NhutP/ViWhisper-base")
|
40 |
model = WhisperForConditionalGeneration.from_pretrained("NhutP/ViWhisper-base")
|
41 |
-
|
|
|
|
|
|
|
42 |
|
43 |
# load a sample
|
44 |
array, sampling_rate = librosa.load('path_to_audio', sr = 16000) # Load some audio sample
|
|
|
38 |
# load model and processor
|
39 |
processor = WhisperProcessor.from_pretrained("NhutP/ViWhisper-base")
|
40 |
model = WhisperForConditionalGeneration.from_pretrained("NhutP/ViWhisper-base")
|
41 |
+
|
42 |
+
prefix_ids = model.generation_config.forced_decoder_ids
|
43 |
+
model.generation_config.input_ids = prefix_ids
|
44 |
+
model.generation_config.forced_decoder_ids = None
|
45 |
|
46 |
# load a sample
|
47 |
array, sampling_rate = librosa.load('path_to_audio', sr = 16000) # Load some audio sample
|