From 8416d2f12182d0f7581186dcffff3a766dc5a772 Mon Sep 17 00:00:00 2001 From: rajen-bhatt-gmail-com <167136569+rajen-bhatt-gmail-com@users.noreply.github.com> Date: Thu, 7 Nov 2024 09:35:46 -0500 Subject: [PATCH 1/5] Update README.md Few instructions on creating the virtual environment and activating the saem. --- DNSMOS/README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/DNSMOS/README.md b/DNSMOS/README.md index 5b874478143..35f57daba3c 100644 --- a/DNSMOS/README.md +++ b/DNSMOS/README.md @@ -2,6 +2,12 @@ Human subjective evaluation is the ”gold standard” to evaluate speech quality optimized for human perception. Perceptual objective metrics serve as a proxy for subjective scores. The conventional and widely used metrics require a reference clean speech signal, which is unavailable in real recordings. The no-reference approaches correlate poorly with human ratings and are not widely adopted in the research community. One of the biggest use cases of these perceptual objective metrics is to evaluate noise suppression algorithms. DNSMOS generalizes well in challenging test conditions with a high correlation to human ratings in stack ranking noise suppression methods. More details can be found in [DNSMOS paper](https://arxiv.org/pdf/2010.15258.pdf). +## Set-up instructions (Tested for MAC only, adapt for Windows) +1. Create the virtual environment. You can create anywhere you want, but for the simplicity purpose, create one inside _DNS-Channelge_ directory. +2. `python -m venv dns`, this will create a virtual environment _dns_ by creating a _dns_ directory inside _DNS-Challenge_. +3. Check the version of _pip_ inside the virtual environment and update if necessary. `python -m pip --version`, if needed update pip version: `python -m pip install --upgrade pip`. At the time of writing this, it was pip 24.3.1. +4. Enter the virtual environment: `source dns/bin/activate` + ## Evaluation methodology: Use the **dnsmos_local.py** script. 1. To compute a personalized MOS score (where interfering speaker is penalized) provide the '-p' argument From 87ae60b238d8aaf35a962696fccb231917f46bb5 Mon Sep 17 00:00:00 2001 From: rajen-bhatt-gmail-com <167136569+rajen-bhatt-gmail-com@users.noreply.github.com> Date: Thu, 7 Nov 2024 09:36:35 -0500 Subject: [PATCH 2/5] Update requirements.txt tqdm is a required module and has been added in the requirements.txt --- requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements.txt b/requirements.txt index d3dc5fa2536..fbed27e7a9a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,3 +9,4 @@ onnxruntime==1.13.1 torch==1.10.0 torchvision==0.11.1 torchaudio==0.10.0 +tqdm From 71f519e157432d1e0a210d2b12a5a2a645871282 Mon Sep 17 00:00:00 2001 From: rajen-bhatt-gmail-com <167136569+rajen-bhatt-gmail-com@users.noreply.github.com> Date: Thu, 7 Nov 2024 09:39:40 -0500 Subject: [PATCH 3/5] Added install-reqs.py The file scans the requirements.txt file and tries to install all the packages and then prints the packages that could not be installed, otherwise prints the success. --- DNSMOS/install-reqs.py | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 DNSMOS/install-reqs.py diff --git a/DNSMOS/install-reqs.py b/DNSMOS/install-reqs.py new file mode 100644 index 00000000000..d0298e2f5a7 --- /dev/null +++ b/DNSMOS/install-reqs.py @@ -0,0 +1,27 @@ +import subprocess +# The script reads the requirements.txt file and installs all the packages listed in it using pip. +# If any package fails to install, it will print an error message and continue with the next package. +# Open the requirements.txt file and read all lines +with open('requirements.txt', 'r') as file: + packages = file.readlines() + +failed_packages = [] # List to store the packages that failed to install +# Iterate over each package and install it using pip +for package in packages: + package = package.strip() # Remove any leading/trailing whitespace + if package: # Check if the package name is not empty + try: + subprocess.run(['pip', 'install', package], check=True) # Run the command and check for errors, if any error occurs, it will raise an exception + except subprocess.CalledProcessError as e: + print(f"Error while installing {package}: {e}") + failed_packages.append(package) # Add the package to the failed_packages list +# Print the list of packages that failed to install +if failed_packages: + # Print the list of packages that failed to install + # Print dashed lines to separate the failed packages from the success message + print("-" * 50) + print("Failed to install the following packages:") + for package in failed_packages: + print(package) +else: + print("All packages installed successfully!") # Print a success message if all packages were installed successfully \ No newline at end of file From 0f20e6f23a0af35ad954818848d17031e19a9491 Mon Sep 17 00:00:00 2001 From: rajen-bhatt-gmail-com <167136569+rajen-bhatt-gmail-com@users.noreply.github.com> Date: Thu, 7 Nov 2024 09:48:15 -0500 Subject: [PATCH 4/5] Update README.md install-reqs.py related instructions. --- DNSMOS/README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/DNSMOS/README.md b/DNSMOS/README.md index 35f57daba3c..cd8e0b49dbc 100644 --- a/DNSMOS/README.md +++ b/DNSMOS/README.md @@ -7,6 +7,9 @@ Human subjective evaluation is the ”gold standard” to evaluate speech qualit 2. `python -m venv dns`, this will create a virtual environment _dns_ by creating a _dns_ directory inside _DNS-Challenge_. 3. Check the version of _pip_ inside the virtual environment and update if necessary. `python -m pip --version`, if needed update pip version: `python -m pip install --upgrade pip`. At the time of writing this, it was pip 24.3.1. 4. Enter the virtual environment: `source dns/bin/activate` +5. Go to DNSMOS directory: `cd DNSMOS` +6. run: `python install-reqs.py`. This will scan the requirements.txt file and then try to insall all the requirements. If all the requirements are installed successfully, it will print _all packages installed successfully_, otherwise it will print the list of packages failed to install. +7. If everything installed successfully, follow the next steps. ## Evaluation methodology: Use the **dnsmos_local.py** script. From 7299f341e668adf6f0a7cb6b9cdd4d76faaae5b3 Mon Sep 17 00:00:00 2001 From: rajen-bhatt-gmail-com Date: Thu, 7 Nov 2024 13:28:51 -0500 Subject: [PATCH 5/5] Update README.md Fixed the order of steps --- DNSMOS/README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/DNSMOS/README.md b/DNSMOS/README.md index cd8e0b49dbc..8f30a4ebc8b 100644 --- a/DNSMOS/README.md +++ b/DNSMOS/README.md @@ -5,8 +5,9 @@ Human subjective evaluation is the ”gold standard” to evaluate speech qualit ## Set-up instructions (Tested for MAC only, adapt for Windows) 1. Create the virtual environment. You can create anywhere you want, but for the simplicity purpose, create one inside _DNS-Channelge_ directory. 2. `python -m venv dns`, this will create a virtual environment _dns_ by creating a _dns_ directory inside _DNS-Challenge_. -3. Check the version of _pip_ inside the virtual environment and update if necessary. `python -m pip --version`, if needed update pip version: `python -m pip install --upgrade pip`. At the time of writing this, it was pip 24.3.1. -4. Enter the virtual environment: `source dns/bin/activate` +3. Enter the virtual environment: `source dns/bin/activate` +4. Check the version of _pip_ inside the virtual environment and update if necessary. `python -m pip --version`, if needed update pip version: `python -m pip install --upgrade pip`. At the time of writing this, it was pip 24.3.1. + 5. Go to DNSMOS directory: `cd DNSMOS` 6. run: `python install-reqs.py`. This will scan the requirements.txt file and then try to insall all the requirements. If all the requirements are installed successfully, it will print _all packages installed successfully_, otherwise it will print the list of packages failed to install. 7. If everything installed successfully, follow the next steps.