feat: 一些非常帅气的优化

This commit is contained in:
cc
2026-02-01 22:56:43 +08:00
committed by xuncha
parent 123a088a39
commit f90822694f
27 changed files with 563 additions and 191 deletions

View File

@@ -224,12 +224,12 @@ export class VoiceTranscribeService {
let finalTranscript = ''
worker.on('message', (msg: any) => {
console.log('[VoiceTranscribe] Worker 消息:', msg)
if (msg.type === 'partial') {
onPartial?.(msg.text)
} else if (msg.type === 'final') {
finalTranscript = msg.text
console.log('[VoiceTranscribe] 最终文本:', finalTranscript)
resolve({ success: true, transcript: finalTranscript })
worker.terminate()
} else if (msg.type === 'error') {