Update README.md
Browse files
README.md
CHANGED
@@ -199,7 +199,7 @@ audio_array_from_audio = model.generate(**audio_inputs, tgt_lang="rus")[0].cpu()
|
|
199 |
```py
|
200 |
from IPython.display import Audio
|
201 |
|
202 |
-
sample_rate = model.sampling_rate
|
203 |
Audio(audio_array_from_text, rate=sample_rate)
|
204 |
# Audio(audio_array_from_audio, rate=sample_rate)
|
205 |
```
|
@@ -209,7 +209,7 @@ Or save them as a `.wav` file using a third-party library, e.g. `scipy`:
|
|
209 |
```py
|
210 |
import scipy
|
211 |
|
212 |
-
sample_rate = model.sampling_rate
|
213 |
scipy.io.wavfile.write("out_from_text.wav", rate=sample_rate, data=audio_array_from_text)
|
214 |
# scipy.io.wavfile.write("out_from_audio.wav", rate=sample_rate, data=audio_array_from_audio)
|
215 |
```
|
|
|
199 |
```py
|
200 |
from IPython.display import Audio
|
201 |
|
202 |
+
sample_rate = model.config.sampling_rate
|
203 |
Audio(audio_array_from_text, rate=sample_rate)
|
204 |
# Audio(audio_array_from_audio, rate=sample_rate)
|
205 |
```
|
|
|
209 |
```py
|
210 |
import scipy
|
211 |
|
212 |
+
sample_rate = model.config.sampling_rate
|
213 |
scipy.io.wavfile.write("out_from_text.wav", rate=sample_rate, data=audio_array_from_text)
|
214 |
# scipy.io.wavfile.write("out_from_audio.wav", rate=sample_rate, data=audio_array_from_audio)
|
215 |
```
|