saeki commited on
Commit
cc15592
β€’
1 Parent(s): 73e540f
Files changed (4) hide show
  1. README.md +4 -4
  2. aet_sample/transfer.wav +0 -0
  3. app.py +3 -0
  4. setup.sh +5 -0
README.md CHANGED
@@ -1,8 +1,8 @@
1
  ---
2
- title: Aet_demo
3
- emoji: 🌍
4
- colorFrom: gray
5
- colorTo: blue
6
  sdk: gradio
7
  sdk_version: 2.8.12
8
  app_file: app.py
 
1
  ---
2
+ title: Selfremaster_aet_demo
3
+ emoji: πŸ‘€
4
+ colorFrom: blue
5
+ colorTo: green
6
  sdk: gradio
7
  sdk_version: 2.8.12
8
  app_file: app.py
aet_sample/transfer.wav ADDED
Binary file (539 kB). View file
 
app.py CHANGED
@@ -5,6 +5,7 @@ import torchaudio
5
  import numpy as np
6
  from lightning_module import SSLDualLightningModule
7
  import gradio as gr
 
8
 
9
  def normalize_waveform(wav, sr, db=-3):
10
  wav, _ = torchaudio.sox_effects.apply_effects_tensor(
@@ -72,6 +73,8 @@ def transfer(audio):
72
  return sr, wav_transfer
73
 
74
  if __name__ == "__main__":
 
 
75
  iface = gr.Interface(
76
  transfer,
77
  "audio",
 
5
  import numpy as np
6
  from lightning_module import SSLDualLightningModule
7
  import gradio as gr
8
+ import subprocess
9
 
10
  def normalize_waveform(wav, sr, db=-3):
11
  wav, _ = torchaudio.sox_effects.apply_effects_tensor(
 
73
  return sr, wav_transfer
74
 
75
  if __name__ == "__main__":
76
+ subprocess.run("./setup.sh")
77
+ subprocess.run(["apt-get", "install", "ffmpeg"])
78
  iface = gr.Interface(
79
  transfer,
80
  "audio",
setup.sh ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ echo "Downloading pretrained model for audio effect transfer ..."
2
+ curl -OL https://sarulab.sakura.ne.jp/saeki/selfremaster/pretrained/tono_aet_melspec.ckpt
3
+ mv tono_aet_melspec.ckpt aet_sample/
4
+
5
+ echo "Done!"