feat: add temporary changes

This commit is contained in:
Haoyu Xu
2023-05-02 22:28:10 -04:00
parent eea8fc46dd
commit 6f988ac02e
18 changed files with 12344 additions and 304 deletions

View File

@@ -113,10 +113,16 @@ async function main() {
})
}
})
const voiceLangs = Object.keys(voiceJson.voiceLangs["zh-CN"])
const subtitleLangs = Object.keys(voiceJson.subtitleLangs)
writeSync(JSON.stringify(voiceJson), path.join(OPERATOR_SOURCE_FOLDER, OPERATOR_NAME, 'charword_table.json'))
let voiceLangs = [], subtitleLangs = [];
try {
voiceLangs = Object.keys(voiceJson.voiceLangs["zh-CN"])
subtitleLangs = Object.keys(voiceJson.subtitleLangs)
writeSync(JSON.stringify(voiceJson), path.join(OPERATOR_SOURCE_FOLDER, OPERATOR_NAME, 'charword_table.json'))
} catch (e) {
console.log(`charword_table is not available`)
}
const envPath = path.join(OPERATOR_SOURCE_FOLDER, OPERATOR_NAME, '.env')
writeSync((new EnvGenerator()).generate([