diff --git a/enjoy/src/constants.ts b/enjoy/src/constants.ts
index 2ce6097a6..df6c29701 100644
--- a/enjoy/src/constants.ts
+++ b/enjoy/src/constants.ts
@@ -406,7 +406,7 @@ export const IPA_MAPPING: { [key: string]: string } = {
ʐ: "z",
ç: "",
ʝ: "j",
- x: "h",
+ x: "k",
ɣ: "g",
χ: "h",
ʁ: "r",
@@ -420,7 +420,7 @@ export const IPA_MAPPING: { [key: string]: string } = {
ʈʃ: "tʃ",
dʒ: "dʒ",
ʋ: "v",
- ɹ: "ɹ",
+ ɹ: "r",
ɻ: "r",
j: "j",
ɰ: "w",
@@ -437,40 +437,40 @@ export const IPA_MAPPING: { [key: string]: string } = {
ɪ: "ɪ",
ʏ: "ɪ",
ʊ: "ʊ",
- ɨ: "ɪ",
- ᵻ: "ɪ",
+ ɨ: "i",
+ ᵻ: "i:",
e: "e",
ø: "e",
ɘ: "ə",
ɵ: "ə",
- ɤ: "ɒ",
+ ɤ: "ɑː",
o: "o",
ə: "ə",
oː: "oː",
- ɛ: "ɛ",
+ ɛ: "e",
œ: "æ",
- ɜ: "ɜ",
+ ɜ: "ɝ",
ɞ: "əː",
ʌ: "ʌ",
ɔ: "ɔ",
- ɜː: "əː",
+ ɜː: "ɝː",
uː: "uː",
ɔː: "ɔː",
- ɛː: "ɛ:",
+ ɛː: "e:",
æ: "æ",
a: "ɑ",
ɶ: "ɑ",
ɐ: "ə",
ɑ: "ɑ",
- ɒ: "ɒ",
+ ɒ: "ɑː",
ɑː: "ɑː",
"◌˞": "",
ɚ: "ɚ",
ɝ: "ɝ",
ɹ̩: "r",
eɪ: "eɪ",
- əʊ: "əʊ",
- oʊ: "əʊ",
+ əʊ: "oʊ",
+ oʊ: "oʊ",
aɪ: "aɪ",
ɔɪ: "ɔɪ",
aʊ: "aʊ",
@@ -478,17 +478,17 @@ export const IPA_MAPPING: { [key: string]: string } = {
ɜr: "ɜr",
ɑr: "ɑr",
ɔr: "ɔr",
- oʊr: "əʊr",
- oːɹ: "ɔːɹ",
+ oʊr: "oʊr",
+ oːɹ: "ɔːr",
ir: "ir",
- ɪɹ: "ɪɹ",
- ɔːɹ: "ɔːɹ",
- ɑːɹ: "ɑːɹ",
- ʊɹ: "ʊɹ",
- ʊr: "ʊɹ",
- ɛr: "ɛr",
- ɛɹ: "ɛɹ",
+ ɪɹ: "ɪr",
+ ɔːɹ: "ɔːr",
+ ɑːɹ: "ɑːr",
+ ʊɹ: "ʊr",
+ ʊr: "ʊr",
+ ɛr: "er",
+ ɛɹ: "er",
əl: "ə",
aɪɚ: "aɪ",
- aɪə: "aɪ",
+ aɪə: "aɪə",
};
diff --git a/enjoy/src/i18n/en.json b/enjoy/src/i18n/en.json
index bcb440c08..bd124b26e 100644
--- a/enjoy/src/i18n/en.json
+++ b/enjoy/src/i18n/en.json
@@ -510,5 +510,6 @@
"translateSetence": "translate setenece",
"reTranslate": "re-translate",
"analyzeSetence": "analyze setenece",
+ "useAIAssistantToAnalyze": "Use AI assistant to analyze",
"reAnalyze": "re-analyze"
}
diff --git a/enjoy/src/i18n/zh-CN.json b/enjoy/src/i18n/zh-CN.json
index 86dc42f51..5019e240b 100644
--- a/enjoy/src/i18n/zh-CN.json
+++ b/enjoy/src/i18n/zh-CN.json
@@ -509,5 +509,6 @@
"translateSetence": "整句翻译",
"reTranslate": "重新翻译",
"analyzeSetence": "分析句子",
+ "useAIAssistantToAnalyze": "使用智能助手分析",
"reAnalyze": "重新分析"
}
diff --git a/enjoy/src/renderer/components/audios/audio-player.tsx b/enjoy/src/renderer/components/audios/audio-player.tsx
index ae75b6a1b..e8378323f 100644
--- a/enjoy/src/renderer/components/audios/audio-player.tsx
+++ b/enjoy/src/renderer/components/audios/audio-player.tsx
@@ -24,7 +24,7 @@ export const AudioPlayer = (props: { id?: string; md5?: string }) => {
return (
-
+
diff --git a/enjoy/src/renderer/components/conversations/conversation-shortcuts.tsx b/enjoy/src/renderer/components/conversations/conversation-shortcuts.tsx
index bec0de44a..2e0aed8eb 100644
--- a/enjoy/src/renderer/components/conversations/conversation-shortcuts.tsx
+++ b/enjoy/src/renderer/components/conversations/conversation-shortcuts.tsx
@@ -24,6 +24,7 @@ import { useNavigate } from "react-router-dom";
export const ConversationShortcuts = (props: {
trigger: React.ReactNode;
+ title?: string;
open?: boolean;
onOpenChange?: (open: boolean) => void;
prompt: string;
@@ -32,6 +33,7 @@ export const ConversationShortcuts = (props: {
}) => {
const { EnjoyApp } = useContext(AppSettingsProviderContext);
const {
+ title,
prompt,
onReply,
excludedIds = [],
@@ -196,7 +198,7 @@ export const ConversationShortcuts = (props: {
{trigger}
- {t("sendToAIAssistant")}
+ {title || t("sendToAIAssistant")}
{dialogContent()}
diff --git a/enjoy/src/renderer/components/medias/media-caption.tsx b/enjoy/src/renderer/components/medias/media-caption.tsx
index fd5fbb15d..62b1f4be1 100644
--- a/enjoy/src/renderer/components/medias/media-caption.tsx
+++ b/enjoy/src/renderer/components/medias/media-caption.tsx
@@ -282,8 +282,8 @@ export const MediaCaption = () => {
return (
-
-
+
+
{/* use the words splitted by caption text if it is matched with the timeline length, otherwise use the timeline */}
{caption.text.split(" ").length !== caption.timeline.length
? (caption.timeline || []).map((w, index) => (
@@ -300,10 +300,12 @@ export const MediaCaption = () => {
onClick={() => toggleRegion(index)}
>
-
{w.text}
+
+ {w.text}
+
{displayIpa && (
{
onClick={() => toggleRegion(index)}
>
-
{word}
+
+ {word}
+
{displayIpa && (
{
variant={displayIpa ? "secondary" : "outline"}
size="icon"
className="rounded-full w-8 h-8 p-0"
- data-tooltip-id="media-player-controls-tooltip"
+ data-tooltip-id="media-player-tooltip"
data-tooltip-content={t("displayIpa")}
onClick={() => setDisplayIpa(!displayIpa)}
>
+
+
{
copyToClipboard(caption.text);
@@ -396,7 +405,7 @@ export const MediaCaption = () => {
) : (
@@ -549,12 +558,8 @@ const CaptionTabs = (props: {
}, [caption]);
return (
- setTab(value)}
- className="border rounded-lg"
- >
-
+ setTab(value)} className="">
+
{t("captionTabs.selected")}
{t("captionTabs.translation")}
@@ -563,7 +568,7 @@ const CaptionTabs = (props: {
{t("captionTabs.note")}
-
+
{selectedIndices.length > 0 ? (
<>
@@ -631,7 +636,7 @@ const CaptionTabs = (props: {
>
) : (
-
+
{t("clickAnyWordToSelect")}
)}
@@ -640,7 +645,11 @@ const CaptionTabs = (props: {
{translation ? (
<>
-
+
+ {translation}
+
+
+
-
- {translation}
-
>
) : (
@@ -676,7 +682,24 @@ const CaptionTabs = (props: {
{analysisResult ? (
<>
-
+
{children};
+ },
+ }}
+ >
+ {analysisResult}
+
+
+
-
{children};
- },
- }}
- >
- {analysisResult}
-
>
) : (
@@ -729,6 +737,7 @@ const CaptionTabs = (props: {
setAnalysisResult(result);
EnjoyApp.cacheObjects.set(`analyze-${hash}`, result);
}}
+ tooltip={t("useAIAssistantToAnalyze")}
/>
)}
@@ -746,9 +755,10 @@ const CaptionTabs = (props: {
const AIButton = (props: {
prompt: string;
- onReply: (replies: MessageType[]) => void;
+ onReply?: (replies: MessageType[]) => void;
+ tooltip: string;
}) => {
- const { prompt, onReply } = props;
+ const { prompt, onReply, tooltip } = props;
const [asking, setAsking] = useState
(false);
return (
-
+
}
/>
diff --git a/enjoy/src/renderer/components/medias/media-current-recording.tsx b/enjoy/src/renderer/components/medias/media-current-recording.tsx
index a5a61900f..7e92bd929 100644
--- a/enjoy/src/renderer/components/medias/media-current-recording.tsx
+++ b/enjoy/src/renderer/components/medias/media-current-recording.tsx
@@ -448,7 +448,7 @@ export const MediaCurrentRecording = (props: { height?: number }) => {
variant="default"
size="icon"
id="recording-play-or-pause-button"
- data-tooltip-id="media-player-controls-tooltip"
+ data-tooltip-id="media-player-tooltip"
data-tooltip-content={t("playRecording")}
className="rounded-full w-8 h-8 p-0"
onClick={() => {
@@ -478,7 +478,7 @@ export const MediaCurrentRecording = (props: { height?: number }) => {
{
setIsSelectingRegion(!isSelectingRegion)}
@@ -502,7 +502,7 @@ export const MediaCurrentRecording = (props: { height?: number }) => {
@@ -599,7 +599,7 @@ export const MediaRecordButton = (props: {
variant="ghost"
onClick={() => setIsRecording(!isRecording)}
id="media-record-button"
- data-tooltip-id="media-player-controls-tooltip"
+ data-tooltip-id="media-player-tooltip"
data-tooltip-content={
isRecording ? t("stopRecording") : t("startRecording")
}
diff --git a/enjoy/src/renderer/components/medias/media-player-controls.tsx b/enjoy/src/renderer/components/medias/media-player-controls.tsx
index 75e80a861..d1182fb93 100644
--- a/enjoy/src/renderer/components/medias/media-player-controls.tsx
+++ b/enjoy/src/renderer/components/medias/media-player-controls.tsx
@@ -26,11 +26,9 @@ import {
SkipBackIcon,
SaveIcon,
UndoIcon,
- TextCursorInputIcon,
GroupIcon,
} from "lucide-react";
import { t } from "i18next";
-import { Tooltip } from "react-tooltip";
import { useHotkeys } from "react-hotkeys-hook";
import cloneDeep from "lodash/cloneDeep";
import debounce from "lodash/debounce";
@@ -464,7 +462,7 @@ export const MediaPlayerControls = () => {
@@ -502,7 +500,7 @@ export const MediaPlayerControls = () => {
@@ -541,7 +539,7 @@ export const MediaPlayerControls = () => {
size="lg"
onClick={onPrev}
id="media-play-previous-button"
- data-tooltip-id="media-player-controls-tooltip"
+ data-tooltip-id="media-player-tooltip"
data-tooltip-content={t("playPreviousSegment")}
className="aspect-square p-0 h-10"
>
@@ -553,7 +551,7 @@ export const MediaPlayerControls = () => {
variant="default"
onClick={debouncedPlayOrPause}
id="media-play-or-pause-button"
- data-tooltip-id="media-player-controls-tooltip"
+ data-tooltip-id="media-player-tooltip"
data-tooltip-content={t("pause")}
className="aspect-square p-0 h-12 rounded-full"
>
@@ -564,7 +562,7 @@ export const MediaPlayerControls = () => {
variant="default"
onClick={debouncedPlayOrPause}
id="media-play-or-pause-button"
- data-tooltip-id="media-player-controls-tooltip"
+ data-tooltip-id="media-player-tooltip"
data-tooltip-content={t("play")}
className="aspect-square p-0 h-12 rounded-full"
>
@@ -577,7 +575,7 @@ export const MediaPlayerControls = () => {
size="lg"
onClick={onNext}
id="media-play-next-button"
- data-tooltip-id="media-player-controls-tooltip"
+ data-tooltip-id="media-player-tooltip"
data-tooltip-content={t("playNextSegment")}
className="aspect-square p-0 h-10"
>
@@ -587,7 +585,7 @@ export const MediaPlayerControls = () => {
setGrouping(!grouping)}
@@ -598,7 +596,7 @@ export const MediaPlayerControls = () => {
{
{
setEditingRegion(false);
@@ -627,7 +625,7 @@ export const MediaPlayerControls = () => {
{
if (!transcriptionDraft) return;
@@ -648,8 +646,6 @@ export const MediaPlayerControls = () => {
)}
-
-
);
};
diff --git a/enjoy/src/renderer/components/medias/media-player.tsx b/enjoy/src/renderer/components/medias/media-player.tsx
index 9b93c9e19..1b3ed498b 100644
--- a/enjoy/src/renderer/components/medias/media-player.tsx
+++ b/enjoy/src/renderer/components/medias/media-player.tsx
@@ -158,7 +158,7 @@ export const MediaPlayer = () => {
{
@@ -174,7 +174,7 @@ export const MediaPlayer = () => {
1.0 ? "secondary" : "outline"}`}
- data-tooltip-id="media-player-controls-tooltip"
+ data-tooltip-id="media-player-tooltip"
data-tooltip-content={t("zoomIn")}
className="relative aspect-square rounded-full p-0 h-8"
onClick={() => {
@@ -191,7 +191,7 @@ export const MediaPlayer = () => {
{
@@ -208,7 +208,7 @@ export const MediaPlayer = () => {
{
@@ -227,7 +227,7 @@ export const MediaPlayer = () => {
diff --git a/enjoy/src/renderer/context/media-player-provider.tsx b/enjoy/src/renderer/context/media-player-provider.tsx
index 612f262ae..3afd49317 100644
--- a/enjoy/src/renderer/context/media-player-provider.tsx
+++ b/enjoy/src/renderer/context/media-player-provider.tsx
@@ -10,6 +10,7 @@ import Chart from "chart.js/auto";
import { TimelineEntry } from "echogarden/dist/utilities/Timeline.d.js";
import { IPA_MAPPING } from "@/constants";
import { toast } from "@renderer/components/ui";
+import { Tooltip } from "react-tooltip";
type MediaPlayerContextType = {
media: AudioType | VideoType;
@@ -437,48 +438,51 @@ export const MediaPlayerProvider = ({
}, [media, ref, mediaProvider]);
return (
-
- {children}
-
+ <>
+
+ {children}
+
+
+ >
);
};