@oxiaom/adoremix 1.0.50 → 1.0.52

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oxiaom/adoremix",
3
- "version": "1.0.50",
3
+ "version": "1.0.52",
4
4
  "description": "AdoreMix broadcast server - cross-platform installer, runner and service manager",
5
5
  "bin": {
6
6
  "adoremix": "./bin/adoremix.js"
@@ -205,6 +205,12 @@ function systemInstallCmd(pkgMgr, pkgs) {
205
205
  }
206
206
 
207
207
  function buildSystemdUnit() {
208
+ // Audio8 onnx_runtime 需要 numpy 2.4.3(需 Python ≥ 3.11),Ubuntu 22.04 默认 3.10
209
+ // 自动探测 python3.11(PPA/官方包),fallback 到 python3
210
+ const pyBin = (function(){
211
+ try { execFileSync('/bin/bash -c "command -v python3.11"', { stdio: 'pipe' }); return 'python3.11'; }
212
+ catch (e) { return 'python3'; }
213
+ })();
208
214
  return `[Unit]
209
215
  Description=Audio8 TTS (AdoreMix)
210
216
  After=network.target
@@ -214,7 +220,7 @@ Type=simple
214
220
  User=root
215
221
  WorkingDirectory=${AUDIO8_DEPLOY_DIR}/onnx_runtime
216
222
  Environment=PATH=${AUDIO8_VENV_DIR}/bin:/usr/bin:/bin
217
- ExecStart=${AUDIO8_VENV_DIR}/bin/python -m arktts_runtime.service --model-dir ./model --voices-dir ./model/voices --port ${AUDIO8_DEFAULT_PORT}
223
+ ExecStart=${AUDIO8_VENV_DIR}/bin/${pyBin} -m arktts_runtime.service --model-dir ./model --voices-dir ./model/voices --port ${AUDIO8_DEFAULT_PORT}
218
224
  Restart=on-failure
219
225
  RestartSec=5
220
226
 
@@ -337,11 +343,15 @@ function install(opts) {
337
343
  return 1;
338
344
  }
339
345
 
340
- // venv + pip install
346
+ // venv + pip install(Python 3.11+,numpy 2.4.3 需要)
347
+ const pyBase = (function(){
348
+ try { execFileSync('/bin/bash -c "command -v python3.11"', { stdio: 'pipe' }); return 'python3.11'; }
349
+ catch (e) { return 'python3'; }
350
+ })();
341
351
  try {
342
- logger.log('=== 创建 venv 并安装 Python 依赖(首次需 5-10 分钟下载 torch 等)===');
343
- execSync('python3 -m venv ~/.audio8_venv', { stdio: 'inherit', shell: '/bin/bash' });
344
- execSync('source ~/.audio8_venv/bin/activate && pip install -U pip --quiet && pip install -r ~/audio8/onnx_runtime/requirements.txt --quiet', { stdio: 'inherit', shell: '/bin/bash' });
352
+ logger.log('=== 创建 venv 并安装 Python 依赖(首次需 5-10 分钟下载 torch 等,Python=' + pyBase + ')===');
353
+ execSync(`${pyBase} -m venv ~/.audio8_venv`, { stdio: 'inherit', shell: '/bin/bash' });
354
+ execSync(`source ~/.audio8_venv/bin/activate && pip install -U pip --quiet && pip install -r ~/audio8/onnx_runtime/requirements.txt --quiet`, { stdio: 'inherit', shell: '/bin/bash' });
345
355
  } catch (e) {
346
356
  logger.error('Python 依赖安装失败: ' + e.message.slice(0, 200));
347
357
  return 1;