ヨスガノソラ和ハルカナソラ的解包方法&標(biāo)注生成
1.下載游戲本體(必須是日語(yǔ)原版)
ヨスガノソラ:https://mega.nz/file/MFYnwAJL#tQd5iNuS6fPBscGeHch7C8XND6KUpc0xqdVyPmMW0qM
ハルカナソラ:
https://mega.nz/file/aIxFRI6B#F-jZpIbxuMma9maAboTEAHyicTKZwwI8dOjYCCy6Z3M
下載解壓完成后用虛擬光驅(qū)掛載鏡像,然后進(jìn)行安裝操作
2.下載解包工具
https://github.com/crskycode/GARbro/releases
注意依據(jù)Release的描述來(lái)更新數(shù)據(jù)庫(kù)
3.解包
找到voice.noa,右鍵-Extract,解壓出所有的.mio即可

4.轉(zhuǎn)換
下載萌衣☆player:http://www.entis.jp/eri/player/bin/meiplay12b.exe
打開(kāi)后如下圖所示進(jìn)行批量轉(zhuǎn)換:


至此音頻解包完成
5.提取文本(不適用于漢化處理)
所有的文本信息在system文件夾下的.csx文件內(nèi)
下載CSXtoXP3:https://github.com/TheRealMrWicked/CSXtoXP3
解壓后將.csx文件放置在main.exe的旁邊,然后運(yùn)行main.exe,根據(jù)終端內(nèi)的指引進(jìn)行轉(zhuǎn)換
轉(zhuǎn)換完成的文件在compile\scenario內(nèi)
然后使用python將.ks文件轉(zhuǎn)換成txt標(biāo)注

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
一部分音頻未找到對(duì)應(yīng)的標(biāo)注,丟棄即可
生成的txt使用cleaner處理后可以用于VITS的訓(xùn)練(圖窮匕見(jiàn))