mirror of
https://wget.la/https://github.com/Wxw-Gu/WechatExplorer
synced 2026-12-01 09:15:41 +08:00
feat: 新增MAC微信发送消息 文字转语音 功能
This commit is contained in:
1 parent
9b7f5114bd
commit
4058a817dd
48 files changed
+7240
-22
No files matched your search
@@ -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
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user