22 lines
1023 B
JavaScript
22 lines
1023 B
JavaScript
|
|
const { Client } = require('ssh2');
|
||
|
|
const c = new Client();
|
||
|
|
c.on('ready', () => {
|
||
|
|
const cmd = [
|
||
|
|
"echo '=== .env speaker/s2s config ==='",
|
||
|
|
"grep -i 'speaker\\|s2s\\|tts\\|voice\\|model' /www/wwwroot/demo.tensorgrove.com.cn/server/.env 2>/dev/null || echo 'no match'",
|
||
|
|
"echo ''",
|
||
|
|
"echo '=== Latest session start payload ==='",
|
||
|
|
"grep -i 'buildStartSession\\|speaker\\|system_role\\|speaking_style\\|model.*version\\|session.*start' /var/log/bigwo/server-out.log | tail -10",
|
||
|
|
"echo ''",
|
||
|
|
"echo '=== Current nativeVoiceGateway speaker line ==='",
|
||
|
|
"grep -n 'speaker' /www/wwwroot/demo.tensorgrove.com.cn/server/services/nativeVoiceGateway.js | head -5",
|
||
|
|
].join(' && ');
|
||
|
|
c.exec(cmd, (err, s) => {
|
||
|
|
if (err) { console.error(err); c.end(); return; }
|
||
|
|
let o = '';
|
||
|
|
s.on('data', d => o += d);
|
||
|
|
s.stderr.on('data', d => o += d);
|
||
|
|
s.on('close', () => { console.log(o); c.end(); });
|
||
|
|
});
|
||
|
|
}).connect({ host: '119.45.10.34', port: 22, username: 'root', password: '#xyzh%CS#2512@28' });
|