feat: 新增MAC微信发送消息 文字转语音 功能

This commit is contained in:
Wxw-Gu committed 2026-08-17 18:16:14 +08:00
1 parent 9b7f5114bd
commit 4058a817dd
48 files changed
+7240 -22

No files matched your search

+2 -2
View File
@@ -74,12 +74,12 @@ export class SilkAudioDecoder implements VoiceAudioDecoder {
decode?: (data: Buffer, sampleRate: number) => Promise<{ data: Uint8Array }>
}
if (!silkWasm.decode) throw new Error('silk-wasm 运行时无效')
const result = await silkWasm.decode(source.data, 24000)
const result = await silkWasm.decode(source.data, 16000)
const pcm = Buffer.from(result.data)
if (!pcm.length) throw new Error('Silk 解码结果为空')
return {
pcm,
sampleRate: 24000,
sampleRate: 16000,
channels: 1,
sourceHash: source.sourceHash
}