
因为私信太多人问我这个问题了,所以索性写一篇教程出来本解决方案:
下载链接(0217版本 有whisper):
sha-256: A2496F9EB344059E6F4C54996B16F2A193C5628B784487B7D907858F7DDF7E90-00005AD1
https://www.icloud.com.cn/iclouddrive/091QHaIbZMDZYQg7IX3g2kCqg#GPT-SoVITS-beta0217fix2
https://pan.xunlei.com/s/VO-BT6DLl8ARet4WUBuKMMNHA1?pwd=pknw#
https://pan.baidu.com/s/1Qpd51MlxzGj1HXB2bU2lTA?pwd=u46y
新版本解决方案:
在GPT-SoVits最新版中,已经内置了OpenAI-Whisper (ASR) 模型。第一次选择该模型进行离线ASR时,可能需要下载模型。

步骤一:选择模型

点击“模型尺寸”下拉框。
选择适合的模型。模型关系如下:

large:支持所有语言。
其他:仅限于英语。 所以可以选择large-3(其他large模型也是可以的,这里只是举个例子)。
步骤二:语言设置

点击“语言设置”按钮。
在弹出的界面中选择适合的语言:
zh — 中文
en — 英语
ja — 日语
由于是训练日语,所以选择ja。
最终设置应该类似于这样:

然后就可以按照正常流程打标训练了。
旧版本解决方案
方法1:升级新版
建议升级到最新版本,以获得更好的支持和功能。
方法2:下载whisper
因为旧版本没有内置whisper,而所谓的打标就是在.list文件中加入数据:

.list文件由4个部分组成,靠|分割,所以只需要额外下载openai-whisper识别语音文件最终生成日语的.list就行,对于其他小众语言可以使用这个方法(最新版只内置了zh、en、ja)
下载:https://developer.nvidia.com/cuda-downloads https://pytorch.org/
输入切割后的音频文件夹 python实现如下:
import os
import whisper def load_model(): try: return whisper.load_model("large-v3") except Exception as e: print(f"Error loading Whisper model: {e}") raise def transcribe_audio(model, file_path): try: result = model.transcribe(file_path) return result["text"] except Exception as e: print(f"Error transcribing {file_path}: {e}") return "" def process_files(input_path, lang_type, model): output_file = os.path.join(input_path, "output.list") with open(output_file, "w", encoding="utf-8") as f: for root, dirs, files in os.walk(input_path): for file in files: file_path = os.path.join(root, file) folder_name = os.path.basename(root) transcribed_text = transcribe_audio(model, file_path) output_line = f"{file_path}|{folder_name}|{lang_type}|{transcribed_text}\n" f.write(output_line) print(f"所有文件已处理完毕,结果保存在: {output_file}") if __name__ == "__main__": input_path = input("请输入文件夹路径: ") lang_type = input("请输入语种 (在 https://zh.wikipedia.org/wiki/ISO_639-1 查询):") model = load_model() process_files(input_path, lang_type, model)