Fix usage code blocks.
Browse files
README.md
CHANGED
@@ -88,7 +88,7 @@ synthesiser = pipeline("text-to-speech", "suno/bark")
|
|
88 |
|
89 |
speech = synthesiser("Hello, my dog is cooler than you!", forward_params={"do_sample": True})
|
90 |
|
91 |
-
scipy.io.wavfile.write("bark_out.wav", rate=speech["sampling_rate"], data=speech["audio"])
|
92 |
```
|
93 |
|
94 |
3. Run inference via the Transformers modelling code. You can use the processor + generate code to convert text into a mono 24 kHz speech waveform for more fine-grained control.
|
@@ -121,7 +121,7 @@ Or save them as a `.wav` file using a third-party library, e.g. `scipy`:
|
|
121 |
```python
|
122 |
import scipy
|
123 |
|
124 |
-
sampling_rate = model.
|
125 |
scipy.io.wavfile.write("bark_out.wav", rate=sampling_rate, data=speech_values.cpu().numpy().squeeze())
|
126 |
```
|
127 |
|
|
|
88 |
|
89 |
speech = synthesiser("Hello, my dog is cooler than you!", forward_params={"do_sample": True})
|
90 |
|
91 |
+
scipy.io.wavfile.write("bark_out.wav", rate=speech["sampling_rate"], data=speech["audio"].squeeze())
|
92 |
```
|
93 |
|
94 |
3. Run inference via the Transformers modelling code. You can use the processor + generate code to convert text into a mono 24 kHz speech waveform for more fine-grained control.
|
|
|
121 |
```python
|
122 |
import scipy
|
123 |
|
124 |
+
sampling_rate = model.generation_config.sample_rate
|
125 |
scipy.io.wavfile.write("bark_out.wav", rate=sampling_rate, data=speech_values.cpu().numpy().squeeze())
|
126 |
```
|
127 |
|