Skip to content

Build your personal knowledge base with Trilium Notes

feat(transcription): link the transcription settings to downloaded resources

Elian Doran41435e923808
diff --git a/apps/client/src/translations/en/translation.json b/apps/client/src/translations/en/translation.json
index a3934f5c75..6825e03fb2 100644
--- a/apps/client/src/translations/en/translation.json
+++ b/apps/client/src/translations/en/translation.json
@@ -4638,7 +4638,9 @@
"keep_recordings_description": "Keeps the audio of everyone in the meeting, with the settings used and the transcript as it was produced, so that a problem with a recording can be reported and reproduced. It takes about 230 MB per hour of meeting, is never deleted automatically and is not encrypted, even for protected notes. Recording other participants can require their consent where you or they are.",
"saved_in": "Saved in",
"enabled": "Meeting transcription",
- "enabled_description": "Adds the Transcribe meeting button to the launch bar, which transcribes what you say into your microphone and what the other participants say through your speakers. Recognition runs entirely on this device, so no audio leaves it."
+ "enabled_description": "Adds the Transcribe meeting button to the launch bar, which transcribes what you say into your microphone and what the other participants say through your speakers. Recognition runs entirely on this device, so no audio leaves it.",
+ "related_resources": "Downloaded resources",
+ "related_resources_description": "See the speech recognition models downloaded to this device, and delete those you no longer need."
},
"resources_options": {
"list_title": "Resources",
diff --git a/apps/client/src/widgets/type_widgets/options/transcription.spec.tsx b/apps/client/src/widgets/type_widgets/options/transcription.spec.tsx
index 8187053fa3..6aa995b7f2 100644
--- a/apps/client/src/widgets/type_widgets/options/transcription.spec.tsx
+++ b/apps/client/src/widgets/type_widgets/options/transcription.spec.tsx
@@ -149,6 +149,16 @@ describe("TranscriptionSettings", () => {
expect(mocks.savedBools).toEqual([ [ "transcriptionEnabled", true ] ]);
});
+ it("points to the downloaded resources, whether transcription is on or off", () => {
+ for (const isEnabled of [ true, false ]) {
+ mocks.bools.transcriptionEnabled = isEnabled;
+ open();
+ const link = host.querySelector("a[href='#root/_hidden/_options/_optionsResources']");
+ expect(link?.textContent).toContain("transcription_options.related_resources");
+ act(() => render(null, host));
+ }
+ });
+
it("shows the default model for a value it does not know", () => {
mocks.stored = "whisper";
expect(open()?.value).toBe("parakeet-int8");
diff --git a/apps/client/src/widgets/type_widgets/options/transcription.tsx b/apps/client/src/widgets/type_widgets/options/transcription.tsx
index 60cc8e4edf..a87c7615fd 100644
--- a/apps/client/src/widgets/type_widgets/options/transcription.tsx
+++ b/apps/client/src/widgets/type_widgets/options/transcription.tsx
@@ -13,6 +13,7 @@ import FormToggle from "../../react/FormToggle";
import { useTriliumOption, useTriliumOptionBool } from "../../react/hooks";
import NoItems from "../../react/NoItems";
import OptionsPageHeader from "./components/OptionsPageHeader";
+import RelatedSettings from "./components/RelatedSettings";
export default function TranscriptionSettings() {
const [ isEnabled, setIsEnabled ] = useTriliumOptionBool("transcriptionEnabled");
@@ -48,6 +49,14 @@ export default function TranscriptionSettings() {
<TroubleshootingSettings />
</>
)}
+
+ <RelatedSettings items={[
+ {
+ title: t("transcription_options.related_resources"),
+ description: t("transcription_options.related_resources_description"),
+ targetPage: "_optionsResources"
+ }
+ ]} />
</>
);
}