wetdog commited on
Commit
e45b214
·
1 Parent(s): 4876346

Update description

Browse files
Files changed (1) hide show
  1. app.py +12 -3
app.py CHANGED
@@ -5,6 +5,7 @@ import numpy as np
5
  import torchaudio
6
  import librosa
7
 
 
8
  import gradio as gr
9
  from modules import load_audio, MosPredictor, denorm
10
 
@@ -26,7 +27,13 @@ model_asli = model_asli.to(device)
26
 
27
 
28
  def predict_mos(wavefile:str):
29
-
 
 
 
 
 
 
30
  print('Starting prediction...')
31
  # STFT
32
  wav = torchaudio.load(wavefile)[0]
@@ -74,8 +81,10 @@ title = """
74
  """
75
 
76
  description = """
77
- This is a demo of [MOSA-Net+](https://github.com/dhimasryan/MOSA-Net-Cross-Domain/tree/main/MOSA_Net%2B),
78
- an enhanced version of the multi-objective speech assessment model MOSA-Net, by leveraging the acoustic features from Whisper, a large-scaled weakly supervised model.
 
 
79
  MOSA-Net+ was tested in the noisy-and-enhanced track of the VoiceMOS Challenge 2023, where it obtained the top-ranked performance among nine systems [full paper](https://arxiv.org/abs/2309.12766)
80
  """
81
 
 
5
  import torchaudio
6
  import librosa
7
 
8
+
9
  import gradio as gr
10
  from modules import load_audio, MosPredictor, denorm
11
 
 
27
 
28
 
29
  def predict_mos(wavefile:str):
30
+ device = "cuda:0" if torch.cuda.is_available() else "cpu"
31
+ if device != model.device:
32
+ model.to(device)
33
+ if device != model_asli.device:
34
+ model_asli.to(device)
35
+
36
+
37
  print('Starting prediction...')
38
  # STFT
39
  wav = torchaudio.load(wavefile)[0]
 
81
  """
82
 
83
  description = """
84
+ This is a demo of [MOSA-Net+](https://github.com/dhimasryan/MOSA-Net-Cross-Domain/tree/main/MOSA_Net%2B), an improved version of MOSA-
85
+ NET that predicts human-based speech quality and intelligibility. MOSA-Net+ uses Whisper to generate cross-domain features. The model employs a CNN-
86
+ BLSTM architecture with an attention mechanism and is trained using a multi-task learning approach to predict subjective listening test
87
+ scores.
88
  MOSA-Net+ was tested in the noisy-and-enhanced track of the VoiceMOS Challenge 2023, where it obtained the top-ranked performance among nine systems [full paper](https://arxiv.org/abs/2309.12766)
89
  """
90