patrickvonplaten
commited on
Commit
·
4e1ae22
1
Parent(s):
271afe2
Update README.md
Browse files
README.md
CHANGED
@@ -11,7 +11,14 @@ pipeline = pipeline.to("cuda")
|
|
11 |
|
12 |
audios = pipeline(audio_length_in_s=4.0).audios
|
13 |
|
14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
```
|
16 |
|
17 |
## FP16
|
@@ -30,5 +37,12 @@ pipeline = pipeline.to("cuda")
|
|
30 |
|
31 |
audios = pipeline(audio_length_in_s=4.0).audios
|
32 |
|
33 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
```
|
|
|
11 |
|
12 |
audios = pipeline(audio_length_in_s=4.0).audios
|
13 |
|
14 |
+
# To save locally
|
15 |
+
for audio in audios:
|
16 |
+
scipy.io.wavfile.write("maestro_test.wav", pipe.unet.sample_rate, audio.transpose())
|
17 |
+
|
18 |
+
# To dislay in google colab
|
19 |
+
import IPython.display as ipd
|
20 |
+
for audio in audios:
|
21 |
+
display(ipd.Audio(audio[0, 1:], rate=pipe.unet.sample_rate))
|
22 |
```
|
23 |
|
24 |
## FP16
|
|
|
37 |
|
38 |
audios = pipeline(audio_length_in_s=4.0).audios
|
39 |
|
40 |
+
# To save locally
|
41 |
+
for audio in audios:
|
42 |
+
scipy.io.wavfile.write("maestro_test.wav", pipe.unet.sample_rate, audio.transpose())
|
43 |
+
|
44 |
+
# To dislay in google colab
|
45 |
+
import IPython.display as ipd
|
46 |
+
for audio in audios:
|
47 |
+
display(ipd.Audio(audio[0, 1:], rate=pipe.unet.sample_rate))
|
48 |
```
|