Spaces:
Runtime error
Runtime error
ramkamal2000
commited on
Commit
·
322eff5
1
Parent(s):
7315a11
import subprocess
Browse files
app.py
CHANGED
@@ -37,6 +37,8 @@ import librosa
|
|
37 |
|
38 |
from scipy.io.wavfile import write, read
|
39 |
|
|
|
|
|
40 |
'''
|
41 |
from google.colab import drive
|
42 |
drive.mount('/content/drive')
|
@@ -126,9 +128,14 @@ def voice_conversion(ta, ra, da):
|
|
126 |
write(reference_audio, ra[0], ra[1])
|
127 |
write(driving_audio, da[0], da[1])
|
128 |
|
129 |
-
!ffmpeg-normalize $target_audio -nt rms -t=-27 -o $target_audio -ar 16000 -f
|
130 |
-
!ffmpeg-normalize $reference_audio -nt rms -t=-27 -o $reference_audio -ar 16000 -f
|
131 |
-
!ffmpeg-normalize $driving_audio -nt rms -t=-27 -o $driving_audio -ar 16000 -f
|
|
|
|
|
|
|
|
|
|
|
132 |
|
133 |
# ta_ = read(target_audio)
|
134 |
|
|
|
37 |
|
38 |
from scipy.io.wavfile import write, read
|
39 |
|
40 |
+
import subprocess
|
41 |
+
|
42 |
'''
|
43 |
from google.colab import drive
|
44 |
drive.mount('/content/drive')
|
|
|
128 |
write(reference_audio, ra[0], ra[1])
|
129 |
write(driving_audio, da[0], da[1])
|
130 |
|
131 |
+
# !ffmpeg-normalize $target_audio -nt rms -t=-27 -o $target_audio -ar 16000 -f
|
132 |
+
# !ffmpeg-normalize $reference_audio -nt rms -t=-27 -o $reference_audio -ar 16000 -f
|
133 |
+
# !ffmpeg-normalize $driving_audio -nt rms -t=-27 -o $driving_audio -ar 16000 -f
|
134 |
+
|
135 |
+
files = [target_audio, reference_audio, driving_audio]
|
136 |
+
|
137 |
+
for file in files:
|
138 |
+
subprocess.run(["ffmpeg-normalize", file, "-nt", "rms", "-t=-27", "-o", file, "-ar", "16000", "-f"])
|
139 |
|
140 |
# ta_ = read(target_audio)
|
141 |
|