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.2.tar.gz
(6.5 kB
view details)
Built Distribution
File details
Details for the file mpsenet-1.0.2.tar.gz
.
File metadata
- Download URL: mpsenet-1.0.2.tar.gz
- Upload date:
- Size: 6.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 023f4a511d4d2309748735ec1d088e4304bdaba5a909a3e52a484cbb56541234 |
|
MD5 | fd44f5e510718fc5a57c9261aa5ceed8 |
|
BLAKE2b-256 | 4f387d4bfd63bffb24e41c6d3ad0da084d97f96424f47b44252226c16512dfc8 |
File details
Details for the file mpsenet-1.0.2-py3-none-any.whl
.
File metadata
- Download URL: mpsenet-1.0.2-py3-none-any.whl
- Upload date:
- Size: 6.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c33dc1f8602e1f9025ea1e6daee418d3f872a28e9cd7ad8a6b0a477fe2341da6 |
|
MD5 | 6824313908f3de5abc983d97254750a2 |
|
BLAKE2b-256 | d496fa3b778654840ee5c674be2ae503d4460c48df622b2efbcc332990309e03 |