AI-native knowledge base & Evernote/Obsidian alternative with instant sync & native MCP. Free on Cloudflare or self-hosted via Docker.
HTML ai-agentcloudflarecloudflare-d1cloudflare-r2cloudflare-workersdockerelectronevernoteevernote-alternativeknowledge-basemcpnote-takingobsidian-alternativeoffline-firstpersonal-knowledge-basepwaself-hostedsqlitetiptapweb-clipper
feat(web): show transcription inline below media attachments
tianma-if27f3ce77494a
diff --git a/apps/web/src/components/EditorPane.tsx b/apps/web/src/components/EditorPane.tsxindex 4d332647..e8b7c11b 100644--- a/apps/web/src/components/EditorPane.tsx+++ b/apps/web/src/components/EditorPane.tsx@@ -103,7 +103,6 @@ import { sanitizeAndScopeCss } from "@/lib/css-sandbox";import { RevisionHistoryDialog } from "./dialogs/RevisionHistoryDialog";import { ExternalLinkDialog } from "./dialogs/ExternalLinkDialog";import { MathFormulaDialog } from "./dialogs/MathFormulaDialog";-import { AttachmentTranscriptDialog } from "./dialogs/AttachmentTranscriptDialog";import { SpeechProviderReachabilityError } from "@/lib/speech-transcription-error";import {applyMathFormula,@@ -285,7 +284,8 @@ import {type ResourceDialogState,type ResourceMenuTarget,} from "./editor/useEditorResourceActions";-import { removeAttachmentAt, renameAttachmentAt } from "./editor/attachment-editor-range";+import { insertTranscriptAfterAttachment, removeAttachmentAt, renameAttachmentAt } from "./editor/attachment-editor-range";+import { AttachmentTranscriptContext, type AttachmentTranscript, type AttachmentTranscriptContextValue } from "./editor/AttachmentTranscriptContext";import {createLocalEditSession,focusMobilePlainTextElement,@@ -498,14 +498,7 @@ const RichEditorPane = ({canRemove: false,});const [mathFormulaOpen, setMathFormulaOpen] = useState(false);- const [attachmentTranscript, setAttachmentTranscript] = useState<{- memoId: string;- filename: string;- text: string;- loading: boolean;- completedSegments: number;- error: string | null;- } | null>(null);+ const [attachmentTranscript, setAttachmentTranscript] = useState<AttachmentTranscript | null>(null);const attachmentTranscriptAbortRef = useRef<AbortController | null>(null);const [mathFormulaDraft, setMathFormulaDraft] = useState<MathFormulaDraft | null>(null);const {@@ -1828,12 +1821,13 @@ const RichEditorPane = ({useEffect(() => {setNoteLinkHintPosition(null);resetResourceActions();+ setAttachmentTranscript(null);}, [memo?.id, isMarkdownMode, resetResourceActions]);useEffect(() => () => {attachmentTranscriptAbortRef.current?.abort();attachmentTranscriptAbortRef.current = null;- }, [memo?.id]);+ }, [memo?.id, isMarkdownMode]);useEffect(() => () => {if (resourceMenuHideTimerRef.current !== null) {@@ -3132,27 +3126,45 @@ const RichEditorPane = ({const handleResourceTranscribe = useCallback(async (target: ResourceMenuTarget) => {const currentMemoId = memoRef.current?.id;- if (!currentMemoId || !target.resourceId) return;+ if (!currentMemoId || target.kind !== "attachment" || !target.resourceId) return;attachmentTranscriptAbortRef.current?.abort();const controller = new AbortController();attachmentTranscriptAbortRef.current = controller;hideResourceMenu();- setAttachmentTranscript({ memoId: currentMemoId, filename: target.filename, text: "", loading: true, completedSegments: 0, error: null });+ setAttachmentTranscript({ memoId: currentMemoId, target, text: "", loading: true, completedSegments: 0, error: null });try {const { transcribeNoteResource } = await import("@/lib/transcribe-note-resource");const result = await transcribeNoteResource(currentMemoId, target.resourceId, controller.signal, (completedSegments) => {if (attachmentTranscriptAbortRef.current !== controller) return;- setAttachmentTranscript((current) => current?.memoId === currentMemoId && current.filename === target.filename+ setAttachmentTranscript((current) => current?.memoId === currentMemoId && current.target.element === target.element? { ...current, completedSegments }: current);});if (attachmentTranscriptAbortRef.current !== controller) return;- setAttachmentTranscript((current) => current?.memoId === currentMemoId && current.filename === target.filename- ? { ...current, text: result.text, loading: false }+ const activeEditor = editorRef.current;+ if (result.text.trim() && activeEditor?.isEditable && memoRef.current?.id === currentMemoId) {+ try {+ if (insertTranscriptAfterAttachment(+ activeEditor,+ target,+ result.text,+ t("speechTranscription.resultTitle"),+ target.element,+ )) {+ setAttachmentTranscript(null);+ return;+ }+ } catch {+ // Keep the recognized text available in the inline card if insertion fails.+ }+ }+ setAttachmentTranscript((current) => current?.memoId === currentMemoId && current.target.element === target.element+ ? { ...current, text: result.text, loading: false,+ error: result.text.trim() ? null : t("speechTranscription.recognizeFailed") }: current);} catch (error) {if (attachmentTranscriptAbortRef.current !== controller || controller.signal.aborted) return;- setAttachmentTranscript((current) => current?.memoId === currentMemoId && current.filename === target.filename+ setAttachmentTranscript((current) => current?.memoId === currentMemoId && current.target.element === target.element? { ...current, loading: false, error: error instanceof SpeechProviderReachabilityError? t(error.platform === "browser"? "speechTranscription.browserDirectUnavailable" : "speechTranscription.desktopDirectUnavailable")@@ -3163,6 +3175,38 @@ const RichEditorPane = ({}}, [hideResourceMenu, t]);+ const dismissAttachmentTranscript = useCallback(() => {+ attachmentTranscriptAbortRef.current?.abort();+ attachmentTranscriptAbortRef.current = null;+ setAttachmentTranscript(null);+ }, []);++ const retryAttachmentTranscript = useCallback(() => {+ if (attachmentTranscript) void handleResourceTranscribe(attachmentTranscript.target);+ }, [attachmentTranscript, handleResourceTranscribe]);++ const insertAttachmentTranscript = useCallback(() => {+ const activeEditor = editorRef.current;+ if (!activeEditor?.isEditable || !attachmentTranscript?.text ||+ attachmentTranscript.memoId !== memoRef.current?.id) return;+ if (insertTranscriptAfterAttachment(+ activeEditor,+ attachmentTranscript.target,+ attachmentTranscript.text,+ t("speechTranscription.resultTitle"),+ attachmentTranscript.target.element,+ )) setAttachmentTranscript(null);+ }, [attachmentTranscript, t]);++ const attachmentTranscriptContext = useMemo<AttachmentTranscriptContextValue>(() => ({+ transcript: attachmentTranscript?.memoId === memo?.id ? attachmentTranscript : null,+ canInsert: Boolean(editor?.isEditable && !effectiveReadOnly && !useMarkdownSourceEditor && !useMobilePlainTextEditor),+ onDismiss: dismissAttachmentTranscript,+ onRetry: retryAttachmentTranscript,+ onInsert: insertAttachmentTranscript,+ }), [attachmentTranscript, dismissAttachmentTranscript, editor?.isEditable, effectiveReadOnly,+ insertAttachmentTranscript, memo?.id, retryAttachmentTranscript, useMarkdownSourceEditor, useMobilePlainTextEditor]);+const handleResourceSaveAs = useCallback(async (target: ResourceMenuTarget) => {hideResourceMenu();clearResourceActionError();@@ -4338,7 +4382,9 @@ const RichEditorPane = ({onAsk={() => requestSelectionAi("ask")}/></BubbleMenu>- <EditorContent editor={editor} />+ <AttachmentTranscriptContext.Provider value={attachmentTranscriptContext}>+ <EditorContent editor={editor} />+ </AttachmentTranscriptContext.Provider></div>)}</div>@@ -4414,32 +4460,6 @@ const RichEditorPane = ({/>)}- <AttachmentTranscriptDialog- open={Boolean(attachmentTranscript && attachmentTranscript.memoId === memo?.id)}- filename={attachmentTranscript?.filename ?? ""}- text={attachmentTranscript?.text ?? ""}- loading={attachmentTranscript?.loading ?? false}- completedSegments={attachmentTranscript?.completedSegments ?? 0}- error={attachmentTranscript?.error ?? null}- canInsert={Boolean(editor && editor.isEditable && !effectiveReadOnly && !useMarkdownSourceEditor && !useMobilePlainTextEditor)}- onOpenChange={(open) => {- if (!open) {- attachmentTranscriptAbortRef.current?.abort();- attachmentTranscriptAbortRef.current = null;- setAttachmentTranscript(null);- }- }}- onInsert={() => {- if (!editor || !attachmentTranscript?.text || attachmentTranscript.memoId !== memo?.id) return;- const paragraphs = attachmentTranscript.text.split(/\n+/).map((line) => line.trim()).filter(Boolean);- editor.chain().focus().insertContentAt(editor.state.doc.content.size, [- { type: "heading", attrs: { level: 2 }, content: [{ type: "text", text: t("speechTranscription.resultTitle") }] },- ...paragraphs.map((line) => ({ type: "paragraph", content: [{ type: "text", text: line }] })),- ]).run();- setAttachmentTranscript(null);- }}- />-<EditorResourceDialogsdialog={resourceDialog}labels={resourceDialogLabels}diff --git a/apps/web/src/components/dialogs/AttachmentTranscriptDialog.tsx b/apps/web/src/components/dialogs/AttachmentTranscriptDialog.tsxdeleted file mode 100644index d25a3608..00000000--- a/apps/web/src/components/dialogs/AttachmentTranscriptDialog.tsx+++ /dev/null@@ -1,56 +0,0 @@-import { useState } from "react";-import { useTranslation } from "react-i18next";-import { Button } from "@/components/ui/button";-import { Dialog, DialogContent, DialogHeader, DialogTitle } from "@/components/ui/dialog";--export const AttachmentTranscriptDialog = ({- open,- filename,- text,- loading,- completedSegments,- error,- canInsert,- onOpenChange,- onInsert,-}: {- open: boolean;- filename: string;- text: string;- loading: boolean;- completedSegments: number;- error: string | null;- canInsert: boolean;- onOpenChange: (open: boolean) => void;- onInsert: () => void;-}) => {- const { t } = useTranslation();- const [copied, setCopied] = useState(false);- return (- <Dialog open={open} onOpenChange={onOpenChange}>- <DialogContent className="max-h-[85vh] max-w-2xl overflow-y-auto">- <DialogHeader>- <DialogTitle>{t("speechTranscription.resultTitle")}</DialogTitle>- </DialogHeader>- <p className="break-all text-xs text-slate-500">{filename}</p>- {loading ? <p className="text-sm" role="status">{completedSegments > 0- ? t("speechTranscription.recognizingProgress", { count: completedSegments })- : t("speechTranscription.recognizing")}</p> : null}- {error ? <p className="text-sm text-rose-600" role="alert">{error}</p> : null}- {text ? (- <>- <p className="text-xs text-slate-500">{t("speechTranscription.attachmentNotice")}</p>- <textarea className="max-h-[45vh] min-h-48 w-full resize-y rounded-md border border-slate-200 bg-card p-3 text-sm" readOnly value={text} aria-label={t("speechTranscription.resultTitle")} />- <div className="flex justify-end gap-2">- <Button type="button" variant="outline" onClick={async () => {- await navigator.clipboard.writeText(text);- setCopied(true);- }}>{t(copied ? "speechTranscription.copied" : "speechTranscription.copy")}</Button>- {canInsert ? <Button type="button" onClick={onInsert}>{t("speechTranscription.insertIntoNote")}</Button> : null}- </div>- </>- ) : null}- </DialogContent>- </Dialog>- );-};diff --git a/apps/web/src/components/editor/AttachmentTranscriptContext.ts b/apps/web/src/components/editor/AttachmentTranscriptContext.tsnew file mode 100644index 00000000..22c113ab--- /dev/null+++ b/apps/web/src/components/editor/AttachmentTranscriptContext.ts@@ -0,0 +1,21 @@+import { createContext } from "react";+import type { AttachmentMenuTarget } from "./useEditorResourceActions";++export type AttachmentTranscript = {+ memoId: string;+ target: AttachmentMenuTarget;+ text: string;+ loading: boolean;+ completedSegments: number;+ error: string | null;+};++export type AttachmentTranscriptContextValue = {+ transcript: AttachmentTranscript | null;+ canInsert: boolean;+ onDismiss: () => void;+ onRetry: () => void;+ onInsert: () => void;+};++export const AttachmentTranscriptContext = createContext<AttachmentTranscriptContextValue | null>(null);diff --git a/apps/web/src/components/editor/AttachmentTranscriptInline.tsx b/apps/web/src/components/editor/AttachmentTranscriptInline.tsxnew file mode 100644index 00000000..df0b75b8--- /dev/null+++ b/apps/web/src/components/editor/AttachmentTranscriptInline.tsx@@ -0,0 +1,61 @@+import { useEffect, useState } from "react";+import { LoaderCircle, X } from "lucide-react";+import { useTranslation } from "react-i18next";+import { Button } from "@/components/ui/button";+import type { AttachmentTranscriptContextValue } from "./AttachmentTranscriptContext";++export const AttachmentTranscriptInline = ({+ transcript,+ canInsert,+ onDismiss,+ onRetry,+ onInsert,+}: AttachmentTranscriptContextValue & { transcript: NonNullable<AttachmentTranscriptContextValue["transcript"]> }) => {+ const { t } = useTranslation();+ const [copied, setCopied] = useState(false);++ useEffect(() => setCopied(false), [transcript.text]);++ return (+ <span+ className="mt-3 flex w-full flex-col gap-3 rounded-xl border border-slate-200 bg-card p-4 shadow-sm"+ data-edgeever-attachment-transcript+ contentEditable={false}+ >+ <span className="flex items-center justify-between gap-3">+ <span className="text-sm font-semibold text-slate-800">{t("speechTranscription.resultTitle")}</span>+ <Button type="button" size="icon" variant="ghost" className="h-7 w-7" aria-label={t("common.close")} onClick={onDismiss}>+ <X className="h-4 w-4" />+ </Button>+ </span>+ {transcript.loading ? (+ <span className="flex items-center gap-2 text-sm text-slate-600" role="status">+ <LoaderCircle className="h-4 w-4 animate-spin" aria-hidden="true" />+ {transcript.completedSegments > 0+ ? t("speechTranscription.recognizingProgress", { count: transcript.completedSegments })+ : t("speechTranscription.recognizing")}+ </span>+ ) : null}+ {transcript.error ? (+ <span className="flex flex-wrap items-center justify-between gap-2 text-sm text-rose-600" role="alert">+ <span>{transcript.error}</span>+ <Button type="button" size="sm" variant="outline" onClick={onRetry}>{t("speechTranscription.retry")}</Button>+ </span>+ ) : null}+ {transcript.text ? (+ <>+ <span className="max-h-80 overflow-y-auto whitespace-pre-wrap break-words text-sm leading-6 text-slate-800" aria-label={t("speechTranscription.resultTitle")}>+ {transcript.text}+ </span>+ <span className="flex flex-wrap justify-end gap-2">+ <Button type="button" size="sm" variant="outline" onClick={async () => {+ await navigator.clipboard.writeText(transcript.text);+ setCopied(true);+ }}>{t(copied ? "speechTranscription.copied" : "speechTranscription.copy")}</Button>+ {canInsert ? <Button type="button" size="sm" onClick={onInsert}>{t("speechTranscription.insertIntoNote")}</Button> : null}+ </span>+ </>+ ) : null}+ </span>+ );+};diff --git a/apps/web/src/components/editor/FileAttachment.tsx b/apps/web/src/components/editor/FileAttachment.tsxindex 62d1c0a7..f6be7f39 100644--- a/apps/web/src/components/editor/FileAttachment.tsx+++ b/apps/web/src/components/editor/FileAttachment.tsx@@ -5,6 +5,7 @@ import {resolveAttachmentKind,resolveFileDisplayMode,} from "@edgeever/shared";+import { useContext, useState } from "react";import { NodeViewWrapper, ReactNodeViewRenderer, type NodeViewProps } from "@tiptap/react";import { ChevronDown, ChevronUp, Download, ExternalLink } from "lucide-react";import { useTranslation } from "react-i18next";@@ -16,9 +17,16 @@ import { ButtonTooltip } from "@/components/ui/button-tooltip";import { useAttachmentByteSize } from "@/hooks/useAttachmentByteSize";import { isDesktopResourceRuntime, toApiResourceUrl, toDesktopResourceDownloadUrl } from "@/lib/desktop-resources";import { cn } from "@/lib/utils";+import { AttachmentTranscriptContext } from "./AttachmentTranscriptContext";+import { AttachmentTranscriptInline } from "./AttachmentTranscriptInline";const FileAttachmentNodeView = ({ node, updateAttributes }: NodeViewProps) => {const { t } = useTranslation();+ const [viewerElement, setViewerElement] = useState<HTMLSpanElement | null>(null);+ const transcriptContext = useContext(AttachmentTranscriptContext);+ const activeTranscript = transcriptContext?.transcript?.target.element+ && viewerElement?.contains(transcriptContext.transcript.target.element)+ ? transcriptContext.transcript : null;const url = typeof node.attrs.url === "string" ? node.attrs.url : "";const label = typeof node.attrs.label === "string" ? node.attrs.label : "Attachment";const filename = typeof node.attrs.filename === "string" && node.attrs.filename@@ -55,7 +63,7 @@ const FileAttachmentNodeView = ({ node, updateAttributes }: NodeViewProps) => {data-file-url={url}contentEditable={false}>- <span className={cn("edgeever-file-viewer flex min-h-12 flex-col overflow-hidden rounded-xl border border-slate-200 bg-card shadow-sm", COMPACT_ATTACHMENT_WIDTH_CLASS)}>+ <span ref={setViewerElement} className={cn("edgeever-file-viewer flex min-h-12 flex-col overflow-hidden rounded-xl border border-slate-200 bg-card shadow-sm", COMPACT_ATTACHMENT_WIDTH_CLASS)}><span data-edgeever-resource-toolbar className="flex min-h-12 items-center gap-2 px-3">{isVideo ? (<button@@ -121,6 +129,11 @@ const FileAttachmentNodeView = ({ node, updateAttributes }: NodeViewProps) => {</span>) : null}</span>+ {activeTranscript && transcriptContext ? (+ <span className={cn("block", COMPACT_ATTACHMENT_WIDTH_CLASS)}>+ <AttachmentTranscriptInline {...transcriptContext} transcript={activeTranscript} />+ </span>+ ) : null}</NodeViewWrapper>);};diff --git a/apps/web/src/components/editor/attachment-editor-range.test.mjs b/apps/web/src/components/editor/attachment-editor-range.test.mjsindex 19f14caf..8e2d80ce 100644--- a/apps/web/src/components/editor/attachment-editor-range.test.mjs+++ b/apps/web/src/components/editor/attachment-editor-range.test.mjs@@ -3,7 +3,7 @@ import { Editor } from "@tiptap/core";import StarterKit from "@tiptap/starter-kit";import { FileAttachment, PdfAttachment } from "@edgeever/shared";import { ensureTestWindowDom } from "../../lib/restore-test-global.mjs";-import { findAttachmentRange, removeAttachmentAt, renameAttachmentAt } from "./attachment-editor-range.ts";+import { findAttachmentRange, insertTranscriptAfterAttachment, removeAttachmentAt, renameAttachmentAt } from "./attachment-editor-range.ts";const videoUrl = "edgeever-resource://resource/res_video";const videoApiUrl = "/api/v1/resources/res_video/blob";@@ -113,4 +113,34 @@ describe("attachment editor range", () => {expect(editor.getJSON().content).toHaveLength(2);editor.destroy();});++ test("inserts a transcript directly below its attachment without moving surrounding note text", () => {+ const editor = makeEditor([+ paragraph({ type: "text", text: "intro" }),+ paragraph(fileNode(videoUrl, "clip.mp4", "video/mp4")),+ paragraph({ type: "text", text: "following content" }),+ ]);++ expect(insertTranscriptAfterAttachment(+ editor,+ { url: videoApiUrl, resourceId: "res_video" },+ "First line\nSecond line",+ "Transcript",+ )).toBe(true);+ expect(editor.getJSON().content.map((node) => node.type)).toEqual([+ "paragraph", "paragraph", "heading", "paragraph", "paragraph", "paragraph",+ ]);+ expect(editor.getJSON().content.slice(2, 5).map((node) => node.content?.[0]?.text)).toEqual([+ "Transcript", "First line", "Second line",+ ]);+ expect(editor.getJSON().content[5].content[0].text).toBe("following content");+ editor.destroy();+ });++ test("does not insert a transcript if the attachment was removed", () => {+ const editor = makeEditor([paragraph({ type: "text", text: "keep" })]);+ expect(insertTranscriptAfterAttachment(editor, { url: videoApiUrl, resourceId: "res_video" }, "text", "Transcript")).toBe(false);+ expect(editor.getJSON().content).toEqual([paragraph({ type: "text", text: "keep" })]);+ editor.destroy();+ });});diff --git a/apps/web/src/components/editor/attachment-editor-range.ts b/apps/web/src/components/editor/attachment-editor-range.tsindex d6b7b31a..9a222a5f 100644--- a/apps/web/src/components/editor/attachment-editor-range.ts+++ b/apps/web/src/components/editor/attachment-editor-range.ts@@ -1,5 +1,5 @@import type { Editor } from "@tiptap/core";-import type { Mark, Node as PMNode } from "@tiptap/pm/model";+import { Fragment, type Mark, type Node as PMNode } from "@tiptap/pm/model";import {FILE_ATTACHMENT_NODE_TYPE,PDF_ATTACHMENT_NODE_TYPE,@@ -124,3 +124,44 @@ export const renameAttachmentAt = ();return true;};++export const insertTranscriptAfterAttachment = (+ editor: Editor,+ target: AttachmentRangeTarget,+ text: string,+ title: string,+ anchorElement?: HTMLElement,+) => {+ const paragraphs = text.split(/\n+/).map((line) => line.trim()).filter(Boolean);+ if (!paragraphs.length) return false;++ let range = findAttachmentRange(editor, target);+ const wrapper = anchorElement?.closest(".edgeever-file-attachment-node");+ if (wrapper && editor.view.dom.contains(wrapper)) {+ try {+ const pos = editor.view.posAtDOM(wrapper, 0);+ const node = editor.state.doc.nodeAt(pos);+ if (node && ATTACHMENT_NODE_TYPES.has(node.type.name)+ && attachmentCandidateMatches(String(node.attrs.url || ""), target)) {+ range = { kind: "node", from: pos, to: pos + node.nodeSize, node };+ }+ } catch {+ // A replaced node view can lose its DOM position while transcription runs.+ }+ }+ if (!range) return false;++ const $attachment = editor.state.doc.resolve(range.from);+ let depth = $attachment.depth;+ while (depth > 0 && !$attachment.node(depth).isTextblock) depth -= 1;+ const insertionPos = depth > 0 ? $attachment.after(depth) : editor.state.doc.content.size;+ const paragraphType = editor.schema.nodes.paragraph;+ if (!paragraphType) return false;+ const headingType = editor.schema.nodes.heading;+ const heading = headingType+ ? headingType.create({ level: 2 }, editor.schema.text(title))+ : paragraphType.create(null, editor.schema.text(title));+ const nodes = [heading, ...paragraphs.map((line) => paragraphType.create(null, editor.schema.text(line)))];+ editor.view.dispatch(editor.state.tr.insert(insertionPos, Fragment.fromArray(nodes)));+ return true;+};diff --git a/packages/shared/src/i18n/en-US.ts b/packages/shared/src/i18n/en-US.tsindex 5197cddd..ecf27baa 100644--- a/packages/shared/src/i18n/en-US.ts+++ b/packages/shared/src/i18n/en-US.ts@@ -1223,6 +1223,7 @@ export const enUS = {copy: "Copy text",copied: "Copied",insertIntoNote: "Insert into note",+ retry: "Retry transcription",attachmentNotice: "Only audio and video attachments already uploaded to notes can be transcribed. Audio is extracted and split on your device (up to 24 MB per segment), then sent directly from the client to your configured model service. The model key is given to the current signed-in client; browser calls also require provider CORS support.",},aiPrompts: {diff --git a/packages/shared/src/i18n/ja.ts b/packages/shared/src/i18n/ja.tsindex dee26eb5..92107df8 100644--- a/packages/shared/src/i18n/ja.ts+++ b/packages/shared/src/i18n/ja.ts@@ -1223,6 +1223,7 @@ export const ja = {copy: "テキストをコピー",copied: "コピーしました",insertIntoNote: "ノートに挿入",+ retry: "文字起こしを再試行",attachmentNotice: "ノートにアップロード済みの音声・動画添付ファイルのみ文字起こしできます。音声は端末上で抽出・分割され(各部分は最大 24 MB)、クライアントから設定したモデルサービスへ直接送信されます。モデルキーは現在ログイン中のクライアントに渡され、ブラウザーからの通信には提供元の CORS 対応も必要です。",},aiPrompts: {diff --git a/packages/shared/src/i18n/pl.ts b/packages/shared/src/i18n/pl.tsindex a52c8cc4..961b6c10 100644--- a/packages/shared/src/i18n/pl.ts+++ b/packages/shared/src/i18n/pl.ts@@ -1223,6 +1223,7 @@ export const pl = {copy: "Kopiuj tekst",copied: "Skopiowano",insertIntoNote: "Wstaw do notatki",+ retry: "Ponów transkrypcję",attachmentNotice: "Transkrypcja działa tylko dla plików audio i wideo dodanych do notatek. Dźwięk jest wyodrębniany i dzielony na urządzeniu (do 24 MB na segment), a następnie wysyłany bezpośrednio z klienta do skonfigurowanej usługi modelu. Klucz modelu trafia do aktualnie zalogowanego klienta; przeglądarka wymaga też obsługi CORS przez dostawcę.",},aiPrompts: {diff --git a/packages/shared/src/i18n/zh-CN.ts b/packages/shared/src/i18n/zh-CN.tsindex 7e0568b4..fc29d4ea 100644--- a/packages/shared/src/i18n/zh-CN.ts+++ b/packages/shared/src/i18n/zh-CN.ts@@ -1223,6 +1223,7 @@ export const zhCN = {copy: "复制文本",copied: "已复制",insertIntoNote: "插入笔记",+ retry: "重试转写",attachmentNotice: "仅转写笔记内已上传的音视频附件。音轨在本机提取并分段(每段不超过 24 MB),由客户端直接发送到您配置的模型服务。模型密钥会交给当前已登录客户端;浏览器直连还需模型服务支持跨域请求。",},aiPrompts: {