Views
No views yet
Learning Rate: 0.0001
Adam β1: 0.8
Adam β2: 0.99
LR Decay: 0.9999996
Gradient Clip Norm: 5001{
2 "upsample_rates": [4,4,2,2,2,2],
3 "upsample_kernel_sizes": [8,8,4,4,4,4],
4 "upsample_initial_channel": 1536,
5 "resblock_kernel_sizes": [3,7,11],
6 "resblock_dilation_sizes": [[1,3,5], [1,3,5], [1,3,5]],
7
8 "use_tanh_at_final": false,
9 "use_bias_at_final": false,
10
11 "activation": "snakebeta",
12 "snake_logscale": true,
13}1{
2 "use_cqtd_instead_of_mrd": true,
3 "cqtd_filters": 128,
4 "cqtd_max_filters": 1024,
5 "cqtd_filters_scale": 1,
6 "cqtd_dilations": [1, 2, 4],
7 "cqtd_hop_lengths": [512, 256, 256],
8 "cqtd_n_octaves": [9, 9, 9],
9 "cqtd_bins_per_octaves": [24, 36, 48],
10
11 "mpd_reshapes": [2, 3, 5, 7, 11],
12 "use_spectral_norm": false,
13 "discriminator_channel_mult": 1,
14}1{
2 "sampling_rate": 24000,
3 "n_fft": 1024,
4 "num_mels": 100,
5 "hop_size": 256,
6 "win_size": 1024,
7 "fmin": 0,
8 "fmax": null,
9
10 "segment_size": 65536,
11 "use_multiscale_melloss": true,
12 "lambda_melloss": 15
13}1cd bigvgan_standalone
2
3# 单文件重构 (Single file reconstruction)
4python bigvgan_api.py --config_dir exp/bigvgan_teochew_24khz --checkpoint g_05130000 \
5 --input audio.wav --output out.wav
6
7# 批量处理 (Batch processing)
8python bigvgan_api.py --config_dir exp/bigvgan_teochew_24khz --checkpoint g_05130000 \
9 --input a.wav b.wav c.wav --output_dir results/
10
11# 从梅尔频谱重构 (Reconstruct from mel-spectrogram)
12python bigvgan_api.py --config_dir exp/bigvgan_teochew_24khz --checkpoint g_05130000 \
13 --mel mel.npy --output out.wav
14
15# 从文件列表处理 (Process from file list)
16python bigvgan_api.py --config_dir exp/bigvgan_teochew_24khz --checkpoint g_05130000 \
17 --file_list test.txt --dataset_dir /data/ --output_dir results/ --max_samples 100
18
19# CUDA kernel 加速 (CUDA kernel acceleration)
20python bigvgan_api.py --config_dir exp/bigvgan_teochew_24khz --checkpoint g_05130000 \
21 --input audio.wav --output out.wav --use_cuda_kernel1from bigvgan_standalone.bigvgan_api import BigVGANVocoder
2
3# 加载 vocoder(config_dir 包含 config.json)
4# Load vocoder (config_dir contains config.json)
5vocoder = BigVGANVocoder(
6 config_or_dir="exp/bigvgan_teochew_24khz",
7 checkpoint_path="g_05130000" # 文件名,自动拼接目录 / filename, auto-concatenated with dir
8)
9
10# 单文件重构 (Single file reconstruction)
11vocoder.reconstruct_wav("input.wav", "output.wav")
12
13# 批量重构 (Batch reconstruction)
14vocoder.reconstruct_wav_batch(
15 ["a.wav", "b.wav"],
16 output_dir="results/"
17)
18
19# 从文件列表 (From file list)
20vocoder.reconstruct_from_file_list(
21 "filelists/teochew/test.txt",
22 output_dir="results/",
23 dataset_dir="/data/teochew_extla/",
24 max_samples=100
25)
26
27# 从梅尔频谱文件 (From mel-spectrogram file)
28vocoder.mel_file_to_wav("mel.npy", "output.wav")
29
30# 底层 Tensor 级别操作 (Low-level Tensor operations)
31audio = vocoder.load_wav("input.wav") # auto-resample + normalize
32mel = vocoder.compute_mel(audio) # [1, 80, T]
33recon = vocoder.mel_to_wav(mel) # int16 np array1import gradio as gr
2from bigvgan_standalone.bigvgan_api import BigVGANVocoder
3
4vocoder = BigVGANVocoder("exp/bigvgan_teochew_24khz", "g_05130000")
5
6demo = gr.Interface(
7 fn=vocoder.gradio_reconstruct,
8 inputs=gr.Audio(type="numpy"),
9 outputs=gr.Audio(type="numpy"),
10 title="BigVGAN Vocoder Demo"
11)
12demo.launch()| Checkpoint | SIG | BAK | OVRL | Notes |
|---|---|---|---|---|
| g_05130000 | 3.4614 | 3.8736 | 3.1038 | Best |
| g_05385000 | 3.4690 | 3.8536 | 3.0995 | - |
| g_05215000 | 3.4671 | 3.8522 | 3.0964 | - |
| g_05290000 | 3.4676 | 3.8491 | 3.0957 | - |
| g_05325000 | 3.4658 | 3.8511 | 3.0952 | - |
| g_05155000 | 3.4660 | 3.8489 | 3.0942 | - |
| g_05310000 | 3.4656 | 3.8465 | 3.0929 | - |
| g_05305000 | 3.4600 | 3.8575 | 3.0927 | - |
| g_05285000 | 3.4645 | 3.8497 | 3.0924 | - |
| g_05375000 | 3.4611 | 3.8499 | 3.0920 | - |
| ... | ... | ... | ... | ... |
| Model | DNSMOS OVRL | Training Time | Notes |
|---|---|---|---|
| BigVGAN (24khz) | 3.1038 | ~10 days | Fine-tuned from pretrained |
| BigVGAN (22khz) | 3.1030 | ~10 days | Fine-tuned from pretrained |
| HiFi-GAN | 3.0724 | ~8 days | Trained from scratch |
| Ground Truth | 3.1040 | - | - |