Spaces:
Sleeping
Sleeping
Add README.md
Browse files
README.md
ADDED
@@ -0,0 +1,144 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# SingingSDS: Role-Playing Singing Spoken Dialogue System
|
2 |
+
|
3 |
+
A role-playing singing dialogue system that converts speech input into character-based singing output.
|
4 |
+
|
5 |
+
## Installation
|
6 |
+
|
7 |
+
### Requirements
|
8 |
+
|
9 |
+
- Python 3.11+
|
10 |
+
- CUDA (optional, for GPU acceleration)
|
11 |
+
|
12 |
+
### Install Dependencies
|
13 |
+
|
14 |
+
#### Option 1: Using Conda (Recommended)
|
15 |
+
|
16 |
+
```bash
|
17 |
+
conda create -n singingsds python=3.11
|
18 |
+
|
19 |
+
conda activate singingsds
|
20 |
+
conda install pytorch torchvision torchaudio pytorch-cuda=11.8 -c pytorch -c nvidia
|
21 |
+
pip install -r requirements.txt
|
22 |
+
```
|
23 |
+
|
24 |
+
#### Option 2: Using pip only
|
25 |
+
|
26 |
+
```bash
|
27 |
+
pip install -r requirements.txt
|
28 |
+
```
|
29 |
+
|
30 |
+
#### Option 3: Using pip with virtual environment
|
31 |
+
|
32 |
+
```bash
|
33 |
+
python -m venv singingsds_env
|
34 |
+
|
35 |
+
# On Windows:
|
36 |
+
singingsds_env\Scripts\activate
|
37 |
+
# On macOS/Linux:
|
38 |
+
source singingsds_env/bin/activate
|
39 |
+
|
40 |
+
pip install -r requirements.txt
|
41 |
+
```
|
42 |
+
|
43 |
+
## Usage
|
44 |
+
|
45 |
+
### Command Line Interface (CLI)
|
46 |
+
|
47 |
+
#### Example Usage
|
48 |
+
|
49 |
+
```bash
|
50 |
+
python cli.py --query_audio data/query/hello.wav --config_path config/cli/yaoyin_default.yaml --output_audio outputs/yaoyin_hello.wav
|
51 |
+
```
|
52 |
+
|
53 |
+
#### Parameter Description
|
54 |
+
|
55 |
+
- `--query_audio`: Input audio file path (required)
|
56 |
+
- `--config_path`: Configuration file path (default: config/cli/yaoyin_default.yaml)
|
57 |
+
- `--output_audio`: Output audio file path (required)
|
58 |
+
|
59 |
+
|
60 |
+
### Web Interface (Gradio)
|
61 |
+
|
62 |
+
Start the web interface:
|
63 |
+
|
64 |
+
```bash
|
65 |
+
python app.py
|
66 |
+
```
|
67 |
+
|
68 |
+
Then visit the displayed address in your browser to use the graphical interface.
|
69 |
+
|
70 |
+
## Configuration
|
71 |
+
|
72 |
+
### Character Configuration
|
73 |
+
|
74 |
+
The system supports multiple preset characters:
|
75 |
+
|
76 |
+
- **Yaoyin (ι₯ι³)**: Default timbre is `timbre2`
|
77 |
+
- **Limei (δΈ½ζ’
)**: Default timbre is `timbre1`
|
78 |
+
|
79 |
+
### Model Configuration
|
80 |
+
|
81 |
+
#### ASR Models
|
82 |
+
- `openai/whisper-large-v3-turbo`
|
83 |
+
- `openai/whisper-large-v3`
|
84 |
+
- `openai/whisper-medium`
|
85 |
+
- `sanchit-gandhi/whisper-small-dv`
|
86 |
+
- `facebook/wav2vec2-base-960h`
|
87 |
+
|
88 |
+
#### LLM Models
|
89 |
+
- `google/gemma-2-2b`
|
90 |
+
- `MiniMaxAI/MiniMax-M1-80k`
|
91 |
+
- `meta-llama/Llama-3.2-3B-Instruct`
|
92 |
+
|
93 |
+
#### SVS Models
|
94 |
+
- `espnet/mixdata_svs_visinger2_spkemb_lang_pretrained` (Bilingual)
|
95 |
+
- `espnet/aceopencpop_svs_visinger2_40singer_pretrain` (Chinese)
|
96 |
+
|
97 |
+
## Project Structure
|
98 |
+
|
99 |
+
```
|
100 |
+
SingingSDS/
|
101 |
+
βββ cli.py # Command line interface
|
102 |
+
βββ interface.py # Gradio interface
|
103 |
+
βββ pipeline.py # Core processing pipeline
|
104 |
+
βββ app.py # Web application entry
|
105 |
+
βββ requirements.txt # Python dependencies
|
106 |
+
βββ config/ # Configuration files
|
107 |
+
β βββ cli/ # CLI-specific configuration
|
108 |
+
β βββ interface/ # Interface-specific configuration
|
109 |
+
βββ modules/ # Core modules
|
110 |
+
β βββ asr.py # Speech recognition module
|
111 |
+
β βββ llm.py # Large language model module
|
112 |
+
β βββ melody.py # Melody control module
|
113 |
+
β βββ svs/ # Singing voice synthesis modules
|
114 |
+
β β βββ base.py # Base SVS class
|
115 |
+
β β βββ espnet.py # ESPnet SVS implementation
|
116 |
+
β β βββ registry.py # SVS model registry
|
117 |
+
β β βββ __init__.py # SVS module initialization
|
118 |
+
β βββ utils/ # Utility modules
|
119 |
+
β βββ g2p.py # Grapheme-to-phoneme conversion
|
120 |
+
β βββ text_normalize.py # Text normalization
|
121 |
+
β βββ resources/ # Utility resources
|
122 |
+
βββ characters/ # Character definitions
|
123 |
+
β βββ base.py # Base character class
|
124 |
+
β βββ Limei.py # Limei character definition
|
125 |
+
β βββ Yaoyin.py # Yaoyin character definition
|
126 |
+
β βββ __init__.py # Character module initialization
|
127 |
+
βββ evaluation/ # Evaluation modules
|
128 |
+
β βββ svs_eval.py # SVS evaluation metrics
|
129 |
+
βββ data/ # Data directory
|
130 |
+
β βββ kising/ # Kising dataset
|
131 |
+
β βββ touhou/ # Touhou dataset
|
132 |
+
βββ resources/ # Project resources
|
133 |
+
βββ data_handlers/ # Data handling utilities
|
134 |
+
βββ assets/ # Static assets
|
135 |
+
βββ tests/ # Test files
|
136 |
+
```
|
137 |
+
|
138 |
+
## Contributing
|
139 |
+
|
140 |
+
Issues and Pull Requests are welcome!
|
141 |
+
|
142 |
+
## License
|
143 |
+
|
144 |
+
|