nakas commited on
Commit
1f1c84d
Β·
1 Parent(s): e66b829

Update app.py

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