improve transcript pre-process

This commit is contained in:
an-lee
2024-03-29 08:43:39 +08:00
parent 0e72cac85d
commit e27d508687

View File

@@ -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: '-',