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.3.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

mpsenet-1.0.3-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mpsenet-1.0.3.tar.gz
  • Upload date:
  • Size: 6.6 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.3.tar.gz
Algorithm Hash digest
SHA256 1c0151a322e887f33890fb76790582916fc764081b24926e71cddbc60ef73cbc
MD5 cf5e88b80e28aea55cd121777bcdd690
BLAKE2b-256 0e4e897be10c0b85bdef57019bf86ad00524665bf979b544a64759d9ae7f9611

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mpsenet-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 6.6 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 04175fa4423b035969d3cbd45a68447b0f77b365b682d9f5ac7609bdefa4ee0f
MD5 a8a7e3f00449720a3a5428fb11c10025
BLAKE2b-256 08ceb84b66d65eabe95221e5ef153c2ea62560a525bebe91ece4ea3881962342

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