当前位置:   article > 正文

Bert-vits2-v2.2新版本本地训练推理整合包(原神八重神子英文模型miko)_bert-vits2 整合包

bert-vits2 整合包

在这里插入图片描述

近日,Bert-vits2-v2.2如约更新,该新版本v2.2主要把Emotion 模型换用CLAP多模态模型,推理支持输入text prompt提示词和audio prompt提示语音来进行引导风格化合成,让推理音色更具情感特色,并且推出了新的预处理webuI,操作上更加亲民和接地气。

更多情报请参见Bert-vits2官网:

https://github.com/fishaudio/Bert-VITS2/releases/tag/v2.2
  • 1

与此同时,基于FastApi的推理web界面项目也同步适配了Bert-vits2-v2.2版本,官网如下:

https://github.com/jiangyuxiaoxiao/Bert-VITS2-UI
  • 1

本次我们基于此两个项目来克隆原神角色八重神子的英文语音模型miko。

Bert-vits2-v2.2新的底模和情感模型

首先克隆Bert-vits2-v2.2官方项目:

git clone https://github.com/fishaudio/Bert-VITS2/tree/v2.2
  • 1

安装依赖:

pip3 install -r requirements.txt
  • 1

这里注意是v2.2的tag分支,因为官方随时都在更新,主分支可能会存在bug。

进入项目的目录:

cd /Bert-VITS2
  • 1

随后下载新的底模和情感模型,下载地址:

https://openi.pcl.ac.cn/Stardust_minus/Bert-VITS2/modelmanage/show_model
  • 1

将新的情感模型clap-hatsat-fused放入到项目的emotional目录,结构如下:

E:\work\Bert-VITS2-v22\emotional>tree /f  
Folder PATH listing for volume myssd  
Volume serial number is 7CE3-15AE  
E:.  
├───clap-htsat-fused  
│       .gitattributes  
│       config.json  
│       merges.txt  
│       preprocessor_config.json  
│       pytorch_model.bin  
│       README.md  
│       special_tokens_map.json  
│       tokenizer.json  
│       tokenizer_config.json  
│       vocab.json  
│  
└───wav2vec2-large-robust-12-ft-emotion-msp-dim  
        .gitattributes  
        config.json  
        LICENSE  
        preprocessor_config.json  
        pytorch_model.bin  
        README.md  
        vocab.json
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24

注意,wav2vec2-large-robust-12-ft-emotion-msp-dim是Bert-vits2-v2.1的情感模型,也需要保留,具体请移步:义无反顾马督工,Bert-vits2V210复刻马督工实践(Python3.10), 这里不再赘述。

至此,新模型就配置好了。

Bert-vits2-v2.2模型训练

首先下载训练集,以原神角色八重神子的英文配音为例子,数据集下载地址:

https://github.com/AI-Hobbyist/Genshin_Datasets
  • 1

随后新建miko角色目录

mkdir miko
  • 1

将语音标注文件以esd.list命名,放入miko目录。

同时将分片语音素材放入raw目录。

最后新建miko/configs/config.json配置文件:

{  
  "train": {  
    "log_interval": 50,  
    "eval_interval": 50,  
    "seed": 42,  
    "epochs": 1000,  
    "learning_rate": 0.0002,  
    "betas": [  
      0.8,  
      0.99  
    ],  
    "eps": 1e-09,  
    "batch_size": 6,  
    "fp16_run": false,  
    "lr_decay": 0.99995,  
    "segment_size": 16384,  
    "init_lr_ratio": 1,  
    "warmup_epochs": 0,  
    "c_mel": 45,  
    "c_kl": 1.0,  
    "skip_optimizer": false,  
    "freeze_ZH_bert": false,  
    "freeze_JP_bert": false,  
    "freeze_EN_bert": false  
  },  
  "data": {  
    "training_files": "data/miko/train.list",  
    "validation_files": "data/miko/val.list",  
    "max_wav_value": 32768.0,  
    "sampling_rate": 44100,  
    "filter_length": 2048,  
    "hop_length": 512,  
    "win_length": 2048,  
    "n_mel_channels": 128,  
    "mel_fmin": 0.0,  
    "mel_fmax": null,  
    "add_blank": true,  
    "n_speakers": 1,  
    "cleaned_text": true,  
    "spk2id": {  
      "miko": 0  
    }  
  },  
  "model": {  
    "use_spk_conditioned_encoder": true,  
    "use_noise_scaled_mas": true,  
    "use_mel_posterior_encoder": false,  
    "use_duration_discriminator": true,  
    "inter_channels": 192,  
    "hidden_channels": 192,  
    "filter_channels": 768,  
    "n_heads": 2,  
    "n_layers": 6,  
    "kernel_size": 3,  
    "p_dropout": 0.1,  
    "resblock": "1",  
    "resblock_kernel_sizes": [  
      3,  
      7,  
      11  
    ],  
    "resblock_dilation_sizes": [  
      [  
        1,  
        3,  
        5  
      ],  
      [  
        1,  
        3,  
        5  
      ],  
      [  
        1,  
        3,  
        5  
      ]  
    ],  
    "upsample_rates": [  
      8,  
      8,  
      2,  
      2,  
      2  
    ],  
    "upsample_initial_channel": 512,  
    "upsample_kernel_sizes": [  
      16,  
      16,  
      8,  
      2,  
      2  
    ],  
    "n_layers_q": 3,  
    "use_spectral_norm": false,  
    "gin_channels": 256  
  },  
  "version": "2.2"  
}
  • 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
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99

这里注意"version": “2.2”,即版本号为最新的v2.2。

其他参数根据当前的设备环境酌情调整即可。

随后启动预处理页面:

python3 webui_preprocess.py
  • 1

访问http://127.0.0.1:7860/:

按照页面的步骤进行操作即可,简单且方便。

操作完之后,运行训练命令:

python3 train_ms.py
  • 1

训练好的模型放在data/miko/models目录,结构如下:

E:\work\Bert-VITS2-v22\Data\miko\models>tree /f  
Folder PATH listing for volume myssd  
Volume serial number is 7CE3-15AE  
E:.  
│   DUR_0.pth  
│   DUR_100.pth  
│   DUR_150.pth  
│   DUR_50.pth  
│   D_0.pth  
│   D_100.pth  
│   D_150.pth  
│   D_50.pth  
│   events.out.tfevents.1702457087.ly.13044.0  
│   events.out.tfevents.1702458207.ly.12416.0  
│   githash  
│   G_0.pth  
│   G_100.pth  
│   G_150.pth  
│   G_50.pth  
│   train.log  
│  
└───eval  
        events.out.tfevents.1702457087.ly.13044.1  
        events.out.tfevents.1702458207.ly.12416.1
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24

至此,训练环节结束。

Bert-vits2-v2.2模型推理

推理我们使用Bert-vits2-UI项目的页面,克隆web项目:

git clone https://github.com/jiangyuxiaoxiao/Bert-VITS2-UI
  • 1

将Web项目放入Bert-vits2-v2.2的根目录中,目录结构如下:

E:\work\Bert-VITS2-v22_lilith\Web>tree /f  
Folder PATH listing for volume myssd  
Volume serial number is 7CE3-15AE  
E:.  
│   index.html  
│  
├───assets  
│       index-21bc6a28.css  
│       index-402c0217.js  
│  
└───img  
        helps1.png  
        helps2.png  
        Hiyori.ico
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14

这里包含主页面、样式文件以及JS文件,基于Hiyori。

随后启动推理页面:

python3 server_fastapi.py
  • 1

访问:http://127.0.0.1:5000/:

加载模型进行推理即可。

此外,还可以基于FastAPI的接口进行推理,换句话说,发送http请求即可获取推理音频,接口参数如下:

{  
    "openapi": "3.1.0",  
    "info": {  
        "title": "FastAPI",  
        "version": "0.1.0"  
    },  
    "paths": {  
        "/": {  
            "get": {  
                "summary": "Index",  
                "operationId": "index__get",  
                "responses": {  
                    "200": {  
                        "description": "Successful Response",  
                        "content": {  
                            "application/json": {  
                                "schema": {}  
                            }  
                        }  
                    }  
                }  
            }  
        },  
        "/voice": {  
            "post": {  
                "summary": "Voice",  
                "description": "语音接口,若需要上传参考音频请仅使用post请求",  
                "operationId": "voice_voice_post",  
                "parameters": [  
                    {  
                        "name": "model_id",  
                        "in": "query",  
                        "required": true,  
                        "schema": {  
                            "type": "integer",  
                            "description": "模型ID",  
                            "title": "Model Id"  
                        },  
                        "description": "模型ID"  
                    },  
                    {  
                        "name": "speaker_name",  
                        "in": "query",  
                        "required": false,  
                        "schema": {  
                            "type": "string",  
                            "description": "说话人名",  
                            "title": "Speaker Name"  
                        },  
                        "description": "说话人名"  
                    },  
                    {  
                        "name": "speaker_id",  
                        "in": "query",  
                        "required": false,  
                        "schema": {  
                            "type": "integer",  
                            "description": "说话人id,与speaker_name二选一",  
                            "title": "Speaker Id"  
                        },  
                        "description": "说话人id,与speaker_name二选一"  
                    },  
                    {  
                        "name": "sdp_ratio",  
                        "in": "query",  
                        "required": false,  
                        "schema": {  
                            "type": "number",  
                            "description": "SDP/DP混合比",  
                            "default": 0.2,  
                            "title": "Sdp Ratio"  
                        },  
                        "description": "SDP/DP混合比"  
                    },  
                    {  
                        "name": "noise",  
                        "in": "query",  
                        "required": false,  
                        "schema": {  
                            "type": "number",  
                            "description": "感情",  
                            "default": 0.2,  
                            "title": "Noise"  
                        },  
                        "description": "感情"  
                    },  
                    {  
                        "name": "noisew",  
                        "in": "query",  
                        "required": false,  
                        "schema": {  
                            "type": "number",  
                            "description": "音素长度",  
                            "default": 0.9,  
                            "title": "Noisew"  
                        },  
                        "description": "音素长度"  
                    },  
                    {  
                        "name": "length",  
                        "in": "query",  
                        "required": false,  
                        "schema": {  
                            "type": "number",  
                            "description": "语速",  
                            "default": 1,  
                            "title": "Length"  
                        },  
                        "description": "语速"  
                    },  
                    {  
                        "name": "language",  
                        "in": "query",  
                        "required": false,  
                        "schema": {  
                            "type": "string",  
                            "description": "语言",  
                            "title": "Language"  
                        },  
                        "description": "语言"  
                    },  
                    {  
                        "name": "auto_translate",  
                        "in": "query",  
                        "required": false,  
                        "schema": {  
                            "type": "boolean",  
                            "description": "自动翻译",  
                            "default": false,  
                            "title": "Auto Translate"  
                        },  
                        "description": "自动翻译"  
                    },  
                    {  
                        "name": "auto_split",  
                        "in": "query",  
                        "required": false,  
                        "schema": {  
                            "type": "boolean",  
                            "description": "自动切分",  
                            "default": false,  
                            "title": "Auto Split"  
                        },  
                        "description": "自动切分"  
                    },  
                    {  
                        "name": "emotion",  
                        "in": "query",  
                        "required": false,  
                        "schema": {  
                            "anyOf": [  
                                {  
                                    "type": "integer"  
                                },  
                                {  
                                    "type": "string"  
                                },  
                                {  
                                    "type": "null"  
                                }  
                            ],  
                            "description": "emo",  
                            "title": "Emotion"  
                        },  
                        "description": "emo"  
                    }  
                ],  
                "requestBody": {  
                    "required": true,  
                    "content": {  
                        "multipart/form-data": {  
                            "schema": {  
                                "$ref": "#/components/schemas/Body_voice_voice_post"  
                            }  
                        }  
                    }  
                },  
                "responses": {  
                    "200": {  
                        "description": "Successful Response",  
                        "content": {  
                            "application/json": {  
                                "schema": {}  
                            }  
                        }  
                    },  
                    "422": {  
                        "description": "Validation Error",  
                        "content": {  
                            "application/json": {  
                                "schema": {  
                                    "$ref": "#/components/schemas/HTTPValidationError"  
                                }  
                            }  
                        }  
                    }  
                }  
            },  
            "get": {  
                "summary": "Voice",  
                "description": "语音接口",  
                "operationId": "voice_voice_get",  
                "parameters": [  
                    {  
                        "name": "text",  
                        "in": "query",  
                        "required": true,  
                        "schema": {  
                            "type": "string",  
                            "description": "输入文字",  
                            "title": "Text"  
                        },  
                        "description": "输入文字"  
                    },  
                    {  
                        "name": "model_id",  
                        "in": "query",  
                        "required": true,  
                        "schema": {  
                            "type": "integer",  
                            "description": "模型ID",  
                            "title": "Model Id"  
                        },  
                        "description": "模型ID"  
                    },  
                    {  
                        "name": "speaker_name",  
                        "in": "query",  
                        "required": false,  
                        "schema": {  
                            "type": "string",  
                            "description": "说话人名",  
                            "title": "Speaker Name"  
                        },  
                        "description": "说话人名"  
                    },  
                    {  
                        "name": "speaker_id",  
                        "in": "query",  
                        "required": false,  
                        "schema": {  
                            "type": "integer",  
                            "description": "说话人id,与speaker_name二选一",  
                            "title": "Speaker Id"  
                        },  
                        "description": "说话人id,与speaker_name二选一"  
                    },  
                    {  
                        "name": "sdp_ratio",  
                        "in": "query",  
                        "required": false,  
                        "schema": {  
                            "type": "number",  
                            "description": "SDP/DP混合比",  
                            "default": 0.2,  
                            "title": "Sdp Ratio"  
                        },  
                        "description": "SDP/DP混合比"  
                    },  
                    {  
                        "name": "noise",  
                        "in": "query",  
                        "required": false,  
                        "schema": {  
                            "type": "number",  
                            "description": "感情",  
                            "default": 0.2,  
                            "title": "Noise"  
                        },  
                        "description": "感情"  
                    },  
                    {  
                        "name": "noisew",  
                        "in": "query",  
                        "required": false,  
                        "schema": {  
                            "type": "number",  
                            "description": "音素长度",  
                            "default": 0.9,  
                            "title": "Noisew"  
                        },  
                        "description": "音素长度"  
                    },  
                    {  
                        "name": "length",  
                        "in": "query",  
                        "required": false,  
                        "schema": {  
                            "type": "number",  
                            "description": "语速",  
                            "default": 1,  
                            "title": "Length"  
                        },  
                        "description": "语速"  
                    },  
                    {  
                        "name": "language",  
                        "in": "query",  
                        "required": false,  
                        "schema": {  
                            "type": "string",  
                            "description": "语言",  
                            "title": "Language"  
                        },  
                        "description": "语言"  
                    },  
                    {  
                        "name": "auto_translate",  
                        "in": "query",  
                        "required": false,  
                        "schema": {  
                            "type": "boolean",  
                            "description": "自动翻译",  
                            "default": false,  
                            "title": "Auto Translate"  
                        },  
                        "description": "自动翻译"  
                    },  
                    {  
                        "name": "auto_split",  
                        "in": "query",  
                        "required": false,  
                        "schema": {  
                            "type": "boolean",  
                            "description": "自动切分",  
                            "default": false,  
                            "title": "Auto Split"  
                        },  
                        "description": "自动切分"  
                    },  
                    {  
                        "name": "emotion",  
                        "in": "query",  
                        "required": false,  
                        "schema": {  
                            "anyOf": [  
                                {  
                                    "type": "integer"  
                                },  
                                {  
                                    "type": "string"  
                                },  
                                {  
                                    "type": "null"  
                                }  
                            ],  
                            "description": "emo",  
                            "title": "Emotion"  
                        },  
                        "description": "emo"  
                    }  
                ],  
                "responses": {  
                    "200": {  
                        "description": "Successful Response",  
                        "content": {  
                            "application/json": {  
                                "schema": {}  
                            }  
                        }  
                    },  
                    "422": {  
                        "description": "Validation Error",  
                        "content": {  
                            "application/json": {  
                                "schema": {  
                                    "$ref": "#/components/schemas/HTTPValidationError"  
                                }  
                            }  
                        }  
                    }  
                }  
            }  
        },  
        "/models/info": {  
            "get": {  
                "summary": "Get Loaded Models Info",  
                "description": "获取已加载模型信息",  
                "operationId": "get_loaded_models_info_models_info_get",  
                "responses": {  
                    "200": {  
                        "description": "Successful Response",  
                        "content": {  
                            "application/json": {  
                                "schema": {}  
                            }  
                        }  
                    }  
                }  
            }  
        },  
        "/models/delete": {  
            "get": {  
                "summary": "Delete Model",  
                "description": "删除指定模型",  
                "operationId": "delete_model_models_delete_get",  
                "parameters": [  
                    {  
                        "name": "model_id",  
                        "in": "query",  
                        "required": true,  
                        "schema": {  
                            "type": "integer",  
                            "description": "删除模型id",  
                            "title": "Model Id"  
                        },  
                        "description": "删除模型id"  
                    }  
                ],  
                "responses": {  
                    "200": {  
                        "description": "Successful Response",  
                        "content": {  
                            "application/json": {  
                                "schema": {}  
                            }  
                        }  
                    },  
                    "422": {  
                        "description": "Validation Error",  
                        "content": {  
                            "application/json": {  
                                "schema": {  
                                    "$ref": "#/components/schemas/HTTPValidationError"  
                                }  
                            }  
                        }  
                    }  
                }  
            }  
        },  
        "/models/add": {  
            "get": {  
                "summary": "Add Model",  
                "description": "添加指定模型:允许重复添加相同路径模型,且不重复占用内存",  
                "operationId": "add_model_models_add_get",  
                "parameters": [  
                    {  
                        "name": "model_path",  
                        "in": "query",  
                        "required": true,  
                        "schema": {  
                            "type": "string",  
                            "description": "添加模型路径",  
                            "title": "Model Path"  
                        },  
                        "description": "添加模型路径"  
                    },  
                    {  
                        "name": "config_path",  
                        "in": "query",  
                        "required": false,  
                        "schema": {  
                            "type": "string",  
                            "description": "添加模型配置文件路径,不填则使用./config.json或../config.json",  
                            "title": "Config Path"  
                        },  
                        "description": "添加模型配置文件路径,不填则使用./config.json或../config.json"  
                    },  
                    {  
                        "name": "device",  
                        "in": "query",  
                        "required": false,  
                        "schema": {  
                            "type": "string",  
                            "description": "推理使用设备",  
                            "default": "cuda",  
                            "title": "Device"  
                        },  
                        "description": "推理使用设备"  
                    },  
                    {  
                        "name": "language",  
                        "in": "query",  
                        "required": false,  
                        "schema": {  
                            "type": "string",  
                            "description": "模型默认语言",  
                            "default": "ZH",  
                            "title": "Language"  
                        },  
                        "description": "模型默认语言"  
                    }  
                ],  
                "responses": {  
                    "200": {  
                        "description": "Successful Response",  
                        "content": {  
                            "application/json": {  
                                "schema": {}  
                            }  
                        }  
                    },  
                    "422": {  
                        "description": "Validation Error",  
                        "content": {  
                            "application/json": {  
                                "schema": {  
                                    "$ref": "#/components/schemas/HTTPValidationError"  
                                }  
                            }  
                        }  
                    }  
                }  
            }  
        },  
        "/models/get_unloaded": {  
            "get": {  
                "summary": "Get Unloaded Models Info",  
                "description": "获取未加载模型",  
                "operationId": "get_unloaded_models_info_models_get_unloaded_get",  
                "parameters": [  
                    {  
                        "name": "root_dir",  
                        "in": "query",  
                        "required": false,  
                        "schema": {  
                            "type": "string",  
                            "description": "搜索根目录",  
                            "default": "Data",  
                            "title": "Root Dir"  
                        },  
                        "description": "搜索根目录"  
                    }  
                ],  
                "responses": {  
                    "200": {  
                        "description": "Successful Response",  
                        "content": {  
                            "application/json": {  
                                "schema": {}  
                            }  
                        }  
                    },  
                    "422": {  
                        "description": "Validation Error",  
                        "content": {  
                            "application/json": {  
                                "schema": {  
                                    "$ref": "#/components/schemas/HTTPValidationError"  
                                }  
                            }  
                        }  
                    }  
                }  
            }  
        },  
        "/models/get_local": {  
            "get": {  
                "summary": "Get Local Models Info",  
                "description": "获取全部本地模型",  
                "operationId": "get_local_models_info_models_get_local_get",  
                "parameters": [  
                    {  
                        "name": "root_dir",  
                        "in": "query",  
                        "required": false,  
                        "schema": {  
                            "type": "string",  
                            "description": "搜索根目录",  
                            "default": "Data",  
                            "title": "Root Dir"  
                        },  
                        "description": "搜索根目录"  
                    }  
                ],  
                "responses": {  
                    "200": {  
                        "description": "Successful Response",  
                        "content": {  
                            "application/json": {  
                                "schema": {}  
                            }  
                        }  
                    },  
                    "422": {  
                        "description": "Validation Error",  
                        "content": {  
                            "application/json": {  
                                "schema": {  
                                    "$ref": "#/components/schemas/HTTPValidationError"  
                                }  
                            }  
                        }  
                    }  
                }  
            }  
        },  
        "/status": {  
            "get": {  
                "summary": "Get Status",  
                "description": "获取电脑运行状态",  
                "operationId": "get_status_status_get",  
                "responses": {  
                    "200": {  
                        "description": "Successful Response",  
                        "content": {  
                            "application/json": {  
                                "schema": {}  
                            }  
                        }  
                    }  
                }  
            }  
        },  
        "/tools/translate": {  
            "get": {  
                "summary": "Translate",  
                "description": "翻译",  
                "operationId": "translate_tools_translate_get",  
                "parameters": [  
                    {  
                        "name": "texts",  
                        "in": "query",  
                        "required": true,  
                        "schema": {  
                            "type": "string",  
                            "description": "待翻译文本",  
                            "title": "Texts"  
                        },  
                        "description": "待翻译文本"  
                    },  
                    {  
                        "name": "to_language",  
                        "in": "query",  
                        "required": true,  
                        "schema": {  
                            "type": "string",  
                            "description": "翻译目标语言",  
                            "title": "To Language"  
                        },  
                        "description": "翻译目标语言"  
                    }  
                ],  
                "responses": {  
                    "200": {  
                        "description": "Successful Response",  
                        "content": {  
                            "application/json": {  
                                "schema": {}  
                            }  
                        }  
                    },  
                    "422": {  
                        "description": "Validation Error",  
                        "content": {  
                            "application/json": {  
                                "schema": {  
                                    "$ref": "#/components/schemas/HTTPValidationError"  
                                }  
                            }  
                        }  
                    }  
                }  
            }  
        },  
        "/tools/random_example": {  
            "get": {  
                "summary": "Random Example",  
                "description": "获取一个随机音频+文本,用于对比,音频会从本地目录随机选择。",  
                "operationId": "random_example_tools_random_example_get",  
                "parameters": [  
                    {  
                        "name": "language",  
                        "in": "query",  
                        "required": false,  
                        "schema": {  
                            "type": "string",  
                            "description": "指定语言,未指定则随机返回",  
                            "title": "Language"  
                        },  
                        "description": "指定语言,未指定则随机返回"  
                    },  
                    {  
                        "name": "root_dir",  
                        "in": "query",  
                        "required": false,  
                        "schema": {  
                            "type": "string",  
                            "description": "搜索根目录",  
                            "default": "Data",  
                            "title": "Root Dir"  
                        },  
                        "description": "搜索根目录"  
                    }  
                ],  
                "responses": {  
                    "200": {  
                        "description": "Successful Response",  
                        "content": {  
                            "application/json": {  
                                "schema": {}  
                            }  
                        }  
                    },  
                    "422": {  
                        "description": "Validation Error",  
                        "content": {  
                            "application/json": {  
                                "schema": {  
                                    "$ref": "#/components/schemas/HTTPValidationError"  
                                }  
                            }  
                        }  
                    }  
                }  
            }  
        },  
        "/tools/get_audio": {  
            "get": {  
                "summary": "Get Audio",  
                "operationId": "get_audio_tools_get_audio_get",  
                "parameters": [  
                    {  
                        "name": "path",  
                        "in": "query",  
                        "required": true,  
                        "schema": {  
                            "type": "string",  
                            "description": "本地音频路径",  
                            "title": "Path"  
                        },  
                        "description": "本地音频路径"  
                    }  
                ],  
                "responses": {  
                    "200": {  
                        "description": "Successful Response",  
                        "content": {  
                            "application/json": {  
                                "schema": {}  
                            }  
                        }  
                    },  
                    "422": {  
                        "description": "Validation Error",  
                        "content": {  
                            "application/json": {  
                                "schema": {  
                                    "$ref": "#/components/schemas/HTTPValidationError"  
                                }  
                            }  
                        }  
                    }  
                }  
            }  
        }  
    },  
    "components": {  
        "schemas": {  
            "Body_voice_voice_post": {  
                "properties": {  
                    "text": {  
                        "type": "string",  
                        "title": "Text"  
                    },  
                    "reference_audio": {  
                        "type": "string",  
                        "format": "binary",  
                        "title": "Reference Audio"  
                    }  
                },  
                "type": "object",  
                "required": [  
                    "text"  
                ],  
                "title": "Body_voice_voice_post"  
            },  
            "HTTPValidationError": {  
                "properties": {  
                    "detail": {  
                        "items": {  
                            "$ref": "#/components/schemas/ValidationError"  
                        },  
                        "type": "array",  
                        "title": "Detail"  
                    }  
                },  
                "type": "object",  
                "title": "HTTPValidationError"  
            },  
            "ValidationError": {  
                "properties": {  
                    "loc": {  
                        "items": {  
                            "anyOf": [  
                                {  
                                    "type": "string"  
                                },  
                                {  
                                    "type": "integer"  
                                }  
                            ]  
                        },  
                        "type": "array",  
                        "title": "Location"  
                    },  
                    "msg": {  
                        "type": "string",  
                        "title": "Message"  
                    },  
                    "type": {  
                        "type": "string",  
                        "title": "Error Type"  
                    }  
                },  
                "type": "object",  
                "required": [  
                    "loc",  
                    "msg",  
                    "type"  
                ],  
                "title": "ValidationError"  
            }  
        }  
    }  
}
  • 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
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132
  • 133
  • 134
  • 135
  • 136
  • 137
  • 138
  • 139
  • 140
  • 141
  • 142
  • 143
  • 144
  • 145
  • 146
  • 147
  • 148
  • 149
  • 150
  • 151
  • 152
  • 153
  • 154
  • 155
  • 156
  • 157
  • 158
  • 159
  • 160
  • 161
  • 162
  • 163
  • 164
  • 165
  • 166
  • 167
  • 168
  • 169
  • 170
  • 171
  • 172
  • 173
  • 174
  • 175
  • 176
  • 177
  • 178
  • 179
  • 180
  • 181
  • 182
  • 183
  • 184
  • 185
  • 186
  • 187
  • 188
  • 189
  • 190
  • 191
  • 192
  • 193
  • 194
  • 195
  • 196
  • 197
  • 198
  • 199
  • 200
  • 201
  • 202
  • 203
  • 204
  • 205
  • 206
  • 207
  • 208
  • 209
  • 210
  • 211
  • 212
  • 213
  • 214
  • 215
  • 216
  • 217
  • 218
  • 219
  • 220
  • 221
  • 222
  • 223
  • 224
  • 225
  • 226
  • 227
  • 228
  • 229
  • 230
  • 231
  • 232
  • 233
  • 234
  • 235
  • 236
  • 237
  • 238
  • 239
  • 240
  • 241
  • 242
  • 243
  • 244
  • 245
  • 246
  • 247
  • 248
  • 249
  • 250
  • 251
  • 252
  • 253
  • 254
  • 255
  • 256
  • 257
  • 258
  • 259
  • 260
  • 261
  • 262
  • 263
  • 264
  • 265
  • 266
  • 267
  • 268
  • 269
  • 270
  • 271
  • 272
  • 273
  • 274
  • 275
  • 276
  • 277
  • 278
  • 279
  • 280
  • 281
  • 282
  • 283
  • 284
  • 285
  • 286
  • 287
  • 288
  • 289
  • 290
  • 291
  • 292
  • 293
  • 294
  • 295
  • 296
  • 297
  • 298
  • 299
  • 300
  • 301
  • 302
  • 303
  • 304
  • 305
  • 306
  • 307
  • 308
  • 309
  • 310
  • 311
  • 312
  • 313
  • 314
  • 315
  • 316
  • 317
  • 318
  • 319
  • 320
  • 321
  • 322
  • 323
  • 324
  • 325
  • 326
  • 327
  • 328
  • 329
  • 330
  • 331
  • 332
  • 333
  • 334
  • 335
  • 336
  • 337
  • 338
  • 339
  • 340
  • 341
  • 342
  • 343
  • 344
  • 345
  • 346
  • 347
  • 348
  • 349
  • 350
  • 351
  • 352
  • 353
  • 354
  • 355
  • 356
  • 357
  • 358
  • 359
  • 360
  • 361
  • 362
  • 363
  • 364
  • 365
  • 366
  • 367
  • 368
  • 369
  • 370
  • 371
  • 372
  • 373
  • 374
  • 375
  • 376
  • 377
  • 378
  • 379
  • 380
  • 381
  • 382
  • 383
  • 384
  • 385
  • 386
  • 387
  • 388
  • 389
  • 390
  • 391
  • 392
  • 393
  • 394
  • 395
  • 396
  • 397
  • 398
  • 399
  • 400
  • 401
  • 402
  • 403
  • 404
  • 405
  • 406
  • 407
  • 408
  • 409
  • 410
  • 411
  • 412
  • 413
  • 414
  • 415
  • 416
  • 417
  • 418
  • 419
  • 420
  • 421
  • 422
  • 423
  • 424
  • 425
  • 426
  • 427
  • 428
  • 429
  • 430
  • 431
  • 432
  • 433
  • 434
  • 435
  • 436
  • 437
  • 438
  • 439
  • 440
  • 441
  • 442
  • 443
  • 444
  • 445
  • 446
  • 447
  • 448
  • 449
  • 450
  • 451
  • 452
  • 453
  • 454
  • 455
  • 456
  • 457
  • 458
  • 459
  • 460
  • 461
  • 462
  • 463
  • 464
  • 465
  • 466
  • 467
  • 468
  • 469
  • 470
  • 471
  • 472
  • 473
  • 474
  • 475
  • 476
  • 477
  • 478
  • 479
  • 480
  • 481
  • 482
  • 483
  • 484
  • 485
  • 486
  • 487
  • 488
  • 489
  • 490
  • 491
  • 492
  • 493
  • 494
  • 495
  • 496
  • 497
  • 498
  • 499
  • 500
  • 501
  • 502
  • 503
  • 504
  • 505
  • 506
  • 507
  • 508
  • 509
  • 510
  • 511
  • 512
  • 513
  • 514
  • 515
  • 516
  • 517
  • 518
  • 519
  • 520
  • 521
  • 522
  • 523
  • 524
  • 525
  • 526
  • 527
  • 528
  • 529
  • 530
  • 531
  • 532
  • 533
  • 534
  • 535
  • 536
  • 537
  • 538
  • 539
  • 540
  • 541
  • 542
  • 543
  • 544
  • 545
  • 546
  • 547
  • 548
  • 549
  • 550
  • 551
  • 552
  • 553
  • 554
  • 555
  • 556
  • 557
  • 558
  • 559
  • 560
  • 561
  • 562
  • 563
  • 564
  • 565
  • 566
  • 567
  • 568
  • 569
  • 570
  • 571
  • 572
  • 573
  • 574
  • 575
  • 576
  • 577
  • 578
  • 579
  • 580
  • 581
  • 582
  • 583
  • 584
  • 585
  • 586
  • 587
  • 588
  • 589
  • 590
  • 591
  • 592
  • 593
  • 594
  • 595
  • 596
  • 597
  • 598
  • 599
  • 600
  • 601
  • 602
  • 603
  • 604
  • 605
  • 606
  • 607
  • 608
  • 609
  • 610
  • 611
  • 612
  • 613
  • 614
  • 615
  • 616
  • 617
  • 618
  • 619
  • 620
  • 621
  • 622
  • 623
  • 624
  • 625
  • 626
  • 627
  • 628
  • 629
  • 630
  • 631
  • 632
  • 633
  • 634
  • 635
  • 636
  • 637
  • 638
  • 639
  • 640
  • 641
  • 642
  • 643
  • 644
  • 645
  • 646
  • 647
  • 648
  • 649
  • 650
  • 651
  • 652
  • 653
  • 654
  • 655
  • 656
  • 657
  • 658
  • 659
  • 660
  • 661
  • 662
  • 663
  • 664
  • 665
  • 666
  • 667
  • 668
  • 669
  • 670
  • 671
  • 672
  • 673
  • 674
  • 675
  • 676
  • 677
  • 678
  • 679
  • 680
  • 681
  • 682
  • 683
  • 684
  • 685
  • 686
  • 687
  • 688
  • 689
  • 690
  • 691
  • 692
  • 693
  • 694
  • 695
  • 696
  • 697
  • 698
  • 699
  • 700
  • 701
  • 702
  • 703
  • 704
  • 705
  • 706
  • 707
  • 708
  • 709
  • 710
  • 711
  • 712
  • 713
  • 714
  • 715
  • 716
  • 717
  • 718
  • 719
  • 720
  • 721
  • 722
  • 723
  • 724
  • 725
  • 726
  • 727
  • 728
  • 729
  • 730
  • 731
  • 732
  • 733
  • 734
  • 735
  • 736
  • 737
  • 738
  • 739
  • 740
  • 741
  • 742
  • 743
  • 744
  • 745
  • 746
  • 747
  • 748
  • 749
  • 750
  • 751
  • 752
  • 753
  • 754
  • 755
  • 756
  • 757
  • 758
  • 759
  • 760
  • 761
  • 762
  • 763
  • 764
  • 765
  • 766
  • 767
  • 768
  • 769
  • 770
  • 771
  • 772
  • 773
  • 774
  • 775
  • 776
  • 777
  • 778
  • 779
  • 780
  • 781
  • 782
  • 783
  • 784
  • 785
  • 786
  • 787
  • 788
  • 789
  • 790
  • 791
  • 792
  • 793
  • 794
  • 795
  • 796
  • 797
  • 798
  • 799
  • 800
  • 801
  • 802
  • 803
  • 804
  • 805
  • 806
  • 807
  • 808
  • 809
  • 810
  • 811
  • 812
  • 813
  • 814
  • 815
  • 816
  • 817

最后奉上Bert-vits2-v2.2本地训练推理整合包:

https://pan.baidu.com/s/1OVX9seRwZR6bZ-xsE_nRLg?pwd=v3uc
  • 1

与众乡亲同飨。

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/我家小花儿/article/detail/369906
推荐阅读
相关标签
  

闽ICP备14008679号