Skip to main content

Evaluate speech enhancemnt model performance

Project description

Speech Enhancement Model Evaluation

This is a python package to evaluate your speech enhancement model performance.

Installation

pip install model-evaluation-777 -i https://pypi.org/simple

PESQ and STOI Evaluation

def evaluate(ref_dir="/media/youwei/Chauncey's/VERSO_Dataset/test/clean/", deg_dir="/media/youwei/Chauncey's/VERSO_Dataset/test/noisy/", fs=16000):
    '''
    Args:
        ref_dir: reference signal directory
        deg_dir: degration signal directory
        fs: sample rate
    Returns:
        pesq_score_average, stoi_score_average
    '''
from model_evaluation import stoi_pesq

pesq_score, stoi_score = stoi_pesq.evaluate(ref_dir=ref_dir, deg_dir=deg_dir, fs=16000)

Plot SNR vs PESQ

def plot_snr_pesq(out_dir, enh_dir, ref_dir="/media/youwei/Chauncey's/VERSO_Dataset/test/clean/", deg_dir="/media/youwei/Chauncey's/VERSO_Dataset/test/noisy/", fs=16000):
    '''
    Args:
        out_dir: directory to save figure
        enh_dir: enhanced signal directory
        ref_dir: reference signal directory
        deg_dir: degration signal directory
        fs: sample rate
    Returns:
        snr vs pesq score data
    '''

The SNR vs PESQ figure will save to out_dir automatically.

from model_evaluation import stoi_pesq

data = stoi_pesq.plot_snr_pesq(out_dir=out_dir, enh_dir=enh_dir)

Plot SNR vs STOI

def plot_snr_stoi(out_dir, enh_dir, ref_dir="/media/youwei/Chauncey's/VERSO_Dataset/test/clean/", deg_dir="/media/youwei/Chauncey's/VERSO_Dataset/test/noisy/", fs=16000):
    '''
    Args:
        out_dir: directory to save figure
        enh_dir: enhanced signal directory
        ref_dir: reference signal directory
        deg_dir: degration signal directory
        fs: sample rate
    Returns:
        snr vs stoi score data
    '''

The SNR vs STOI figure will save to out_dir automatically.

from model_evaluation import stoi_pesq

data = stoi_pesq.plot_snr_stoi(out_dir=out_dir, enh_dir=enh_dir)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

model-evaluation-777-1.0.2.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

model_evaluation_777-1.0.2-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

Details for the file model-evaluation-777-1.0.2.tar.gz.

File metadata

  • Download URL: model-evaluation-777-1.0.2.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.7 CPython/3.7.4 Linux/5.4.0-77-generic

File hashes

Hashes for model-evaluation-777-1.0.2.tar.gz
Algorithm Hash digest
SHA256 39900dee529e829b69e9ce70b1d34f006c7496234cf4c33953e02256e7223895
MD5 3e8fd2eada762272f4f6246ea8fb42bb
BLAKE2b-256 fba083f677b277bb8e2e6eb4f960877a7e8e098edd10f18250be52682084468b

See more details on using hashes here.

File details

Details for the file model_evaluation_777-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: model_evaluation_777-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 4.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.7 CPython/3.7.4 Linux/5.4.0-77-generic

File hashes

Hashes for model_evaluation_777-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 beb56e9f9f3b05d7a5c9b1340b4df700f000603d10285e366661936cbd30339e
MD5 5f9cffc0098d4ac11fdbc5413c45c23a
BLAKE2b-256 e90bc51d80acc936e8e53b43bcfbf5b5a9e5b6374355e1a0a81b3e76ad3ea077

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page