yongyizang commited on
Commit
ae66d47
Β·
verified Β·
1 Parent(s): 6485dde

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +83 -3
README.md CHANGED
@@ -1,3 +1,83 @@
1
- ---
2
- license: apache-2.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ ---
4
+ # Music Restoration with UFormer
5
+
6
+ These checkpoints accompany the Music Source Restoration paper. (arxiv link coming soon)
7
+
8
+ A simple audio restoration toolkit based on UFormer, designed for music source restoration across different instrument groups. Supports long-file inference via overlap-add and multiple checkpoints for specialized restoration (e.g., guitars, vocals, synth).
9
+
10
+ ## Directory Structure
11
+
12
+ ```bash
13
+ music-restoration/ # Root of the repository
14
+ β”œβ”€β”€ model.py # UFormerConfig & UFormer definitions
15
+ β”œβ”€β”€ inference.py # Inference entry-point (CLI, HF API, Gradio)
16
+ β”œβ”€β”€ requirements.txt # Dependencies: torch, soundfile, gradio, huggingface_hub
17
+ β”œβ”€β”€ .gitattributes # LFS tracking for checkpoints
18
+ β”œβ”€β”€ README.md
19
+ └── checkpoints/ # Pretrained weights
20
+ β”œβ”€β”€ acoustic_guitar.pth
21
+ β”œβ”€β”€ bass.pth
22
+ β”œβ”€β”€ electric_guitar.pth
23
+ β”œβ”€β”€ guitars.pth
24
+ β”œβ”€β”€ keyboards.pth
25
+ β”œβ”€β”€ orchestra.pth
26
+ β”œβ”€β”€ rhythm_section.pth
27
+ β”œβ”€β”€ synth.pth
28
+ └── vocals.pth
29
+ ```
30
+
31
+ ## Installation
32
+
33
+ ```bash
34
+ pip install -r requirements.txt
35
+ ```
36
+
37
+ ## Usage
38
+
39
+ ### Command-Line Interface
40
+
41
+ ```bash
42
+ python inference.py \
43
+ --input noisy.wav \
44
+ --output restored.wav \
45
+ --checkpoint guitars
46
+ ```
47
+
48
+ ### Hugging Face Inference API
49
+
50
+ Send a JSON payload:
51
+
52
+ ```json
53
+ {
54
+ "inputs": <raw WAV bytes>,
55
+ "parameters": { "checkpoint": "vocals" }
56
+ }
57
+ ```
58
+
59
+ ### Gradio Demo (Spaces)
60
+
61
+ ```bash
62
+ python inference.py --serve
63
+ ```
64
+
65
+ Open the provided local URL to upload audio and select a checkpoint.
66
+
67
+ ## Checkpoints
68
+
69
+ Available models for different instrument groups:
70
+
71
+ * `acoustic_guitar`
72
+ * `bass`
73
+ * `electric_guitar`
74
+ * `guitars`
75
+ * `keyboards`
76
+ * `orchestra`
77
+ * `rhythm_section`
78
+ * `synth`
79
+ * `vocals`
80
+
81
+ ## License
82
+
83
+ Apache 2.0 License. See [LICENSE](LICENSE) for details.