Spaces:
Running
Running
update
Browse files
examples/mpnet_aishell/run.sh
CHANGED
@@ -8,7 +8,7 @@ sh run.sh --stage 2 --stop_stage 2 --system_version windows --file_folder_name f
|
|
8 |
--speech_dir "E:/programmer/asr_datasets/aishell/data_aishell/wav/train"
|
9 |
|
10 |
|
11 |
-
sh run.sh --stage
|
12 |
--noise_dir "/data/tianxing/HuggingDatasets/nx_noise/data/noise" \
|
13 |
--speech_dir "/data/tianxing/HuggingDatasets/aishell/data_aishell/wav/train"
|
14 |
|
|
|
8 |
--speech_dir "E:/programmer/asr_datasets/aishell/data_aishell/wav/train"
|
9 |
|
10 |
|
11 |
+
sh run.sh --stage 3 --stop_stage 3 --system_version centos --file_folder_name file_dir \
|
12 |
--noise_dir "/data/tianxing/HuggingDatasets/nx_noise/data/noise" \
|
13 |
--speech_dir "/data/tianxing/HuggingDatasets/aishell/data_aishell/wav/train"
|
14 |
|
examples/mpnet_aishell/step_3_evaluation.py
CHANGED
@@ -154,9 +154,11 @@ def main():
|
|
154 |
|
155 |
noise_audio = noise_audio.unsqueeze(dim=0)
|
156 |
clean_audio = clean_audio.unsqueeze(dim=0)
|
157 |
-
noisy_audio = noisy_audio.unsqueeze(dim=0)
|
158 |
|
159 |
# inference
|
|
|
|
|
160 |
noisy_mag, noisy_pha, noisy_com = mag_pha_stft(
|
161 |
noisy_audio, config.n_fft, config.hop_size, config.win_size, config.compress_factor
|
162 |
)
|
|
|
154 |
|
155 |
noise_audio = noise_audio.unsqueeze(dim=0)
|
156 |
clean_audio = clean_audio.unsqueeze(dim=0)
|
157 |
+
noisy_audio: torch.Tensor = noisy_audio.unsqueeze(dim=0)
|
158 |
|
159 |
# inference
|
160 |
+
clean_audio = clean_audio.to(device)
|
161 |
+
noisy_audio = noisy_audio.to(device)
|
162 |
noisy_mag, noisy_pha, noisy_com = mag_pha_stft(
|
163 |
noisy_audio, config.n_fft, config.hop_size, config.win_size, config.compress_factor
|
164 |
)
|