Skip to content

Desktop app that records your on-screen work session and uses the GitHub Copilot SDK to reconstruct it as an intent + ordered steps, then builds a reusable Skill or Automation for Microsoft Autopilots like Scout, Microsoft Copilot Cowork, or Copilot Studio.

Expand narration language selection

Giorgio Ughini3ad2bcb70d15
diff --git a/README.md b/README.md
index 4395a2b..b867f31 100644
--- a/README.md
+++ b/README.md
@@ -44,7 +44,7 @@ activity" panel shows exactly what's collected:
- **Narration** *(optional)* — turn on **Narrate** before capture or toggle the
microphone from the floating recording bar. Each microphone-on interval is
timestamped on the video timeline, saved locally, and can be transcribed
- **on-device** in English, Italian, French, or Spanish (Whisper via
+ **on-device** in any of Whisper's 99 supported languages (via
transformers.js), preserving the selected language. The first transcription
uses an explicit, one-time ~252 MB model download. The multilingual q8
checkpoint is only about 0.6 MB larger than the previous English-only model
diff --git a/common/audio.test.ts b/common/audio.test.ts
index 353dd6b..82bcfa6 100644
--- a/common/audio.test.ts
+++ b/common/audio.test.ts
@@ -86,10 +86,10 @@ test("audio metadata preserves a supported language and defaults legacy recordin
assert.equal(
readAudioNarrationLanguage({
version: AUDIO_MANIFEST_VERSION,
- narrationLanguage: "it",
+ narrationLanguage: "haw",
segments: [],
}),
- "it",
+ "haw",
);
assert.equal(
readAudioNarrationLanguage({
@@ -110,7 +110,7 @@ test("audio metadata preserves a supported language and defaults legacy recordin
() =>
readAudioNarrationLanguage({
version: AUDIO_MANIFEST_VERSION,
- narrationLanguage: "de",
+ narrationLanguage: "xx",
segments: [],
}),
/unsupported transcription language/i,
diff --git a/common/narration.test.ts b/common/narration.test.ts
new file mode 100644
index 0000000..b172dd5
--- /dev/null
+++ b/common/narration.test.ts
@@ -0,0 +1,22 @@
+import assert from "node:assert/strict";
+import test from "node:test";
+
+import {
+ DEFAULT_NARRATION_LANGUAGE,
+ isNarrationLanguage,
+ NARRATION_LANGUAGES,
+ narrationLanguageLabel,
+} from "./narration";
+
+test("narration exposes all Whisper languages alphabetically with English as the default", () => {
+ const codes = NARRATION_LANGUAGES.map(({ code }) => code);
+ const labels = NARRATION_LANGUAGES.map(({ label }) => label);
+
+ assert.equal(NARRATION_LANGUAGES.length, 99);
+ assert.equal(new Set(codes).size, NARRATION_LANGUAGES.length);
+ assert.deepEqual(labels, [...labels].sort((left, right) => left.localeCompare(right, "en")));
+ assert.equal(DEFAULT_NARRATION_LANGUAGE, "en");
+ assert.equal(narrationLanguageLabel(DEFAULT_NARRATION_LANGUAGE), "English");
+ assert.equal(isNarrationLanguage("haw"), true);
+ assert.equal(isNarrationLanguage("xx"), false);
+});
diff --git a/common/narration.ts b/common/narration.ts
index d084d4a..6207c4a 100644
--- a/common/narration.ts
+++ b/common/narration.ts
@@ -1,13 +1,108 @@
-export const NARRATION_LANGUAGE_CODES = ["en", "it", "fr", "es"] as const;
-export type NarrationLanguage = (typeof NARRATION_LANGUAGE_CODES)[number];
+export const NARRATION_LANGUAGES = [
+ { code: "af", label: "Afrikaans" },
+ { code: "sq", label: "Albanian" },
+ { code: "am", label: "Amharic" },
+ { code: "ar", label: "Arabic" },
+ { code: "hy", label: "Armenian" },
+ { code: "as", label: "Assamese" },
+ { code: "az", label: "Azerbaijani" },
+ { code: "ba", label: "Bashkir" },
+ { code: "eu", label: "Basque" },
+ { code: "be", label: "Belarusian" },
+ { code: "bn", label: "Bengali" },
+ { code: "bs", label: "Bosnian" },
+ { code: "br", label: "Breton" },
+ { code: "bg", label: "Bulgarian" },
+ { code: "ca", label: "Catalan" },
+ { code: "zh", label: "Chinese" },
+ { code: "hr", label: "Croatian" },
+ { code: "cs", label: "Czech" },
+ { code: "da", label: "Danish" },
+ { code: "nl", label: "Dutch" },
+ { code: "en", label: "English" },
+ { code: "et", label: "Estonian" },
+ { code: "fo", label: "Faroese" },
+ { code: "fi", label: "Finnish" },
+ { code: "fr", label: "French" },
+ { code: "gl", label: "Galician" },
+ { code: "ka", label: "Georgian" },
+ { code: "de", label: "German" },
+ { code: "el", label: "Greek" },
+ { code: "gu", label: "Gujarati" },
+ { code: "ht", label: "Haitian Creole" },
+ { code: "ha", label: "Hausa" },
+ { code: "haw", label: "Hawaiian" },
+ { code: "he", label: "Hebrew" },
+ { code: "hi", label: "Hindi" },
+ { code: "hu", label: "Hungarian" },
+ { code: "is", label: "Icelandic" },
+ { code: "id", label: "Indonesian" },
+ { code: "it", label: "Italian" },
+ { code: "ja", label: "Japanese" },
+ { code: "jw", label: "Javanese" },
+ { code: "kn", label: "Kannada" },
+ { code: "kk", label: "Kazakh" },
+ { code: "km", label: "Khmer" },
+ { code: "ko", label: "Korean" },
+ { code: "lo", label: "Lao" },
+ { code: "la", label: "Latin" },
+ { code: "lv", label: "Latvian" },
+ { code: "ln", label: "Lingala" },
+ { code: "lt", label: "Lithuanian" },
+ { code: "lb", label: "Luxembourgish" },
+ { code: "mk", label: "Macedonian" },
+ { code: "mg", label: "Malagasy" },
+ { code: "ms", label: "Malay" },
+ { code: "ml", label: "Malayalam" },
+ { code: "mt", label: "Maltese" },
+ { code: "mi", label: "Maori" },
+ { code: "mr", label: "Marathi" },
+ { code: "mn", label: "Mongolian" },
+ { code: "my", label: "Myanmar" },
+ { code: "ne", label: "Nepali" },
+ { code: "no", label: "Norwegian" },
+ { code: "nn", label: "Nynorsk" },
+ { code: "oc", label: "Occitan" },
+ { code: "ps", label: "Pashto" },
+ { code: "fa", label: "Persian" },
+ { code: "pl", label: "Polish" },
+ { code: "pt", label: "Portuguese" },
+ { code: "pa", label: "Punjabi" },
+ { code: "ro", label: "Romanian" },
+ { code: "ru", label: "Russian" },
+ { code: "sa", label: "Sanskrit" },
+ { code: "sr", label: "Serbian" },
+ { code: "sn", label: "Shona" },
+ { code: "sd", label: "Sindhi" },
+ { code: "si", label: "Sinhala" },
+ { code: "sk", label: "Slovak" },
+ { code: "sl", label: "Slovenian" },
+ { code: "so", label: "Somali" },
+ { code: "es", label: "Spanish" },
+ { code: "su", label: "Sundanese" },
+ { code: "sw", label: "Swahili" },
+ { code: "sv", label: "Swedish" },
+ { code: "tl", label: "Tagalog" },
+ { code: "tg", label: "Tajik" },
+ { code: "ta", label: "Tamil" },
+ { code: "tt", label: "Tatar" },
+ { code: "te", label: "Telugu" },
+ { code: "th", label: "Thai" },
+ { code: "bo", label: "Tibetan" },
+ { code: "tr", label: "Turkish" },
+ { code: "tk", label: "Turkmen" },
+ { code: "uk", label: "Ukrainian" },
+ { code: "ur", label: "Urdu" },
+ { code: "uz", label: "Uzbek" },
+ { code: "vi", label: "Vietnamese" },
+ { code: "cy", label: "Welsh" },
+ { code: "yi", label: "Yiddish" },
+ { code: "yo", label: "Yoruba" },
+] as const;
+
+export type NarrationLanguage = (typeof NARRATION_LANGUAGES)[number]["code"];
export const DEFAULT_NARRATION_LANGUAGE: NarrationLanguage = "en";
-export const NARRATION_LANGUAGE_LABELS = {
- en: "English",
- it: "Italian",
- fr: "French",
- es: "Spanish",
-} satisfies Record<NarrationLanguage, string>;
/** Current q8 model files total 251,875,316 bytes at the publisher. */
export const NARRATION_MODEL_DOWNLOAD_LABEL = "~252 MB";
@@ -15,12 +110,14 @@ export const NARRATION_MODEL_DOWNLOAD_LABEL = "~252 MB";
export function isNarrationLanguage(value: unknown): value is NarrationLanguage {
return (
typeof value === "string" &&
- (NARRATION_LANGUAGE_CODES as readonly string[]).includes(value)
+ NARRATION_LANGUAGES.some(({ code }) => code === value)
);
}
export function narrationLanguageLabel(language: NarrationLanguage): string {
- return NARRATION_LANGUAGE_LABELS[language];
+ const match = NARRATION_LANGUAGES.find(({ code }) => code === language);
+ if (!match) throw new Error(`Unsupported narration language: ${language}`);
+ return match.label;
}
/**
diff --git a/docs/windows-capture.md b/docs/windows-capture.md
index 30a415d..bf3c028 100644
--- a/docs/windows-capture.md
+++ b/docs/windows-capture.md
@@ -60,18 +60,19 @@ Run a real recording on Windows and verify each source lands in the session's
5. **Video.** Confirm `video.webm`, `video-frames.json`, snapshots under
`video-frames/`, and retained images under `frames/`.
6. **Voice narration.** Turn on the **Narrate** switch before starting or use the
- microphone control in the floating recording bar. Select English, Italian,
- French, or Spanish before recording, then toggle the microphone off and on
- around two spoken sentences. After Stop, confirm `audio.json` contains a
+ microphone control in the floating recording bar. Confirm the selector lists
+ all 99 supported languages alphabetically and defaults to English. Select a
+ language before recording, then toggle the microphone off and on around two
+ spoken sentences. After Stop, confirm `audio.json` contains a
version-2 segment manifest with `narrationLanguage` and that the referenced
`audio/segment-*.webm` files exist. Their session/video offsets should
preserve the silent gap while the microphone was off. If the model is not
installed, use **Download & transcribe** in Sessions (or the actionable HUD
readiness row) to approve the one-time ~252 MB Whisper download. Confirm
`narration.json` records the chosen language and contains the
- original-language words with `atMs` offsets. Repeat with all four supported
- languages. Later runs are offline. On Windows the mic grant is requested by
- the OS on first use.
+ original-language words with `atMs` offsets. Exercise representative
+ languages, including English and a non-Latin script. Later runs are offline.
+ On Windows the mic grant is requested by the OS on first use.
7. **Recording controls.** Confirm the floating bar stays above the active app,
can be dragged without making its buttons unclickable, and does not appear in
captured frames where Windows capture protection is supported. Canceling the
diff --git a/package.json b/package.json
index 477ca2c..d06eecd 100644
--- a/package.json
+++ b/package.json
@@ -14,7 +14,7 @@
"build": "tsc --noEmit && vite build",
"typecheck": "tsc --noEmit",
"typecheck:evals": "tsc --noEmit -p evals/tsconfig.json",
- "test": "node --experimental-transform-types --no-warnings --import ./evals/register.mjs --test common/audio.test.ts electron/recording-controls-bounds.test.ts electron/recorder/controller.test.ts electron/frames/extractor.test.ts electron/narration/audio-analysis.test.ts electron/narration/transcribe.test.ts electron/narration/whisper.test.ts electron/sessions.test.ts",
+ "test": "node --experimental-transform-types --no-warnings --import ./evals/register.mjs --test common/audio.test.ts common/narration.test.ts electron/recording-controls-bounds.test.ts electron/recorder/controller.test.ts electron/frames/extractor.test.ts electron/narration/audio-analysis.test.ts electron/narration/transcribe.test.ts electron/narration/whisper.test.ts electron/sessions.test.ts",
"eval": "node --experimental-transform-types --no-warnings --import ./evals/register.mjs evals/run.ts",
"eval:builder": "node --experimental-transform-types --no-warnings --import ./evals/register.mjs evals/builder/run.ts",
"eval:skill": "node --experimental-transform-types --no-warnings --import ./evals/register.mjs evals/skillbuilder/run.ts",
diff --git a/src/App.css b/src/App.css
index eea1506..d0cb09d 100644
--- a/src/App.css
+++ b/src/App.css
@@ -452,7 +452,7 @@ button:focus-visible,
.narrate {
display: flex;
align-items: center;
- gap: 12px;
+ gap: 10px;
flex: 1;
min-width: 0;
text-align: left;
@@ -460,7 +460,7 @@ button:focus-visible,
border: 1px solid var(--line);
color: var(--text);
border-radius: 12px;
- padding: 11px 13px;
+ padding: 11px;
transition: border-color 0.15s ease, background 0.15s ease;
}
@@ -549,7 +549,7 @@ button:focus-visible,
flex-direction: column;
justify-content: center;
gap: 2px;
- width: 108px;
+ width: 116px;
padding: 7px 9px;
border: 1px solid var(--line);
border-radius: 12px;
diff --git a/src/Recorder.tsx b/src/Recorder.tsx
index e31d567..05ef92a 100644
--- a/src/Recorder.tsx
+++ b/src/Recorder.tsx
@@ -4,8 +4,7 @@ import type { DoctorReport, NarrationStatus, RecorderStatus } from "../common/ip
import {
DEFAULT_NARRATION_LANGUAGE,
isNarrationLanguage,
- NARRATION_LANGUAGE_CODES,
- NARRATION_LANGUAGE_LABELS,
+ NARRATION_LANGUAGES,
NARRATION_MODEL_DOWNLOAD_LABEL,
narrationLanguageLabel,
type NarrationLanguage,
@@ -208,9 +207,9 @@ export function Recorder() {
onChange={(event) => void selectNarrationLanguage(event.currentTarget.value)}
title="The transcript stays in this language"
>
- {NARRATION_LANGUAGE_CODES.map((language) => (
- <option key={language} value={language}>
- {NARRATION_LANGUAGE_LABELS[language]}
+ {NARRATION_LANGUAGES.map(({ code, label }) => (
+ <option key={code} value={code}>
+ {label}
</option>
))}
</select>
diff --git a/src/WhatsRecorded.tsx b/src/WhatsRecorded.tsx
index d4b06a2..aec03a4 100644
--- a/src/WhatsRecorded.tsx
+++ b/src/WhatsRecorded.tsx
@@ -82,9 +82,8 @@ export function WhatsRecorded({ onClose }: { onClose: () => void }) {
</li>
<li>
The recording can be turned into text on this computer using an offline model. The
- transcript stays in the English, Italian, French, or Spanish language you select.
- The first transcription needs a one-time ~252 MB download that you choose when to
- start.
+ transcript stays in the language you select from Whisper's 99 supported choices. The
+ first transcription needs a one-time ~252 MB download that you choose when to start.
</li>
<li>Leave the microphone off and it is never touched.</li>
</ul>