feat: make exception for voice 043 in kr and en

This commit is contained in:
Haoyu Xu
2025-08-02 21:16:13 +08:00
parent 57d5cac582
commit 8ad0aba8cf
6 changed files with 66 additions and 13 deletions

View File

@@ -156,10 +156,26 @@ export const build = async (namesToBuild: string[]) => {
)
const voiceFileList = file.readdirSync(voiceSubFolder)
voiceList[voiceSubFolderMapping.lookup_region].map((item) => {
if (!voiceFileList.includes(`${item}.ogg`))
// an exception for detecting file existence
if (
item.endsWith('043') &&
voiceFileList.includes(`${item}.ogg`) &&
(voiceSubFolderMapping.name === 'kr' ||
voiceSubFolderMapping.name === 'en')
) {
console.log(
`Voice folder ${voiceSubFolderMapping.name} for ${name} has ${item}.ogg`
)
}
if (
!voiceFileList.includes(`${item}.ogg`) &&
// make an exception
!item.endsWith('043')
) {
err.push(
`Voice folder ${voiceSubFolderMapping.name} for ${name} is missing ${item}.ogg`
)
}
})
}
}