Spaces:
Running
on
Zero
Running
on
Zero
File size: 1,237 Bytes
5865c93 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
---
title: MP-SENet
short_description: MP-SENet is a speech enhancement model.
emoji: 🔊
colorFrom: green
colorTo: green
sdk: gradio
sdk_version: 5.4.0
app_file: app.py
pinned: false
license: mit
fullWidth: true
---
# MP-SENet Gradio App
A Gradio app for [MP-SENet](https://github.com/yxlu-0102/MP-SENet) with ZeroGPU support.
Most of the code and the model weights are from the original repository (MIT licensed), with some modifications to make it work with Gradio and ZeroGPU and handle longer audio files.
## API Usage
You can also use the model through the Gradio API. Here's an example:
```python
from gradio_client import Client, handle_file
client = Client("JacobLinCool/MP-SENet")
task_id, _ = client.predict(
input=handle_file("path/to/audio.wav"),
plot=False,
api_name="/preprocess",
)
output, _, _, _ = client.predict(task_id=task_id, api_name="/run")
print(output) # The path to the output file
```
The default `/run` endpoint will try to acquire GPU for 60 seconds. It should be sufficient for audio files up to 20 minutes.
If you are working with audio files longer than 20 minutes, you can use the `/run2x` or `/run4x` endpoints, which will try to acquire GPU for 120 and 240 seconds respectively.
|