Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -6,19 +6,12 @@ def audioStyleTransfer(content,style):
|
|
| 6 |
print (style,content)
|
| 7 |
output = "/tmp/outputfile.wav"
|
| 8 |
sr = librosa.get_samplerate(content)
|
| 9 |
-
timedomain.run( style_fname=style,
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
n_filters=4096, # 512 - 4096. Higher is better quality but is slower.
|
| 16 |
-
hop_length=256, # 256 to n_fft / 2. The lower this value, the better the temporal resolution.
|
| 17 |
-
alpha=0.0005, # 0.0001 to 0.01. The higher this value, the more of the original "content" bleeds
|
| 18 |
-
k_w=4, # 3 to 5. The higher this value, the more complex the patterns it can synthesize.
|
| 19 |
-
iterations=300, # 100 to 1000. Higher is better quality but is slower.
|
| 20 |
-
stride=1, # 1 to 3. Lower is better quality but is slower.
|
| 21 |
-
sr=sr)
|
| 22 |
print ("output is " ,output)
|
| 23 |
return output
|
| 24 |
|
|
|
|
| 6 |
print (style,content)
|
| 7 |
output = "/tmp/outputfile.wav"
|
| 8 |
sr = librosa.get_samplerate(content)
|
| 9 |
+
timedomain.run( style_fname=style, content_fname=content ,output_fname=output, n_fft=4096,
|
| 10 |
+
n_filters=4096,
|
| 11 |
+
hop_length=512,
|
| 12 |
+
alpha=0.05,
|
| 13 |
+
k_w=4, # 1 to 3. Lower is better quality but is slower.
|
| 14 |
+
sr=sr)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
print ("output is " ,output)
|
| 16 |
return output
|
| 17 |
|