Update README.md
Browse files
README.md
CHANGED
@@ -46,6 +46,7 @@ model = Speech2Text.from_pretrained(
|
|
46 |
)
|
47 |
|
48 |
speech, rate = soundfile.read("speech.wav")
|
|
|
49 |
text, *_ = model(speech)[0]
|
50 |
```
|
51 |
|
|
|
46 |
)
|
47 |
|
48 |
speech, rate = soundfile.read("speech.wav")
|
49 |
+
speech = librosa.resample(speech, orig_sr=rate, target_sr=16000) # make sure 16k sampling rate
|
50 |
text, *_ = model(speech)[0]
|
51 |
```
|
52 |
|