Skip to main content

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

Metadata

Release files for MPSENet 1.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for MPSENet 1.0.3
File Size Uploaded
mpsenet-1.0.3.tar.gz 6.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for MPSENet 1.0.3
File Interpreter ABI Platform
mpsenet-1.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 13.2 kB

Release files / mpsenet-1.0.3.tar.gz

Download URL mpsenet-1.0.3.tar.gz
Size 6.6 kB
Tags Source
SHA-256 checksum
How to use checksums
1c0151a322e887f33890fb76790582916fc764081b24926e71cddbc60ef73cbc
BLAKE2b-256 checksum
How to use checksums
0e4e897be10c0b85bdef57019bf86ad00524665bf979b544a64759d9ae7f9611
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.15

Release files / mpsenet-1.0.3-py3-none-any.whl

Download URL mpsenet-1.0.3-py3-none-any.whl
Size 6.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
04175fa4423b035969d3cbd45a68447b0f77b365b682d9f5ac7609bdefa4ee0f
BLAKE2b-256 checksum
How to use checksums
08ceb84b66d65eabe95221e5ef153c2ea62560a525bebe91ece4ea3881962342
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.15

Release history Release notifications | RSS feed

This release

1.0.3 This release

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page