ヨスガノソラ和ハルカナソラ的解包方法&标注生成
1.下载游戏本体(必须是日语原版)
ヨスガノソラ:https://mega.nz/file/MFYnwAJL#tQd5iNuS6fPBscGeHch7C8XND6KUpc0xqdVyPmMW0qM
ハルカナソラ:
https://mega.nz/file/aIxFRI6B#F-jZpIbxuMma9maAboTEAHyicTKZwwI8dOjYCCy6Z3M
下载解压完成后用虚拟光驱挂载镜像,然后进行安装操作
2.下载解包工具
https://github.com/crskycode/GARbro/releases
注意依据Release的描述来更新数据库
3.解包
找到voice.noa,右键-Extract,解压出所有的.mio即可

4.转换
下载萌衣☆player:http://www.entis.jp/eri/player/bin/meiplay12b.exe
打开后如下图所示进行批量转换:


至此音频解包完成
5.提取文本(不适用于汉化处理)
所有的文本信息在system文件夹下的.csx文件内
下载CSXtoXP3:https://github.com/TheRealMrWicked/CSXtoXP3
解压后将.csx文件放置在main.exe的旁边,然后运行main.exe,根据终端内的指引进行转换
转换完成的文件在compile\scenario内
然后使用python将.ks文件转换成txt标注

import os
input_folder_path = r'.\scenario' # 输入文件夹路径
output_folder_path = r'.\out' # 输出文件夹路径
for filename in os.listdir(input_folder_path):
if filename.endswith('.ks'):
input_file_path = os.path.join(input_folder_path, filename)
with open(input_file_path, 'r', encoding='utf-16-le', errors='ignore') as f:
input_text = f.read()
lines = input_text.split('\n')
for i in range(len(lines)):
line = lines[i]
if line.startswith('@Talk name='):
if 'voice=' in line:
voice_part = line.split('voice=')[1]
if '/' in voice_part:
voices = voice_part.split('/')
for voice in voices:
new_filename = voice + '.txt'
next_line = lines[i+1]
output_file_path = os.path.join(output_folder_path, new_filename)
with open(output_file_path, 'w', encoding='utf-8') as new_file:
new_file.write(next_line)
else:
new_filename = voice_part + '.txt'
next_line = lines[i+1]
output_file_path = os.path.join(output_folder_path, new_filename)
with open(output_file_path, 'w', encoding='utf-8') as new_file:
new_file.write(next_line)
else:
continue
一部分音频未找到对应的标注,丢弃即可
生成的txt使用cleaner处理后可以用于VITS的训练(图穷匕见)