hieugiaosu commited on
Commit
cdc7f5d
·
1 Parent(s): e47da3a
app.py CHANGED
@@ -15,7 +15,7 @@ def load_voice(voice_path):
15
  voice, rate = torchaudio.load(voice_path)
16
 
17
  if rate != 16000:
18
- voice = torchaudio.functional.resample(voice, rate, 8000)
19
  rate = 16000
20
  voice = voice.float()
21
  return voice, rate
@@ -41,7 +41,6 @@ def seprate(mixed_voice_path, clean_voice_path, drop_down):
41
  else:
42
  mixed_voice,rate = load_voice(mixed_voice_path)
43
  mixed_voice = mixed_voice.float()
44
- mixed_voice = torch.nn.functional.normalize(mixed_voice, p=2, dim=-1)
45
  clean_voice,rate = load_voice(clean_voice_path)
46
  if clean_voice.shape[-1] < 16000*4:
47
  n = 16000*4 // clean_voice.shape[-1] + 1
 
15
  voice, rate = torchaudio.load(voice_path)
16
 
17
  if rate != 16000:
18
+ voice = torchaudio.functional.resample(voice, rate, 16000)
19
  rate = 16000
20
  voice = voice.float()
21
  return voice, rate
 
41
  else:
42
  mixed_voice,rate = load_voice(mixed_voice_path)
43
  mixed_voice = mixed_voice.float()
 
44
  clean_voice,rate = load_voice(clean_voice_path)
45
  if clean_voice.shape[-1] < 16000*4:
46
  n = 16000*4 // clean_voice.shape[-1] + 1
network/__pycache__/__init__.cpython-311.pyc ADDED
Binary file (223 Bytes). View file
 
network/models/__pycache__/TF_gridnet_with_condition.cpython-311.pyc CHANGED
Binary files a/network/models/__pycache__/TF_gridnet_with_condition.cpython-311.pyc and b/network/models/__pycache__/TF_gridnet_with_condition.cpython-311.pyc differ
 
network/models/__pycache__/__init__.cpython-311.pyc CHANGED
Binary files a/network/models/__pycache__/__init__.cpython-311.pyc and b/network/models/__pycache__/__init__.cpython-311.pyc differ
 
network/modules/__pycache__/__init__.cpython-311.pyc ADDED
Binary file (209 Bytes). View file
 
network/modules/__pycache__/attention.cpython-311.pyc ADDED
Binary file (11.6 kB). View file
 
network/modules/__pycache__/convolution_module.cpython-311.pyc ADDED
Binary file (1.62 kB). View file
 
network/modules/__pycache__/gate_module.cpython-311.pyc ADDED
Binary file (2.01 kB). View file
 
network/modules/__pycache__/input_tranformation.cpython-311.pyc ADDED
Binary file (6.76 kB). View file
 
network/modules/__pycache__/output_transformation.cpython-311.pyc ADDED
Binary file (3.13 kB). View file
 
network/utils/__pycache__/__init__.cpython-311.pyc ADDED
Binary file (314 Bytes). View file
 
network/utils/__pycache__/enum_declare.cpython-311.pyc ADDED
Binary file (579 Bytes). View file
 
network/utils/__pycache__/error_message.cpython-311.pyc ADDED
Binary file (822 Bytes). View file