Skip to content

AI-Hobbyist/Mini-DDSP

 
 

Repository files navigation

Miniini DDSP Vocoders

参考项目

https://github.com/magenta/ddsp

https://github.com/YatingMusic/ddsp-singing-vocoders

https://github.com/yxlllc/pc-ddsp

https://github.com/Sleepwalking/libllsm2

一个迷你ddsp vocoder,基于pc-ddsp的修改,推理时不需要ISTFT以及复杂的滤波器设计。
原理是把原先pc-ddsp的sin加法合成部分改成了类似llsm的固定频率正弦波叠加合成,
气声合成采用一组提前按频率分割好的预制气声,合成时与模型输出的幅度张量相乘

这个项目的特征提取器支持谐波分离,运行

python harmonic_noise_extract.py --input_file /xxx 

即可进行谐波分离。

1. 安装依赖

首先下载pytroch,安装方法请参考 official website

然后运行:

pip install -r requirements.txt

2. Preprocessing

把训练数据放到如下目录: data/train/audio. 把测试数据放到如下目录: data/val/audio.
使用VR模型进行谐波分离,把分离的谐波音频放到如下目录: data/train/harmonic_audio data/val/harmonic_audio
(刚刚不是说支持谐波分离吗,为啥又要用到VR模型? 因为VR模型的谐波分离效果好于harmonic_noise_extract.py)。

运行如下命令进行预处理:

python preprocess.py --config configs/SinStack.yaml

3. Training

python train.py --config configs/SinStack.yaml

如果爆显存了,可以把vocoder.py里的Sine_Generator换成Sine_Generator_Fast。

参数里有一个相位loss, 别开,学不会()

4. Inference

python main.py --model_path /xxx --input /audio --output /audio

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%