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)} > + +
-
- {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 }) => {
- -
); }; 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 = () => {