mirror of
https://github.com/hicccc77/WeFlow.git
synced 2026-03-25 07:16:51 +00:00
feat: 一些非常帅气的优化
This commit is contained in:
@@ -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') {
|
||||
|
||||
Reference in New Issue
Block a user