diff --git a/enjoy/src/renderer/components/medias/media-caption-tabs.tsx b/enjoy/src/renderer/components/medias/media-caption-tabs.tsx index 2da381d7..baaab66e 100644 --- a/enjoy/src/renderer/components/medias/media-caption-tabs.tsx +++ b/enjoy/src/renderer/components/medias/media-caption-tabs.tsx @@ -193,22 +193,26 @@ const SelectedTabContent = (props: {
{word.text}
-
- 0 && ( +
+ - {word.timeline - .map((t) => - t.timeline.map((s) => convertIpaToNormal(s.text)).join("") - ) - .join("")} - -
+ ? "after:content-['/']" + : "" + }`} + > + {word.timeline + .map((t) => + t.timeline.map((s) => convertIpaToNormal(s.text)).join("") + ) + .join("")} +
+
+ ) + } ); })} diff --git a/enjoy/src/renderer/hooks/use-transcriptions.tsx b/enjoy/src/renderer/hooks/use-transcriptions.tsx index 2d07276d..3972c3b9 100644 --- a/enjoy/src/renderer/hooks/use-transcriptions.tsx +++ b/enjoy/src/renderer/hooks/use-transcriptions.tsx @@ -118,6 +118,17 @@ export const useTranscriptions = (media: AudioType | VideoType) => { const match = word?.match(/-|%/); if (!match) return; + if (word === '-') { + sentence.timeline.splice(j, 0, { + type: 'token', + text: '-', + startTime: sentence.timeline[j - 1].endTime, + endTime: token.startTime, + timeline: [], + }) + return; + } + for (let k = j + 1; k <= sentence.timeline.length - 1; k++) { if (word.includes(sentence.timeline[k].text.toLowerCase())) { let connector = "";