dsh-folia 4.26.0-pre.2 → 4.26.0-pre.21
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/lib/asr/asr-local.js +166 -0
- package/lib/asr/asr-worker.cjs +169 -0
- package/lib/client.js +616 -757
- package/lib/index.js +5 -1
- package/lib/pet-chat-proactive.js +147 -74
- package/lib/routes/pet-chat.js +555 -74
- package/lib/routes/pets.js +30 -2
- package/lib/settings-schema.js +2161 -2168
- package/lib/tts/tts-worker.cjs +129 -0
- package/lib/voice/record.js +217 -0
- package/package.json +5 -1
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* tts-worker.cjs — 本地 TTS 子进程入口(普通 node.exe 运行,**不能**在 Electron 里跑)
|
|
3
|
+
*
|
|
4
|
+
* 为什么必须是独立进程:
|
|
5
|
+
* sherpa-onnx 的 native 扩展会创建 V8 external buffer,
|
|
6
|
+
* Electron/DSH 进程里会直接抛 `External buffers are not allowed`。
|
|
7
|
+
* 普通 node.exe 没有这个限制 —— 所以合成放到子进程,主进程只走 stdio。
|
|
8
|
+
*
|
|
9
|
+
* 协议:stdin/stdout 各一行一条 JSON(NDJSON),stdout 只写协议、日志全部走 stderr。
|
|
10
|
+
* 请求:{ "id": "1", "text": "要念的话", "speed": 1.0 }
|
|
11
|
+
* 成功:{ "id": "1", "ok": true, "sampleRate": 44100, "wav": "<base64>", "ms": 1340 }
|
|
12
|
+
* 失败:{ "id": "1", "ok": false, "error": "原因" }
|
|
13
|
+
* 就绪:{ "ready": true, "sampleRate": 44100, "speakers": 1 }
|
|
14
|
+
*
|
|
15
|
+
* 用法:node tts-worker.cjs --model-dir <dir> [--speed 1.0]
|
|
16
|
+
* <dir> 里要有:node/、sherpa-onnx-node/、sherpa-onnx-win-x64/、models/melo/
|
|
17
|
+
* 实际布局由 lib/tts/local.js 决定;本脚本只按参数找文件。
|
|
18
|
+
*/
|
|
19
|
+
'use strict';
|
|
20
|
+
|
|
21
|
+
const path = require('node:path');
|
|
22
|
+
const fs = require('node:fs');
|
|
23
|
+
const readline = require('node:readline');
|
|
24
|
+
|
|
25
|
+
function arg(name, dflt) {
|
|
26
|
+
const i = process.argv.indexOf('--' + name);
|
|
27
|
+
return i >= 0 && process.argv[i + 1] ? process.argv[i + 1] : dflt;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const root = arg('model-dir', '');
|
|
31
|
+
if (!root) {
|
|
32
|
+
process.stderr.write('[tts-worker] 缺少 --model-dir\n');
|
|
33
|
+
process.exit(2);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
const modelDir = path.join(root, 'models', 'melo');
|
|
37
|
+
const sherpaDir = path.join(root, 'runtime', 'sherpa-onnx-node');
|
|
38
|
+
const sherpaNative = path.join(root, 'runtime', 'sherpa-onnx-win-x64');
|
|
39
|
+
|
|
40
|
+
const modelFile = path.join(modelDir, 'model.onnx');
|
|
41
|
+
for (const p of [modelFile, path.join(modelDir, 'tokens.txt'), path.join(modelDir, 'lexicon.txt'), sherpaDir]) {
|
|
42
|
+
if (!fs.existsSync(p)) {
|
|
43
|
+
process.stderr.write('[tts-worker] 缺少文件:' + p + '\n');
|
|
44
|
+
process.exit(3);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// native 扩展按模块名解析同目录的 sherpa-onnx-win-x64:这里显式把两个目录放进搜索路径
|
|
49
|
+
process.env.PATH = sherpaNative + ';' + process.env.PATH;
|
|
50
|
+
process.env.NODE_PATH = root;
|
|
51
|
+
|
|
52
|
+
let OfflineTts;
|
|
53
|
+
try {
|
|
54
|
+
({ OfflineTts } = require(path.join(sherpaDir, 'non-streaming-tts.js')));
|
|
55
|
+
} catch (e) {
|
|
56
|
+
process.stderr.write('[tts-worker] 加载 sherpa 失败:' + e.message + '\n');
|
|
57
|
+
process.exit(4);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
let tts;
|
|
61
|
+
try {
|
|
62
|
+
tts = new OfflineTts({
|
|
63
|
+
model: {
|
|
64
|
+
vits: {
|
|
65
|
+
model: modelFile,
|
|
66
|
+
tokens: path.join(modelDir, 'tokens.txt'),
|
|
67
|
+
lexicon: path.join(modelDir, 'lexicon.txt'),
|
|
68
|
+
},
|
|
69
|
+
numThreads: Math.max(1, Math.min(4, (require('node:os').cpus().length || 2) - 1)),
|
|
70
|
+
debug: 0,
|
|
71
|
+
provider: 'cpu',
|
|
72
|
+
},
|
|
73
|
+
maxNumSentences: 1,
|
|
74
|
+
});
|
|
75
|
+
} catch (e) {
|
|
76
|
+
process.stderr.write('[tts-worker] 初始化模型失败:' + e.message + '\n');
|
|
77
|
+
process.exit(5);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/** Float32 波形 → 16bit PCM WAV Buffer。 */
|
|
81
|
+
function toWav(samples, sampleRate) {
|
|
82
|
+
const dataBytes = samples.length * 2;
|
|
83
|
+
const buf = Buffer.alloc(44 + dataBytes);
|
|
84
|
+
buf.write('RIFF', 0);
|
|
85
|
+
buf.writeUInt32LE(36 + dataBytes, 4);
|
|
86
|
+
buf.write('WAVE', 8);
|
|
87
|
+
buf.write('fmt ', 12);
|
|
88
|
+
buf.writeUInt32LE(16, 16);
|
|
89
|
+
buf.writeUInt16LE(1, 20);
|
|
90
|
+
buf.writeUInt16LE(1, 22);
|
|
91
|
+
buf.writeUInt32LE(sampleRate, 24);
|
|
92
|
+
buf.writeUInt32LE(sampleRate * 2, 28);
|
|
93
|
+
buf.writeUInt16LE(2, 32);
|
|
94
|
+
buf.writeUInt16LE(16, 34);
|
|
95
|
+
buf.write('data', 36);
|
|
96
|
+
buf.writeUInt32LE(dataBytes, 40);
|
|
97
|
+
for (let i = 0; i < samples.length; i += 1) {
|
|
98
|
+
const v = samples[i] < -1 ? -1 : samples[i] > 1 ? 1 : samples[i];
|
|
99
|
+
buf.writeInt16LE(Math.round(v * 32767), 44 + i * 2);
|
|
100
|
+
}
|
|
101
|
+
return buf;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
const defaultSpeed = Number(arg('speed', '1')) || 1;
|
|
105
|
+
const sampleRate = tts.sampleRate;
|
|
106
|
+
|
|
107
|
+
process.stdout.write(JSON.stringify({ ready: true, sampleRate, speakers: 1 }) + '\n');
|
|
108
|
+
|
|
109
|
+
const rl = readline.createInterface({ input: process.stdin });
|
|
110
|
+
rl.on('line', (line) => {
|
|
111
|
+
const text = String(line || '').trim();
|
|
112
|
+
if (!text) return;
|
|
113
|
+
let req;
|
|
114
|
+
try { req = JSON.parse(text); } catch { process.stdout.write(JSON.stringify({ ok: false, error: 'bad-json' }) + '\n'); return; }
|
|
115
|
+
const id = req.id ?? null;
|
|
116
|
+
const content = String(req.text ?? '').slice(0, 300);
|
|
117
|
+
if (!content) { process.stdout.write(JSON.stringify({ id, ok: false, error: 'empty-text' }) + '\n'); return; }
|
|
118
|
+
const speed = Number.isFinite(req.speed) ? Math.max(0.6, Math.min(1.6, req.speed)) : defaultSpeed;
|
|
119
|
+
const t0 = Date.now();
|
|
120
|
+
try {
|
|
121
|
+
const audio = tts.generate({ text: content, sid: 0, speed });
|
|
122
|
+
const wav = toWav(audio.samples, sampleRate);
|
|
123
|
+
process.stdout.write(JSON.stringify({ id, ok: true, sampleRate, wav: wav.toString('base64'), ms: Date.now() - t0 }) + '\n');
|
|
124
|
+
} catch (e) {
|
|
125
|
+
process.stdout.write(JSON.stringify({ id, ok: false, error: String(e && e.message || e) }) + '\n');
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
|
|
129
|
+
rl.on('close', () => process.exit(0));
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* voice/record.js — 宿主侧录音(v0.1 语音输入)。
|
|
3
|
+
*
|
|
4
|
+
* 为什么不在前端录:DSH 的 Electron 只放行 clipboard/notifications 权限,
|
|
5
|
+
* `getUserMedia` 一律被拒且没有弹窗 ⇒ 前端录音必然失败(工单「追加决定 3」)。
|
|
6
|
+
* 所以改成宿主用 ffmpeg 的 dshow 抓麦克风,前端只负责"点一下、等结果"。
|
|
7
|
+
*
|
|
8
|
+
* 依赖注入(判据用假 runFfmpeg,不需要真麦克风):
|
|
9
|
+
* resolveFfmpeg(job) → Promise<string> 来自 lib/media/transcode.js
|
|
10
|
+
* runFfmpeg(ff, args, timeoutMs) → Promise<{ code, stderr }>
|
|
11
|
+
*/
|
|
12
|
+
import { spawn } from 'node:child_process';
|
|
13
|
+
import { closeSync, mkdtempSync, openSync, readFileSync, rmSync, statSync } from 'node:fs';
|
|
14
|
+
import { tmpdir } from 'node:os';
|
|
15
|
+
import { join } from 'node:path';
|
|
16
|
+
|
|
17
|
+
/** 默认参数(工单给的数)。 */
|
|
18
|
+
export const RECORD_DEFAULTS = Object.freeze({
|
|
19
|
+
maxMs: 15000,
|
|
20
|
+
silenceDb: -35,
|
|
21
|
+
silenceMs: 1200,
|
|
22
|
+
sampleRate: 16000,
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* 从 ffmpeg `-list_devices` 的 stderr 里解析音频设备名。
|
|
27
|
+
*
|
|
28
|
+
* 两种输出格式都要认(实测两代 ffmpeg 不一样):
|
|
29
|
+
* ① 老式分段:`DirectShow audio devices` … `"麦克风"` … `DirectShow video devices`
|
|
30
|
+
* ② 新式带类型:`[dshow @ …] "麦克风 (C-Media(R) Audio)" (audio)`
|
|
31
|
+
* —— 本仓自带的 ffmpeg 就是这种,**没有** "DirectShow audio devices" 字样,
|
|
32
|
+
* 只按 ① 解析会得到空列表 ⇒ /record 恒回 no-device(真机踩过)。
|
|
33
|
+
* `Alternative name` 行同样是引号包裹,但它不是设备名,必须排除。
|
|
34
|
+
*/
|
|
35
|
+
export function parseDevices(stderr) {
|
|
36
|
+
const text = String(stderr || '');
|
|
37
|
+
const devices = [];
|
|
38
|
+
const seen = new Set();
|
|
39
|
+
const push = (name) => {
|
|
40
|
+
const clean = String(name || '').trim();
|
|
41
|
+
if (!clean || seen.has(clean)) return;
|
|
42
|
+
seen.add(clean);
|
|
43
|
+
devices.push(clean);
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
// ② 新式:`[dshow @ …] "设备名" (audio|video)` —— 只收 audio
|
|
47
|
+
const typed = /\[dshow[^\]]*\]\s+"([^"]+)"\s+\((audio|video)\)/gi;
|
|
48
|
+
let m;
|
|
49
|
+
while ((m = typed.exec(text)) !== null) {
|
|
50
|
+
if (m[2].toLowerCase() === 'audio') push(m[1]);
|
|
51
|
+
}
|
|
52
|
+
if (devices.length) return devices;
|
|
53
|
+
|
|
54
|
+
// ① 老式:先截出 audio 段,再取引号内容(排除 Alternative name)
|
|
55
|
+
const audioStart = text.search(/DirectShow audio devices/i);
|
|
56
|
+
if (audioStart < 0) return [];
|
|
57
|
+
const section = text.slice(audioStart);
|
|
58
|
+
const end = section.search(/DirectShow video devices/i);
|
|
59
|
+
const body = end >= 0 ? section.slice(0, end) : section;
|
|
60
|
+
const pattern = /^\s*(?:\[[^\]]*\]\s*)?"([^"]+)"/gm;
|
|
61
|
+
while ((m = pattern.exec(body)) !== null) push(m[1]);
|
|
62
|
+
return devices;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/** 优先含 Microphone/麦克风/USB 的设备,否则第一个。 */
|
|
66
|
+
export function pickDevice(devices) {
|
|
67
|
+
const list = Array.isArray(devices) ? devices.filter(Boolean) : [];
|
|
68
|
+
if (!list.length) return null;
|
|
69
|
+
const preferred = list.find((name) => /microphone|麦克风|usb/i.test(name));
|
|
70
|
+
return preferred || list[0];
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* 从 silencedetect 的 stderr 判断"说完了":
|
|
75
|
+
* 先出现 silence_end(用户开口),之后又出现 silence_start(停下来了)⇒ 结束。
|
|
76
|
+
*/
|
|
77
|
+
export function detectSpeechEnd(stderr) {
|
|
78
|
+
const text = String(stderr || '');
|
|
79
|
+
const ends = [...text.matchAll(/silence_end:\s*([0-9.]+)/g)];
|
|
80
|
+
const starts = [...text.matchAll(/silence_start:\s*([0-9.]+)/g)];
|
|
81
|
+
if (!ends.length || !starts.length) return null;
|
|
82
|
+
const lastEnd = Number(ends[ends.length - 1][1]);
|
|
83
|
+
const startAfter = starts.map((m) => Number(m[1])).find((value) => value >= lastEnd);
|
|
84
|
+
return startAfter == null ? null : { speechEnd: lastEnd, silenceStart: startAfter };
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/** 生成 dshow 输入参数(Windows);其它平台没有 dshow,直接报 no-device。 */
|
|
88
|
+
export function dshowArgs(device, options = {}) {
|
|
89
|
+
const opts = { ...RECORD_DEFAULTS, ...options };
|
|
90
|
+
return [
|
|
91
|
+
'-hide_banner', '-y',
|
|
92
|
+
'-f', 'dshow', '-i', `audio=${device}`,
|
|
93
|
+
'-ar', String(opts.sampleRate), '-ac', '1',
|
|
94
|
+
'-t', String(Math.ceil(opts.maxMs / 1000) + 5),
|
|
95
|
+
'-af', `silencedetect=noise=${opts.silenceDb}dB:d=${opts.silenceMs / 1000}`,
|
|
96
|
+
];
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export function createVoiceRecorder(deps) {
|
|
100
|
+
const { resolveFfmpeg, runFfmpeg } = deps || {};
|
|
101
|
+
const probeSize = typeof deps.probeSize === 'function' ? deps.probeSize : (path) => { try { return statSync(path).size; } catch { return 0; } };
|
|
102
|
+
|
|
103
|
+
async function listDevices() {
|
|
104
|
+
const ff = await resolveFfmpeg(null);
|
|
105
|
+
const result = await runFfmpeg(ff, ['-hide_banner', '-list_devices', 'true', '-f', 'dshow', '-i', 'dummy'], 8000);
|
|
106
|
+
return parseDevices(result && result.stderr);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* 录一段:返回 { audioPath, ms, speech }。
|
|
111
|
+
* 失败码:no-device / ffmpeg-missing / timeout / no-speech
|
|
112
|
+
*/
|
|
113
|
+
async function record(options = {}) {
|
|
114
|
+
const opts = { ...RECORD_DEFAULTS, ...options };
|
|
115
|
+
// 非 Windows:没有 dshow,宿主录音不可用(浏览器模式请用前端 getUserMedia 通道)
|
|
116
|
+
if (process.platform !== 'win32') return { ok: false, code: 'unsupported-platform' };
|
|
117
|
+
let devices;
|
|
118
|
+
try {
|
|
119
|
+
devices = await listDevices();
|
|
120
|
+
} catch {
|
|
121
|
+
return { ok: false, code: 'ffmpeg-missing' };
|
|
122
|
+
}
|
|
123
|
+
const preferred = pickDevice(devices);
|
|
124
|
+
if (!preferred) return { ok: false, code: 'no-device' };
|
|
125
|
+
// 跨机器:不同机器的第一个"像麦克风"的设备不一定真能开(被占用/驱动不同)
|
|
126
|
+
// ⇒ 依次尝试最多 3 个音频设备,任一成功即返回。
|
|
127
|
+
const candidates = [preferred, ...devices.filter((d) => d !== preferred)].slice(0, 3);
|
|
128
|
+
let lastCode = 'no-speech';
|
|
129
|
+
for (const device of candidates) {
|
|
130
|
+
const dir = mkdtempSync(join(tmpdir(), 'folia-voice-'));
|
|
131
|
+
const audioPath = join(dir, 'input.wav');
|
|
132
|
+
const startedAt = Date.now();
|
|
133
|
+
let result = null;
|
|
134
|
+
try {
|
|
135
|
+
result = await runFfmpeg(await resolveFfmpeg(null), [...dshowArgs(device, opts), audioPath], opts.maxMs + 8000);
|
|
136
|
+
} catch {
|
|
137
|
+
rmSync(dir, { recursive: true, force: true });
|
|
138
|
+
lastCode = 'ffmpeg-missing';
|
|
139
|
+
continue;
|
|
140
|
+
}
|
|
141
|
+
const ms = Date.now() - startedAt;
|
|
142
|
+
const stderr = String((result && result.stderr) || '');
|
|
143
|
+
if (result && result.code !== 0) {
|
|
144
|
+
// 这个设备打不开(占用/驱动)⇒ 换下一个
|
|
145
|
+
rmSync(dir, { recursive: true, force: true });
|
|
146
|
+
lastCode = 'no-device';
|
|
147
|
+
continue;
|
|
148
|
+
}
|
|
149
|
+
const ended = detectSpeechEnd(stderr);
|
|
150
|
+
if (!ended) {
|
|
151
|
+
rmSync(dir, { recursive: true, force: true });
|
|
152
|
+
lastCode = 'no-speech';
|
|
153
|
+
continue;
|
|
154
|
+
}
|
|
155
|
+
const size = probeSize(audioPath);
|
|
156
|
+
if (!size) { rmSync(dir, { recursive: true, force: true }); lastCode = 'no-speech'; continue; }
|
|
157
|
+
return { ok: true, audioPath, dir, ms, device, speech: ended, audioSeconds: Number((ended.speechEnd || 0).toFixed(2)) };
|
|
158
|
+
}
|
|
159
|
+
return { ok: false, code: lastCode }; }
|
|
160
|
+
|
|
161
|
+
return { listDevices, record };
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* 默认 ffmpeg 解析:环境变量 → 本地缓存(~/.dsh-folia/ffmpeg/ffmpeg.exe,用户已有 77MB 那个)
|
|
166
|
+
* → 系统 PATH。**不触发下载**(工单要求复用现有资产)。
|
|
167
|
+
*/
|
|
168
|
+
export async function defaultResolveFfmpeg() {
|
|
169
|
+
const env = process.env.DSH_FOLIA_FFMPEG;
|
|
170
|
+
if (env && env.trim()) return env.trim();
|
|
171
|
+
const exe = process.platform === 'win32' ? 'ffmpeg.exe' : 'ffmpeg';
|
|
172
|
+
const { existsSync } = await import('node:fs');
|
|
173
|
+
const candidates = [
|
|
174
|
+
join(process.env.USERPROFILE || process.env.HOME || '', '.dsh-folia', 'ffmpeg', exe),
|
|
175
|
+
join(process.env.APPDATA || '', 'dsh-desktop', 'ffmpeg', exe),
|
|
176
|
+
];
|
|
177
|
+
for (const p of candidates) { if (p && existsSync(p)) return p; }
|
|
178
|
+
// 交给 PATH:调用方会用 spawn 试一次,ENOENT 时会明确回 ffmpeg-missing
|
|
179
|
+
return exe;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
/** 默认执行器:spawn + 收集 stderr(silencedetect 的输出在这里),超时强杀。 */
|
|
183
|
+
export function defaultRunFfmpeg(ff, args, timeoutMs = 30000) {
|
|
184
|
+
/**
|
|
185
|
+
* 关键:**stderr 不能走 pipe**。
|
|
186
|
+
* dsh web 跑在 Electron 主进程里,这个受约束的 spawn 上下文里 piped stdio 会失败
|
|
187
|
+
* (本仓 transcode.js 记录过同一现象:piped stdio EPERM / 子进程启动即死),
|
|
188
|
+
* 表现为 ffmpeg 立刻退出 ⇒ record() 误判成 no-device / timeout。
|
|
189
|
+
* 因此 stderr 重定向到临时文件,等进程结束后再读回来解析 silencedetect。
|
|
190
|
+
*/
|
|
191
|
+
return new Promise((resolve) => {
|
|
192
|
+
const errFile = join(tmpdir(), 'folia-ffmpeg-' + process.pid + '-' + Date.now() + '.log');
|
|
193
|
+
let fd = null;
|
|
194
|
+
try { fd = openSync(errFile, 'w'); } catch { fd = null; }
|
|
195
|
+
const child = spawn(ff, args, {
|
|
196
|
+
windowsHide: true,
|
|
197
|
+
detached: true,
|
|
198
|
+
stdio: ['ignore', 'ignore', fd === null ? 'ignore' : fd],
|
|
199
|
+
});
|
|
200
|
+
let settled = false;
|
|
201
|
+
const finish = (code) => {
|
|
202
|
+
if (settled) return;
|
|
203
|
+
settled = true;
|
|
204
|
+
clearTimeout(timer);
|
|
205
|
+
let stderr = '';
|
|
206
|
+
try { stderr = readFileSync(errFile, 'utf8'); } catch { /* ignore */ }
|
|
207
|
+
try { if (fd !== null) closeSync(fd); } catch { /* ignore */ }
|
|
208
|
+
try { rmSync(errFile, { force: true }); } catch { /* ignore */ }
|
|
209
|
+
resolve({ code, stderr });
|
|
210
|
+
};
|
|
211
|
+
const timer = setTimeout(() => {
|
|
212
|
+
if (child.pid !== undefined) { try { child.kill(); } catch { /* ignore */ } }
|
|
213
|
+
}, timeoutMs);
|
|
214
|
+
child.on('error', () => finish(-1));
|
|
215
|
+
child.on('close', (code) => finish(code));
|
|
216
|
+
});
|
|
217
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-folia",
|
|
3
|
-
"version": "4.26.0-pre.
|
|
3
|
+
"version": "4.26.0-pre.21",
|
|
4
4
|
"description": "DSH 壁纸引擎:本机 WE 壁纸实时渲染,视频/网页/开机动画/桌宠皮肤,一键拉取在线素材。",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -45,6 +45,10 @@
|
|
|
45
45
|
"lib/client.js",
|
|
46
46
|
"lib/pet-chat-memory.js",
|
|
47
47
|
"lib/pet-chat-proactive.js",
|
|
48
|
+
"lib/voice/record.js",
|
|
49
|
+
"lib/asr/asr-local.js",
|
|
50
|
+
"lib/asr/asr-worker.cjs",
|
|
51
|
+
"lib/tts/tts-worker.cjs",
|
|
48
52
|
"lib/routes/pet-chat.js",
|
|
49
53
|
"lib/download-queue.js",
|
|
50
54
|
"lib/host-boot.js",
|