From e27d5086872a1ad8eb25af70d1f6d83d1cd7dd63 Mon Sep 17 00:00:00 2001 From: an-lee Date: Fri, 29 Mar 2024 08:43:39 +0800 Subject: [PATCH] improve transcript pre-process --- enjoy/src/renderer/hooks/use-transcriptions.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/enjoy/src/renderer/hooks/use-transcriptions.tsx b/enjoy/src/renderer/hooks/use-transcriptions.tsx index 3972c3b9..23be3764 100644 --- a/enjoy/src/renderer/hooks/use-transcriptions.tsx +++ b/enjoy/src/renderer/hooks/use-transcriptions.tsx @@ -118,7 +118,7 @@ export const useTranscriptions = (media: AudioType | VideoType) => { const match = word?.match(/-|%/); if (!match) return; - if (word === '-') { + if (word === '-' && token.text.toLowerCase() === words[j + 1]?.trim()?.toLowerCase()) { sentence.timeline.splice(j, 0, { type: 'token', text: '-',