Audio-WestlakeU / FullSubNet

PyTorch implementation of "FullSubNet: A Full-Band and Sub-Band Fusion Model for Real-Time Single-Channel Speech Enhancement."
https://fullsubnet.readthedocs.io/en/latest/
MIT License
553 stars 157 forks source link

How make inference on a single WAV file using pre-train model? #26

Closed faranaziz closed 3 years ago

faranaziz commented 3 years ago

No can find example for a single file. Thanks you.

sjscotti commented 3 years ago

Hi It has been awhile since I used it, but after you download the repo and install it as mentioned in https://github.com/haoxiangsnr/FullSubNet/blob/main/docs/prerequisites.md, you just follow the instructions onhttps://github.com/haoxiangsnr/FullSubNet/blob/main/docs/getting_started.md for Inference and Applying a Pre-trained Model .

as I remember you 1) download the checkpoint model fullsubnet_best_model_58epochs.tar from https://github.com/haoxiangsnr/FullSubNet/releases and put it in a folder you create (I'll refer to the path to this folder as <model>) 2) create a folder for your wave file (I'll refer to the path to this folder as <input>) and put your wave file in it 3) add the <input> path to the \recipes\dns_interspeech_2020\fullsubnet\inference.toml file as described in step 1 under Inference mentioned above

...
[dataset.args]
dataset_dir_list = [
    "<input>"
]
...

4) create a folder for your output (I'll refer to the path to this folder as <output>) 5) follow step 2 under Inference mentioned above

cd FullSubNet/recipes/dns_interspeech_2020

# One GPU is used by default
python inference.py \
  -C fullsubnet/inference.toml \
  -M <model> \
  -O <output>

Your denoised file will be in <output>

Good Luck!

haoxiangsnr commented 3 years ago

Hi It has been awhile since I used it, but after you download the repo and install it as mentioned in https://github.com/haoxiangsnr/FullSubNet/blob/main/docs/prerequisites.md, you just follow the instructions onhttps://github.com/haoxiangsnr/FullSubNet/blob/main/docs/getting_started.md for Inference and Applying a Pre-trained Model .

as I remember you

  1. download the checkpoint model fullsubnet_best_model_58epochs.tar from https://github.com/haoxiangsnr/FullSubNet/releases and put it in a folder you create (I'll refer to the path to this folder as <model>)
  2. create a folder for your wave file (I'll refer to the path to this folder as <input>) and put your wave file in it
  3. add the <input> path to the \recipes\dns_interspeech_2020\fullsubnet\inference.toml file as described in step 1 under Inference mentioned above
...
[dataset.args]
dataset_dir_list = [
    "<input>"
]
...
  1. create a folder for your output (I'll refer to the path to this folder as <output>)
  2. follow step 2 under Inference mentioned above
cd FullSubNet/recipes/dns_interspeech_2020

# One GPU is used by default
python inference.py \
  -C fullsubnet/inference.toml \
  -M <model> \
  -O <output>

Your denoised file will be in <output>

Good Luck!

@sjscotti Great, thanks for your attention and help.

haoxiangsnr commented 3 years ago

No can find example for a single file. Thanks you.

Hi,

Thanks for your attention.

@sjscotti has given you a lot of details about how to enhance one file.

If you have any other questions, please feel free to contact me.