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