Spaces:
Runtime error
Runtime error
Update audio_style_transfer/models/timedomain.py
Browse files
audio_style_transfer/models/timedomain.py
CHANGED
|
@@ -10,6 +10,7 @@ import argparse
|
|
| 10 |
import glob
|
| 11 |
import os
|
| 12 |
os.environ["CUDA_VISIBLE_DEVICES"]="-1"
|
|
|
|
| 13 |
|
| 14 |
|
| 15 |
def chop(signal, hop_size=256, frame_size=512):
|
|
@@ -321,9 +322,9 @@ def run(content_fname,
|
|
| 321 |
iterations=iterations)
|
| 322 |
|
| 323 |
s = unchop(result, hop_size=hop_length, frame_size=frame_size)
|
| 324 |
-
|
| 325 |
s = utils.limiter(s)
|
| 326 |
-
|
| 327 |
|
| 328 |
|
| 329 |
def batch(content_path, style_path, output_path, model):
|
|
|
|
| 10 |
import glob
|
| 11 |
import os
|
| 12 |
os.environ["CUDA_VISIBLE_DEVICES"]="-1"
|
| 13 |
+
import soundfile as sf
|
| 14 |
|
| 15 |
|
| 16 |
def chop(signal, hop_size=256, frame_size=512):
|
|
|
|
| 322 |
iterations=iterations)
|
| 323 |
|
| 324 |
s = unchop(result, hop_size=hop_length, frame_size=frame_size)
|
| 325 |
+
sf.write(output_fname, s, sr=sr)
|
| 326 |
s = utils.limiter(s)
|
| 327 |
+
sf.write(output_fname+'.limiter.wav', s, sr=sr)
|
| 328 |
|
| 329 |
|
| 330 |
def batch(content_path, style_path, output_path, model):
|