Skip to main content

Python package of MP-SENet from Explicit Estimation of Magnitude and Phase Spectra in Parallel for High-Quality Speech Enhancement.

Project description

MPSENet

Python package of MP-SENet from Explicit Estimation of Magnitude and Phase Spectra in Parallel for High-Quality Speech Enhancement.

This package is inference only. To train the model, please refer to the original repository.

Installation

pip install MPSENet

Usage

import sys
import librosa
import soundfile as sf
from MPSENet import MPSENet

model = sys.argv[1]
filepath = sys.argv[2]
device = sys.argv[3] if len(sys.argv) > 3 else "cpu"

model = MPSENet.from_pretrained(model).to(device)
print(f"{model=}")

x, sr = librosa.load(filepath, sr=model.h.sampling_rate)
print(f"{x.shape=}, {sr=}")

y, sr, notation = model(x)
print(f"{y.shape=}, {sr=}, {notation=}")

sf.write("output.wav", y, sr)

The best checkpoints trained by the original author are uploaded to Hugging Face's model hub: g_best_dns and g_best_vb

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

mpsenet-1.0.1.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

mpsenet-1.0.1-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file mpsenet-1.0.1.tar.gz.

File metadata

  • Download URL: mpsenet-1.0.1.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.15

File hashes

Hashes for mpsenet-1.0.1.tar.gz
Algorithm Hash digest
SHA256 ff3eab2a6a94aa51fa54f10dc7294f8e7627649f2f42b1192f8bf84757e3985d
MD5 a1de3af56c30f826e8b69493fee2a5ae
BLAKE2b-256 9c191292fafb335a82df5d0abae704862daefb03180ddf4dd952f163f875c622

See more details on using hashes here.

File details

Details for the file mpsenet-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: mpsenet-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 6.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.15

File hashes

Hashes for mpsenet-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3fc9e567c397f1f5fc607287b60ed32b2803be2e57af1f41a82c39fa60b524c7
MD5 3879dc5b84bb062a601b47219c185a6a
BLAKE2b-256 e9ab19fbe6fbabc909d5860c9e4d0691e330d64eb20ef98a920a80c838931873

See more details on using hashes here.

Supported by

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