@oxiaom/adoremix 1.0.10 → 1.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/install.js +2 -1
- package/tts/tts.js +2 -1
package/package.json
CHANGED
package/src/install.js
CHANGED
package/tts/tts.js
CHANGED
|
@@ -45,10 +45,12 @@ async function main() {
|
|
|
45
45
|
// 读 config.ini 找 provider
|
|
46
46
|
const cfgPath = path.join(process.cwd(), 'config.ini');
|
|
47
47
|
let ttsSection = {};
|
|
48
|
+
let settings = {};
|
|
48
49
|
if (fs.existsSync(cfgPath)) {
|
|
49
50
|
try {
|
|
50
51
|
const cfg = ini.parse(fs.readFileSync(cfgPath, 'utf-8'));
|
|
51
52
|
ttsSection = cfg.TTS || {};
|
|
53
|
+
settings = cfg.Settings || {};
|
|
52
54
|
} catch (e) { err(`config.ini 解析失败: ${e.message}`); }
|
|
53
55
|
}
|
|
54
56
|
const providerName = (ttsSection.provider || 'xf').toLowerCase();
|
|
@@ -65,7 +67,6 @@ async function main() {
|
|
|
65
67
|
|
|
66
68
|
// 凭证:优先 config.ini,命令行参数兼容旧版 xf
|
|
67
69
|
// 兼容 Qt 已有字段:Settings.ttsxfAPPID / ttsxfAPISecret / ttsxfAPIKey
|
|
68
|
-
const settings = cfg.Settings || {};
|
|
69
70
|
const creds = {
|
|
70
71
|
xf_appid: ttsSection.xf_appid || settings.ttsxfAPPID || appidArg || '',
|
|
71
72
|
xf_apiSecret: ttsSection.xf_apiSecret || settings.ttsxfAPISecret || apiSecretArg || '',
|