The best way to control Claude Code, Codex and more from any computer or phone
feat(desktop): dictate on this Mac with Apple Speech (#34027)
Co-authored-by: Julius Marminge <julius0216@outlook.com>
RVZO6 committed
Nov 20, 2026 at 20:22 UTC
285558eb1053d17f59ea8ecdf7c57999e92381f8
50 files changed
+1437
-523
apps/desktop/scripts/build-apple-speech.mjs
new
+76
@@ -0,0 +1,76 @@
1
+import * as NodeChildProcess from "node:child_process";
2
+import * as NodeFS from "node:fs";
3
+import * as NodePath from "node:path";
4
+import * as NodeURL from "node:url";
5
+import * as NodeUtil from "node:util";
6
+
7
+// oxlint-disable-next-line t3code/no-global-process-runtime -- The Swift compiler targets the actual host; this script has no Effect runtime.
8
+const hostArch = process.arch;
9
+// oxlint-disable-next-line t3code/no-global-process-runtime -- The Speech framework exists only in the macOS SDK.
10
+const hostPlatform = process.platform;
11
+
12
+const { values } = NodeUtil.parseArgs({
13
+ options: { output: { type: "string" }, arch: { type: "string", default: hostArch } },
14
+});
15
+// Packaging passes --output and must not ship without the helper; dev builds only lose the option.
16
+const required = values.output !== undefined;
17
+
18
+if (hostPlatform !== "darwin") {
19
+ if (required) throw new Error("The Apple Speech helper can only be built on macOS.");
20
+} else {
21
+ const targets = { arm64: ["arm64"], x64: ["x86_64"], universal: ["arm64", "x86_64"] }[
22
+ values.arch
23
+ ];
24
+ if (targets === undefined) throw new Error(`Unsupported macOS architecture: ${values.arch}`);
25
+ const root = NodeURL.fileURLToPath(new URL("../../../native/apple-speech/", import.meta.url));
26
+ const sources = ["AppleSpeech.swift", "AppleSpeechEngine.swift"].map((file) =>
27
+ NodePath.resolve(root, file),
28
+ );
29
+ const output = values.output ?? NodePath.resolve(root, "build", values.arch, "t3-apple-speech");
30
+ let current = false;
31
+ try {
32
+ current =
33
+ NodeFS.statSync(output).mtimeMs >=
34
+ Math.max(
35
+ ...sources.map((source) => NodeFS.statSync(source).mtimeMs),
36
+ NodeFS.statSync(NodeURL.fileURLToPath(import.meta.url)).mtimeMs,
37
+ );
38
+ } catch {}
39
+ if (!current) {
40
+ NodeFS.mkdirSync(NodePath.dirname(output), { recursive: true });
41
+ const temporary = `${output}.${process.pid}.tmp`;
42
+ const slices = targets.map((target) => `${temporary}.${target}`);
43
+ try {
44
+ targets.forEach((target, index) =>
45
+ NodeChildProcess.execFileSync(
46
+ "xcrun",
47
+ [
48
+ "swiftc",
49
+ "-O",
50
+ "-swift-version",
51
+ "5",
52
+ "-parse-as-library",
53
+ "-target",
54
+ `${target}-apple-macos26.0`,
55
+ ...sources,
56
+ "-o",
57
+ slices[index],
58
+ ],
59
+ { stdio: "inherit" },
60
+ ),
61
+ );
62
+ NodeChildProcess.execFileSync("xcrun", ["lipo", "-create", ...slices, "-output", temporary], {
63
+ stdio: "inherit",
64
+ });
65
+ NodeFS.renameSync(temporary, output);
66
+ } catch (cause) {
67
+ if (required)
68
+ throw new Error("Building the Apple Speech helper requires Xcode 26 or later.", { cause });
69
+ console.warn(
70
+ "Skipping the Apple Speech helper (needs Xcode 26 or later); on-device Mac dictation is unavailable in this build.",
71
+ );
72
+ } finally {
73
+ for (const file of [temporary, ...slices]) NodeFS.rmSync(file, { force: true });
74
+ }
75
+ }
76
+}
apps/desktop/scripts/dev-electron.mjs
+5
@@ -60,6 +60,11 @@ NodeChildProcess.execFileSync(
60
[NodePath.join(desktopDir, "scripts/build-browser-secret.mjs")],
61
{ stdio: "inherit" },
62
);
63
+NodeChildProcess.execFileSync(
64
+ process.execPath,
65
+ [NodePath.join(desktopDir, "scripts/build-apple-speech.mjs")],
66
+ { stdio: "inherit" },
67
+);
68
69
await waitForResources({
70
baseDir: desktopDir,
apps/desktop/scripts/start-electron.mjs
+5
@@ -8,6 +8,11 @@ NodeChildProcess.execFileSync(
8
[NodePath.join(desktopDir, "scripts/build-browser-secret.mjs")],
9
{ stdio: "inherit" },
10
);
11
+NodeChildProcess.execFileSync(
12
+ process.execPath,
13
+ [NodePath.join(desktopDir, "scripts/build-apple-speech.mjs")],
14
+ { stdio: "inherit" },
15
+);
16
17
const childEnv = { ...process.env };
18
delete childEnv.ELECTRON_RUN_AS_NODE;
apps/desktop/src/app/DesktopApp.test.ts
+2
@@ -74,6 +74,7 @@ import * as ElectronWindow from "../electron/ElectronWindow.ts";
74
import * as MacPermissions from "../permissions/MacPermissions.ts";
75
import * as LoopbackTunnel from "../preview/LoopbackTunnel.ts";
76
import * as PreviewManager from "../preview/Manager.ts";
77
+import * as AppleSpeech from "../speech/AppleSpeech.ts";
78
79
interface StubbedDesktop {
80
readonly localEnvironmentEnabled: boolean;
@@ -233,6 +234,7 @@ const runStubbedDesktop = (stub: StubbedDesktop) =>
234
Layer.mock(ElectronTheme.ElectronTheme, {}),
235
Layer.mock(ElectronWindow.ElectronWindow, {}),
236
Layer.mock(MacPermissions.MacPermissions, {}),
237
+ Layer.mock(AppleSpeech.AppleSpeech, {}),
238
Layer.mock(LoopbackTunnel.LoopbackTunnel, {}),
239
Layer.mock(PreviewManager.PreviewManager, {
240
isBrowserPartition: () => {
apps/desktop/src/ipc/DesktopIpcHandlers.ts
+8
@@ -2,6 +2,11 @@ import { startFileDrag } from "./methods/fileDrag.ts";
2
import * as Effect from "effect/Effect";
3
4
import { receiveProviderAuthCallback, cancelProviderAuthCallback } from "./methods/providerAuth.ts";
5
+import {
6
+ appleSpeechAvailable,
7
+ appleSpeechPrepare,
8
+ appleSpeechTranscribe,
9
+} from "./methods/appleSpeech.ts";
10
import * as DesktopIpc from "./DesktopIpc.ts";
11
import { installNotificationBadge } from "./methods/notificationBadge.ts";
12
import { getClientSettings, setClientSettings } from "./methods/clientSettings.ts";
@@ -161,6 +166,9 @@ export const installDesktopIpcHandlers = Effect.fn("desktop.ipc.installHandlers"
166
yield* ipc.handle(cancelProviderAuthCallback);
167
yield* ipc.handle(openSystemSettings);
168
yield* ipc.handle(checkSystemPermission);
169
+ yield* ipc.handle(appleSpeechAvailable);
170
+ yield* ipc.handle(appleSpeechPrepare);
171
+ yield* ipc.handle(appleSpeechTranscribe);
172
yield* ipc.handle(pasteAsText);
173
yield* ipc.handle(revealWindow);
174
yield* ipc.handle(syncHtmlFullscreen);
apps/desktop/src/ipc/channels.ts
+3
@@ -137,6 +137,9 @@ export const PORT_FORWARD_SHARES_LOOPBACK_CHANNEL = "desktop:port-forward-shares
137
export const MAC_PERMISSION_HELPER_CHANNEL = "desktop:mac-permission-helper";
138
139
export const CHECK_SYSTEM_PERMISSION_CHANNEL = "desktop:check-system-permission";
140
+export const APPLE_SPEECH_AVAILABLE_CHANNEL = "desktop:apple-speech-available";
141
+export const APPLE_SPEECH_PREPARE_CHANNEL = "desktop:apple-speech-prepare";
142
+export const APPLE_SPEECH_TRANSCRIBE_CHANNEL = "desktop:apple-speech-transcribe";
143
144
export const PREVIEW_RECORDING_INPUT_CHANNEL = "desktop:preview-recording-input";
145
apps/desktop/src/ipc/methods/appleSpeech.ts
new
+37
@@ -0,0 +1,37 @@
1
+import {
2
+ DesktopAppleSpeechResultSchema,
3
+ DesktopAppleSpeechTranscribeInputSchema,
4
+} from "@t3tools/contracts";
5
+import * as Effect from "effect/Effect";
6
+import * as Schema from "effect/Schema";
7
+
8
+import * as AppleSpeech from "../../speech/AppleSpeech.ts";
9
+import * as IpcChannels from "../channels.ts";
10
+import * as DesktopIpc from "../DesktopIpc.ts";
11
+
12
+export const appleSpeechAvailable = DesktopIpc.makeIpcMethod({
13
+ channel: IpcChannels.APPLE_SPEECH_AVAILABLE_CHANNEL,
14
+ payload: Schema.Void,
15
+ result: Schema.Array(Schema.String),
16
+ handler: Effect.fn("desktop.ipc.appleSpeech.available")(function* () {
17
+ return yield* (yield* AppleSpeech.AppleSpeech).supportedLocales;
18
+ }),
19
+});
20
+
21
+export const appleSpeechPrepare = DesktopIpc.makeIpcMethod({
22
+ channel: IpcChannels.APPLE_SPEECH_PREPARE_CHANNEL,
23
+ payload: Schema.String.check(Schema.isMaxLength(64)),
24
+ result: DesktopAppleSpeechResultSchema,
25
+ handler: Effect.fn("desktop.ipc.appleSpeech.prepare")(function* (locale) {
26
+ return yield* (yield* AppleSpeech.AppleSpeech).prepare(locale);
27
+ }),
28
+});
29
+
30
+export const appleSpeechTranscribe = DesktopIpc.makeIpcMethod({
31
+ channel: IpcChannels.APPLE_SPEECH_TRANSCRIBE_CHANNEL,
32
+ payload: DesktopAppleSpeechTranscribeInputSchema,
33
+ result: DesktopAppleSpeechResultSchema,
34
+ handler: Effect.fn("desktop.ipc.appleSpeech.transcribe")(function* ({ locale, pcm }) {
35
+ return yield* (yield* AppleSpeech.AppleSpeech).transcribe(locale, pcm);
36
+ }),
37
+});
apps/desktop/src/main.ts
+2
@@ -71,6 +71,7 @@ import * as DesktopUpdatePolicy from "./updates/DesktopUpdatePolicy.ts";
71
import * as DesktopUpdates from "./updates/DesktopUpdates.ts";
72
import * as BrowserImport from "./preview/BrowserImport/BrowserImport.ts";
73
import * as LinuxBrowserSecret from "./preview/BrowserImport/LinuxBrowserSecret.ts";
74
+import * as AppleSpeech from "./speech/AppleSpeech.ts";
75
import * as BrowserSession from "./preview/BrowserSession.ts";
76
import * as DesktopBrowserHost from "./preview/DesktopBrowserHost.ts";
77
import * as LoopbackTunnel from "./preview/LoopbackTunnel.ts";
@@ -156,6 +157,7 @@ const layerDesktopFoundation = Layer.mergeAll(
157
DesktopPrimaryPaste.layer,
158
DesktopObservability.layer,
159
DesktopRendererHistory.layer,
160
+ AppleSpeech.layer,
161
).pipe(Layer.provideMerge(layerDesktopEnvironment));
162
163
const layerDesktopSsh = layerDesktopSshEnvironment.pipe(
apps/desktop/src/preload.ts
+8
@@ -262,6 +262,14 @@ contextBridge.exposeInMainWorld("desktopBridge", {
262
readMedia: (url: string) => ipcRenderer.invoke(IpcChannels.READ_MEDIA_CHANNEL, url),
263
checkSystemPermission: (pane: string) =>
264
ipcRenderer.invoke(IpcChannels.CHECK_SYSTEM_PERMISSION_CHANNEL, pane),
265
+ appleSpeech: {
266
+ supportedLocales: () =>
267
+ ipcRenderer.invoke(IpcChannels.APPLE_SPEECH_AVAILABLE_CHANNEL, undefined),
268
+ prepare: (locale: string) =>
269
+ ipcRenderer.invoke(IpcChannels.APPLE_SPEECH_PREPARE_CHANNEL, locale),
270
+ transcribe: (input: { locale: string; pcm: Uint8Array }) =>
271
+ ipcRenderer.invoke(IpcChannels.APPLE_SPEECH_TRANSCRIBE_CHANNEL, input),
272
+ },
273
openSystemSettings: (pane: string) =>
274
ipcRenderer.invoke(IpcChannels.OPEN_SYSTEM_SETTINGS_CHANNEL, pane),
275
probeRemoteEditors: () => ipcRenderer.invoke(IpcChannels.PROBE_REMOTE_EDITORS_CHANNEL, undefined),
apps/desktop/src/speech/AppleSpeech.test.ts
new
+176
@@ -0,0 +1,176 @@
1
+import { assert, describe, it } from "@effect/vitest";
2
+import * as HostProcess from "@t3tools/shared/HostProcess";
3
+import * as Deferred from "effect/Deferred";
4
+import * as Effect from "effect/Effect";
5
+import * as Fiber from "effect/Fiber";
6
+import * as FileSystem from "effect/FileSystem";
7
+import * as Layer from "effect/Layer";
8
+import * as Sink from "effect/Sink";
9
+import * as Stream from "effect/Stream";
10
+import * as ChildProcessSpawner from "effect/process/ChildProcessSpawner";
11
+
12
+import * as DesktopEnvironment from "../app/DesktopEnvironment.ts";
13
+import * as AppleSpeech from "./AppleSpeech.ts";
14
+
15
+const encoder = new TextEncoder();
16
+const text = (value: string) => (value ? Stream.make(encoder.encode(value)) : Stream.empty);
17
+
18
+type HelperOutput = {
19
+ stdout?: string;
20
+ stderr?: string;
21
+ exitCode: number;
22
+ exit?: Deferred.Deferred<void>;
23
+};
24
+
25
+function makeProcess(result: HelperOutput) {
26
+ return ChildProcessSpawner.makeHandle({
27
+ pid: ChildProcessSpawner.ProcessId(1),
28
+ stdout: text(result.stdout ?? ""),
29
+ stderr: text(result.stderr ?? ""),
30
+ all: Stream.empty,
31
+ exitCode: (result.exit ? Deferred.await(result.exit) : Effect.void).pipe(
32
+ Effect.as(ChildProcessSpawner.ExitCode(result.exitCode)),
33
+ ),
34
+ isRunning: Effect.succeed(false),
35
+ kill: () => Effect.void,
36
+ stdin: Sink.drain,
37
+ getInputFd: () => Sink.drain,
38
+ getOutputFd: () => Stream.empty,
39
+ unref: Effect.succeed(Effect.void),
40
+ });
41
+}
42
+
43
+function setup(result: HelperOutput, kernelRelease = "25.0.0") {
44
+ const commands: Array<ReadonlyArray<string>> = [];
45
+ const written: Uint8Array[] = [];
46
+ const layer = AppleSpeech.layer.pipe(
47
+ Layer.provide(
48
+ Layer.mergeAll(
49
+ Layer.succeed(HostProcess.KernelRelease, kernelRelease),
50
+ Layer.succeed(DesktopEnvironment.DesktopEnvironment, {
51
+ platform: "darwin",
52
+ isPackaged: true,
53
+ resourcesPath: "/app/Resources",
54
+ path: { join: (...parts: string[]) => parts.join("/") },
55
+ } as unknown as DesktopEnvironment.DesktopEnvironment["Service"]),
56
+ FileSystem.layerNoop({
57
+ exists: () => Effect.succeed(true),
58
+ makeTempFileScoped: () => Effect.succeed("/tmp/recording.wav"),
59
+ writeFile: (_path, data) => Effect.sync(() => void written.push(data)),
60
+ }),
61
+ Layer.succeed(
62
+ ChildProcessSpawner.ChildProcessSpawner,
63
+ ChildProcessSpawner.make((command) => {
64
+ const { command: executable, args } = command as unknown as {
65
+ command: string;
66
+ args: ReadonlyArray<string>;
67
+ };
68
+ commands.push([executable, ...args]);
69
+ return Effect.succeed(makeProcess(result));
70
+ }),
71
+ ),
72
+ ),
73
+ ),
74
+ );
75
+ return { commands, written, layer };
76
+}
77
+
78
+describe("AppleSpeech", () => {
79
+ it.effect.each([
80
+ [
81
+ { stdout: '{"value":"en-US"}', exitCode: 0 },
82
+ { ok: true, value: "en-US" },
83
+ ],
84
+ [
85
+ { stderr: "Locale not supported: xx\n", exitCode: 2 },
86
+ { ok: false, code: "unsupported-locale" },
87
+ ],
88
+ [{ exitCode: 3 }, { ok: false, code: "unavailable" }],
89
+ [
90
+ { stderr: "boom", exitCode: 1 },
91
+ { ok: false, code: "failed" },
92
+ ],
93
+ ] as const)("maps helper output %j to %j", ([output, expected]) => {
94
+ const { layer, commands } = setup(output);
95
+ return Effect.gen(function* () {
96
+ const speech = yield* AppleSpeech.AppleSpeech;
97
+ assert.deepEqual(yield* speech.prepare("en-US"), expected);
98
+ assert.deepEqual(commands, [
99
+ ["/app/Resources/apple-speech/t3-apple-speech", "prepare", "en-US"],
100
+ ]);
101
+ }).pipe(Effect.provide(layer));
102
+ });
103
+
104
+ it.effect("shares one helper between prepares that start while the first is running", () =>
105
+ Effect.gen(function* () {
106
+ const exit = yield* Deferred.make<void>();
107
+ const { layer, commands } = setup({ stdout: '{"value":"en-US"}', exitCode: 0, exit });
108
+ return yield* Effect.gen(function* () {
109
+ const speech = yield* AppleSpeech.AppleSpeech;
110
+ const first = yield* speech
111
+ .prepare("en-US")
112
+ .pipe(Effect.forkChild({ startImmediately: true }));
113
+ const second = yield* speech
114
+ .prepare("en-US")
115
+ .pipe(Effect.forkChild({ startImmediately: true }));
116
+ yield* Deferred.succeed(exit, undefined);
117
+ assert.deepEqual(yield* Fiber.join(first), { ok: true, value: "en-US" });
118
+ assert.deepEqual(yield* Fiber.join(second), { ok: true, value: "en-US" });
119
+ assert.lengthOf(commands, 1);
120
+ }).pipe(Effect.provide(layer));
121
+ }),
122
+ );
123
+
124
+ it.effect.each([
125
+ ["25.0.0", 0, ["en-US", "fr-FR"], 1],
126
+ ["25.0.0", 3, [], 1],
127
+ ["25.0.0", 1, [], 2],
128
+ ["24.6.0", 0, [], 0],
129
+ ] as const)(
130
+ "on Darwin %s resolves locales on helper exit %i to %j with %i probe(s) across two calls",
131
+ ([release, exitCode, expected, probes]) => {
132
+ const { layer, commands } = setup({ stdout: '{"value":"en-US,fr-FR"}', exitCode }, release);
133
+ return Effect.gen(function* () {
134
+ const speech = yield* AppleSpeech.AppleSpeech;
135
+ assert.deepEqual(yield* speech.supportedLocales, expected);
136
+ assert.deepEqual(yield* speech.supportedLocales, expected);
137
+ assert.lengthOf(commands, probes);
138
+ }).pipe(Effect.provide(layer));
139
+ },
140
+ );
141
+
142
+ it.effect("transcribes Float32 PCM through a 16-bit WAV file", () => {
143
+ const { layer, commands, written } = setup({ stdout: '{"value":"hello"}', exitCode: 0 });
144
+ // An unaligned Buffer view: Buffer.slice and subarray do not copy.
145
+ const pcm = new Uint8Array(17);
146
+ new DataView(pcm.buffer).setFloat32(1, 0, true);
147
+ new DataView(pcm.buffer).setFloat32(5, 1, true);
148
+ new DataView(pcm.buffer).setFloat32(9, -1, true);
149
+ new DataView(pcm.buffer).setFloat32(13, 2, true);
150
+ return Effect.gen(function* () {
151
+ const result = yield* (yield* AppleSpeech.AppleSpeech).transcribe(
152
+ "en-US",
153
+ Buffer.from(pcm.buffer).subarray(1),
154
+ );
155
+ assert.deepEqual(result, { ok: true, value: "hello" });
156
+ assert.deepEqual(commands, [
157
+ [
158
+ "/app/Resources/apple-speech/t3-apple-speech",
159
+ "transcribe",
160
+ "en-US",
161
+ "/tmp/recording.wav",
162
+ ],
163
+ ]);
164
+ const wav = new DataView(written[0]!.buffer);
165
+ assert.equal(new TextDecoder().decode(written[0]!.subarray(0, 4)), "RIFF");
166
+ assert.equal(wav.getUint16(20, true), 1);
167
+ assert.equal(wav.getUint32(24, true), 16_000);
168
+ assert.equal(wav.getUint16(34, true), 16);
169
+ assert.equal(wav.getUint32(40, true), 8);
170
+ assert.deepEqual(
171
+ [0, 1, 2, 3].map((index) => wav.getInt16(44 + index * 2, true)),
172
+ [0, 32767, -32767, 32767],
173
+ );
174
+ }).pipe(Effect.provide(layer));
175
+ });
176
+});
apps/desktop/src/speech/AppleSpeech.ts
new
+191
@@ -0,0 +1,191 @@
1
+import type { DesktopAppleSpeechResult } from "@t3tools/contracts";
2
+import * as HostProcess from "@t3tools/shared/HostProcess";
3
+import * as Context from "effect/Context";
4
+import * as Duration from "effect/Duration";
5
+import * as Effect from "effect/Effect";
6
+import * as FileSystem from "effect/FileSystem";
7
+import * as Layer from "effect/Layer";
8
+import * as Schema from "effect/Schema";
9
+import * as Semaphore from "effect/Semaphore";
10
+import * as Stream from "effect/Stream";
11
+import { ChildProcess, ChildProcessSpawner } from "effect/process";
12
+
13
+import * as DesktopEnvironment from "../app/DesktopEnvironment.ts";
14
+
15
+const SAMPLE_RATE = 16_000;
16
+const MAX_PCM_BYTES = SAMPLE_RATE * Float32Array.BYTES_PER_ELEMENT * 5 * 60;
17
+// Preparing a language for the first time downloads Apple's model.
18
+const PREPARE_TIMEOUT = Duration.minutes(10);
19
+const TRANSCRIBE_TIMEOUT = Duration.minutes(5);
20
+
21
+const decodeOutput = Schema.decodeUnknownEffect(
22
+ Schema.fromJsonString(Schema.Struct({ value: Schema.String })),
23
+);
24
+
25
+/** 16 kHz mono Float32 PCM to a 16-bit WAV that AVAudioFile reads. */
26
+function encodeSpeechWav(pcmBytes: Uint8Array): Uint8Array {
27
+ // Float32Array needs a 4-byte-aligned offset; copy a view that is not (Buffer.slice is a view).
28
+ const aligned =
29
+ pcmBytes.byteOffset % Float32Array.BYTES_PER_ELEMENT === 0
30
+ ? pcmBytes
31
+ : new Uint8Array(pcmBytes);
32
+ const samples = new Float32Array(
33
+ aligned.buffer,
34
+ aligned.byteOffset,
35
+ aligned.byteLength / Float32Array.BYTES_PER_ELEMENT,
36
+ );
37
+ const wav = new Uint8Array(44 + samples.length * 2);
38
+ const view = new DataView(wav.buffer);
39
+ const ascii = (offset: number, text: string) => {
40
+ for (let index = 0; index < text.length; index++)
41
+ view.setUint8(offset + index, text.charCodeAt(index));
42
+ };
43
+ ascii(0, "RIFF");
44
+ view.setUint32(4, 36 + samples.length * 2, true);
45
+ ascii(8, "WAVE");
46
+ ascii(12, "fmt ");
47
+ view.setUint32(16, 16, true);
48
+ view.setUint16(20, 1, true);
49
+ view.setUint16(22, 1, true);
50
+ view.setUint32(24, SAMPLE_RATE, true);
51
+ view.setUint32(28, SAMPLE_RATE * 2, true);
52
+ view.setUint16(32, 2, true);
53
+ view.setUint16(34, 16, true);
54
+ ascii(36, "data");
55
+ view.setUint32(40, samples.length * 2, true);
56
+ samples.forEach((sample, index) => {
57
+ const clamped = Number.isFinite(sample) ? Math.max(-1, Math.min(1, sample)) : 0;
58
+ view.setInt16(44 + index * 2, Math.round(clamped * 0x7fff), true);
59
+ });
60
+ return wav;
61
+}
62
+
63
+export class AppleSpeech extends Context.Service<
64
+ AppleSpeech,
65
+ {
66
+ readonly supportedLocales: Effect.Effect<readonly string[]>;
67
+ readonly prepare: (locale: string) => Effect.Effect<DesktopAppleSpeechResult>;
68
+ readonly transcribe: (
69
+ locale: string,
70
+ pcm: Uint8Array,
71
+ ) => Effect.Effect<DesktopAppleSpeechResult>;
72
+ }
73
+>()("@t3tools/desktop/speech/AppleSpeech") {}
74
+
75
+const unavailable: DesktopAppleSpeechResult = { ok: false, code: "unavailable" };
76
+const failed: DesktopAppleSpeechResult = { ok: false, code: "failed" };
77
+
78
+export const layer = Layer.effect(
79
+ AppleSpeech,
80
+ Effect.gen(function* () {
81
+ const environment = yield* DesktopEnvironment.DesktopEnvironment;
82
+ const fileSystem = yield* FileSystem.FileSystem;
83
+ const spawner = yield* ChildProcessSpawner.ChildProcessSpawner;
84
+ const hostEnvironment = yield* HostProcess.Environment;
85
+ const kernelRelease = yield* HostProcess.KernelRelease;
86
+
87
+ let helper: string | undefined;
88
+ // macOS 26 is Darwin 25, the helper's minimum deployment target.
89
+ if (environment.platform === "darwin" && Number.parseInt(kernelRelease, 10) >= 25) {
90
+ const candidate = environment.isPackaged
91
+ ? environment.path.join(environment.resourcesPath, "apple-speech", "t3-apple-speech")
92
+ : environment.path.join(
93
+ environment.rootDir,
94
+ "native",
95
+ "apple-speech",
96
+ "build",
97
+ environment.processArch,
98
+ "t3-apple-speech",
99
+ );
100
+ if (yield* fileSystem.exists(candidate).pipe(Effect.orElseSucceed(() => false)))
101
+ helper = candidate;
102
+ }
103
+
104
+ const run = (args: readonly string[], timeout: Duration.Input) =>
105
+ Effect.scoped(
106
+ Effect.gen(function* () {
107
+ if (helper === undefined) return unavailable;
108
+ const handle = yield* spawner.spawn(
109
+ ChildProcess.make(helper, args, { stdin: "ignore", env: hostEnvironment }),
110
+ );
111
+ const [stdout, stderr, exitCode] = yield* Effect.all(
112
+ [
113
+ handle.stdout.pipe(Stream.decodeText(), Stream.mkString),
114
+ handle.stderr.pipe(Stream.decodeText(), Stream.mkString),
115
+ handle.exitCode,
116
+ ],
117
+ { concurrency: "unbounded" },
118
+ );
119
+ switch (Number(exitCode)) {
120
+ case 0:
121
+ return { ok: true, value: (yield* decodeOutput(stdout)).value } as const;
122
+ case 2:
123
+ return { ok: false, code: "unsupported-locale" } as const;
124
+ case 3:
125
+ return unavailable;
126
+ default:
127
+ yield* Effect.logWarning("Apple Speech helper failed", { exitCode, stderr });
128
+ return failed;
129
+ }
130
+ }),
131
+ ).pipe(
132
+ // Leaving the scope kills a helper that outlives its timeout.
133
+ Effect.timeoutOrElse({ duration: timeout, orElse: () => Effect.succeed(failed) }),
134
+ Effect.catch((cause) =>
135
+ Effect.logWarning("Apple Speech helper did not run", { cause }).pipe(Effect.as(failed)),
136
+ ),
137
+ );
138
+
139
+ // Only a definite answer is kept; a slow or failed probe is asked again next time.
140
+ let locales: readonly string[] | undefined;
141
+ const supportedLocales = Effect.suspend(() =>
142
+ locales === undefined
143
+ ? run(["available"], Duration.seconds(10)).pipe(
144
+ Effect.map((result) => {
145
+ if (result.ok) locales = result.value.split(",").filter(Boolean);
146
+ else if (result.code === "unavailable") locales = [];
147
+ return locales ?? [];
148
+ }),
149
+ )
150
+ : Effect.succeed(locales),
151
+ );
152
+
153
+ const pending = new Map<string, Effect.Effect<DesktopAppleSpeechResult>>();
154
+ const preparePermit = yield* Semaphore.make(1);
155
+ const getPendingPrepare = Effect.fn("AppleSpeech.getPendingPrepare")(function* (
156
+ locale: string,
157
+ ) {
158
+ const existing = pending.get(locale);
159
+ if (existing) return existing;
160
+ const preparation = yield* Effect.cached(
161
+ run(["prepare", locale], PREPARE_TIMEOUT).pipe(
162
+ Effect.ensuring(Effect.sync(() => pending.delete(locale))),
163
+ ),
164
+ );
165
+ pending.set(locale, preparation);
166
+ return preparation;
167
+ }, preparePermit.withPermits(1));
168
+
169
+ return AppleSpeech.of({
170
+ supportedLocales,
171
+ prepare: Effect.fn("AppleSpeech.prepare")(function* (locale) {
172
+ return yield* yield* getPendingPrepare(locale);
173
+ }),
174
+ transcribe: Effect.fn("AppleSpeech.transcribe")(function* (locale, pcm) {
175
+ if (
176
+ pcm.byteLength === 0 ||
177
+ pcm.byteLength > MAX_PCM_BYTES ||
178
+ pcm.byteLength % Float32Array.BYTES_PER_ELEMENT !== 0
179
+ )
180
+ return failed;
181
+ return yield* Effect.scoped(
182
+ Effect.gen(function* () {
183
+ const file = yield* fileSystem.makeTempFileScoped({ suffix: ".wav" });
184
+ yield* fileSystem.writeFile(file, encodeSpeechWav(pcm));
185
+ return yield* run(["transcribe", locale, file], TRANSCRIBE_TIMEOUT);
186
+ }),
187
+ ).pipe(Effect.orElseSucceed(() => failed));
188
+ }),
189
+ });
190
+ }),
191
+);
apps/desktop/vite.config.ts
+3
-3
@@ -31,7 +31,7 @@ export default defineConfig({
31
tasks: {
32
build: {
33
command:
34
- "node scripts/build-browser-secret.mjs && node scripts/build-preview-annotation-css.mjs && vp pack",
34
+ "node scripts/build-browser-secret.mjs && node scripts/build-apple-speech.mjs && node scripts/build-preview-annotation-css.mjs && vp pack",
35
dependsOn: ["t3#build"],
36
cache: false,
37
},
@@ -43,13 +43,13 @@ export default defineConfig({
43
},
44
dev: {
45
command:
46
- "node scripts/build-browser-secret.mjs && node scripts/build-preview-annotation-css.mjs && cross-env T3CODE_DESKTOP_DEV=1 vp pack --watch",
46
+ "node scripts/build-browser-secret.mjs && node scripts/build-apple-speech.mjs && node scripts/build-preview-annotation-css.mjs && cross-env T3CODE_DESKTOP_DEV=1 vp pack --watch",
47
dependsOn: ["t3#build"],
48
cache: false,
49
},
50
"dev:bundle": {
51
command:
52
- "node scripts/build-browser-secret.mjs && node scripts/build-preview-annotation-css.mjs && vp pack --watch",
52
+ "node scripts/build-browser-secret.mjs && node scripts/build-apple-speech.mjs && node scripts/build-preview-annotation-css.mjs && vp pack --watch",
53
cache: false,
54
},
55
"dev:electron": {
apps/mobile/fingerprint.config.js
+9
-1
@@ -14,5 +14,13 @@ if (!majorVersion) {
14
15
module.exports = {
16
nativeModuleSourceType: "files",
17
- extraSources: [{ type: "contents", id: "appMajorVersion", contents: majorVersion }],
17
+ extraSources: [
18
+ { type: "contents", id: "appMajorVersion", contents: majorVersion },
19
+ // Expo skips symlinks when hashing local modules.
20
+ {
21
+ type: "file",
22
+ filePath: "../../native/apple-speech/AppleSpeechEngine.swift",
23
+ reasons: ["appleSpeech"],
24
+ },
25
+ ],
26
};
apps/mobile/modules/t3-voice-transcription/ios/AppleSpeechEngine.swift
new
+1
@@ -0,0 +1 @@
1
+../../../../../native/apple-speech/AppleSpeechEngine.swift
\ No newline at end of file
apps/mobile/modules/t3-voice-transcription/ios/T3VoiceTranscriptionModule.swift
+19
@@ -6,6 +6,25 @@ public class T3VoiceTranscriptionModule: Module {
6
public func definition() -> ModuleDefinition {
7
Name("T3VoiceTranscription")
8
9
+ Function("isAppleSpeechAvailable") {
10
+ if #available(iOS 26, *) { return AppleSpeechEngine.isAvailable }
11
+ return false
12
+ }
13
+
14
+ AsyncFunction("prepareAppleSpeech") { (locale: String) async throws -> String? in
15
+ guard #available(iOS 26, *) else { throw CocoaError(.featureUnsupported) }
16
+ do {
17
+ return try await AppleSpeechEngine.prepare(locale)
18
+ } catch AppleSpeechEngine.Failure.unsupportedLocale {
19
+ return nil
20
+ }
21
+ }
22
+
23
+ AsyncFunction("transcribeWithAppleSpeech") { (uri: URL, locale: String) async throws -> String in
24
+ guard #available(iOS 26, *) else { throw CocoaError(.featureUnsupported) }
25
+ return try await AppleSpeechEngine.transcribe(locale, file: uri)
26
+ }
27
+
28
AsyncFunction("decodeRecording") { (uri: URL) throws -> Data in
29
guard uri.isFileURL else { throw CocoaError(.fileReadUnsupportedScheme) }
30
var opened: ExtAudioFileRef?
apps/mobile/package.json
-1
@@ -68,7 +68,6 @@
68
"@material/material-color-utilities": "0.3.0",
69
"@pierre/diffs": "catalog:",
70
"@pierre/highlights": "catalog:",
71
- "@react-native-ai/apple": "0.12.0",
71
"@react-native-menu/menu": "^2.0.0",
72
"@react-navigation/elements": "2.9.45",
73
"@react-navigation/native": "7.5.1",
apps/mobile/src/native/voiceTranscription.ios.test.ts
+25
-47
@@ -1,14 +1,12 @@
1
-import type { TranscriptionResult } from "@react-native-ai/apple/src/NativeAppleTranscription";
1
import { afterEach, beforeEach, describe, expect, it, vi } from "vite-plus/test";
2
3
import { VoiceInputController, VoiceTranscriptionError } from "@t3tools/client-runtime/voice-input";
4
import { resetVoiceInputGlobalsForTests } from "../../../../packages/client-runtime/src/voice-input/controller";
5
6
const mocks = vi.hoisted(() => ({
8
- isAvailable: vi.fn<(locale: string) => boolean>(),
9
- prepare: vi.fn<(locale: string) => Promise<string>>(),
10
- transcribe: vi.fn<(audio: ArrayBufferLike, locale: string) => Promise<TranscriptionResult>>(),
11
- readAudio: vi.fn<() => Promise<ArrayBuffer>>(),
7
+ isAvailable: vi.fn<() => boolean>(),
8
+ prepare: vi.fn<(locale: string) => Promise<string | null>>(),
9
+ transcribe: vi.fn<(uri: string, locale: string) => Promise<string>>(),
10
preferredLanguages: [] as unknown,
11
}));
12
@@ -17,34 +15,16 @@ vi.mock("react-native", () => ({
15
Settings: { get: (key: string) => (key === "AppleLanguages" ? mocks.preferredLanguages : null) },
16
}));
17
20
-vi.mock("@react-native-ai/apple/src/NativeAppleTranscription", () => ({
21
- default: {
22
- isAvailable: mocks.isAvailable,
23
- prepare: mocks.prepare,
24
- transcribe: mocks.transcribe,
25
- },
26
-}));
27
-
28
-vi.mock("expo-file-system", () => ({
29
- File: class {
30
- arrayBuffer = mocks.readAudio;
31
- },
18
+vi.mock("expo", () => ({
19
+ requireOptionalNativeModule: () => ({
20
+ isAppleSpeechAvailable: mocks.isAvailable,
21
+ prepareAppleSpeech: mocks.prepare,
22
+ transcribeWithAppleSpeech: mocks.transcribe,
23
+ }),
24
}));
25
26
import { getLocalVoiceTranscriber } from "./voiceTranscription.ios";
27
36
-const audio = new ArrayBuffer(4);
37
-const nativeTranscript: TranscriptionResult = {
38
- duration: 2,
39
- segments: [
40
- { text: " Hej", startSecond: 0, endSecond: 1 },
41
- { text: "världen. ", startSecond: 1, endSecond: 2 },
42
- ],
43
-};
44
-
45
-const unsupportedLocale = () =>
46
- Object.assign(new Error("unsupported"), { code: "AppleTranscriptionUnsupportedLocale" });
47
-
28
function useLanguages(preferred: ReadonlyArray<string>, appLocale: string) {
29
mocks.preferredLanguages = preferred;
30
const resolvedOptions = Intl.DateTimeFormat().resolvedOptions();
@@ -106,8 +86,7 @@ beforeEach(() => {
86
useLanguages([], "sv-SE");
87
mocks.isAvailable.mockReturnValue(true);
88
mocks.prepare.mockResolvedValue("sv-SE");
109
- mocks.readAudio.mockResolvedValue(audio);
110
- mocks.transcribe.mockResolvedValue(nativeTranscript);
89
+ mocks.transcribe.mockResolvedValue("Hej världen.");
90
});
91
92
afterEach(() => {
@@ -137,19 +116,19 @@ describe("getLocalVoiceTranscriber", () => {
116
])("prepares $case", async ({ preferred, supported, tried }) => {
117
useLanguages(preferred, "en-US");
118
mocks.prepare.mockImplementation(async (candidate) => {
140
- if (!supported.includes(candidate)) throw unsupportedLocale();
119
+ if (!supported.includes(candidate)) return null;
120
return candidate;
121
});
122
123
const locale = tried.at(-1)!;
124
expect(await transcribeOnce()).toEqual({ text: "Hej världen.", locale });
125
expect(mocks.prepare.mock.calls.map(([candidate]) => candidate)).toEqual(tried);
147
- expect(mocks.transcribe).toHaveBeenCalledWith(audio, locale);
126
+ expect(mocks.transcribe).toHaveBeenCalledWith("file:///voice.m4a", locale);
127
});
128
129
it("reports an unsupported language when neither preferred nor app locales are supported", async () => {
130
useLanguages(["gsw-CH"], "yi");
152
- mocks.prepare.mockRejectedValue(unsupportedLocale());
131
+ mocks.prepare.mockResolvedValue(null);
132
133
expect(await transcribeOnce()).toMatchObject({ code: "unsupported-locale" });
134
expect(mocks.prepare.mock.calls.map(([candidate]) => candidate)).toEqual(["gsw-CH", "yi"]);
@@ -160,7 +139,7 @@ describe("getLocalVoiceTranscriber", () => {
139
async (failure) => {
140
useLanguages(["ko-KR", "ja-JP"], "en-US");
141
const entered = Promise.withResolvers<void>();
163
- const nativePrepare = Promise.withResolvers<string>();
142
+ const nativePrepare = Promise.withResolvers<string | null>();
143
mocks.prepare.mockImplementation(() => {
144
entered.resolve();
145
return nativePrepare.promise;
@@ -171,7 +150,7 @@ describe("getLocalVoiceTranscriber", () => {
150
await entered.promise;
151
if (failure === "cancellation") {
152
controller.abort();
174
- nativePrepare.reject(unsupportedLocale());
153
+ nativePrepare.resolve(null);
154
} else {
155
nativePrepare.reject(Object.assign(new Error("download failed"), { code: "Network" }));
156
}
@@ -184,7 +163,7 @@ describe("getLocalVoiceTranscriber", () => {
163
);
164
165
it("records while Apple prepares its speech model and transcribes once it is ready", async () => {
187
- const nativePrepare = Promise.withResolvers<string>();
166
+ const nativePrepare = Promise.withResolvers<string | null>();
167
mocks.prepare.mockReturnValue(nativePrepare.promise);
168
const dictation = createDictation();
169
@@ -204,7 +183,7 @@ describe("getLocalVoiceTranscriber", () => {
183
it.each(["cancel", "cancel after stop", "model failure", "model failure after stop"] as const)(
184
"discards early audio without a late commit after %s",
185
async (ending) => {
207
- const nativePrepare = Promise.withResolvers<string>();
186
+ const nativePrepare = Promise.withResolvers<string | null>();
187
mocks.prepare.mockReturnValue(nativePrepare.promise);
188
const dictation = createDictation();
189
await dictation.controller.start();
@@ -240,12 +219,12 @@ describe("getLocalVoiceTranscriber", () => {
219
},
220
);
221
243
- it("does not start native transcription after cancellation during a file read", async () => {
244
- const enteredRead = Promise.withResolvers<void>();
245
- const readResult = Promise.withResolvers<ArrayBuffer>();
246
- mocks.readAudio.mockImplementation(() => {
247
- enteredRead.resolve();
248
- return readResult.promise;
222
+ it("discards transcription if cancelled while the native module reads the recording", async () => {
223
+ const entered = Promise.withResolvers<void>();
224
+ const transcription = Promise.withResolvers<string>();
225
+ mocks.transcribe.mockImplementation(() => {
226
+ entered.resolve();
227
+ return transcription.promise;
228
});
229
const controller = new AbortController();
230
const options = { signal: controller.signal };
@@ -254,13 +233,12 @@ describe("getLocalVoiceTranscriber", () => {
233
.transcribe("file:///voice.m4a", options)
234
.catch((error: unknown) => error);
235
257
- await enteredRead.promise;
236
+ await entered.promise;
237
controller.abort();
259
- readResult.resolve(audio);
238
+ transcription.resolve("Hej världen.");
239
240
const error = await result;
241
expect(error).toBeInstanceOf(VoiceTranscriptionError);
242
expect(error).toMatchObject({ code: "cancelled" });
264
- expect(mocks.transcribe).not.toHaveBeenCalled();
243
});
244
});
apps/mobile/src/native/voiceTranscription.ios.ts
+38
-36
@@ -1,6 +1,5 @@
1
import * as Schema from "effect/Schema";
2
-import AppleTranscription from "@react-native-ai/apple/src/NativeAppleTranscription";
3
-import { File } from "expo-file-system";
2
+import { requireOptionalNativeModule } from "expo";
3
import { msg } from "gt-react-native";
4
import { Settings } from "react-native";
5
import { m } from "../i18n/messages";
@@ -13,6 +12,13 @@ import {
12
type VoiceTranscriptionOptions,
13
} from "@t3tools/client-runtime/voice-input";
14
15
+interface AppleSpeechModule {
16
+ isAppleSpeechAvailable?: () => boolean;
17
+ prepareAppleSpeech: (locale: string) => Promise<string | null>;
18
+ transcribeWithAppleSpeech: (uri: string, locale: string) => Promise<string>;
19
+}
20
+
21
+const native = requireOptionalNativeModule<AppleSpeechModule>("T3VoiceTranscription");
22
const isVoiceTranscriptionError = Schema.is(VoiceTranscriptionError);
23
24
/** The user's ordered Language & Region list, then the app locale; the app ships in English only. */
@@ -38,27 +44,20 @@ function wrapError(
44
return new VoiceTranscriptionError({ code, message, cause });
45
}
46
41
-function getNativeErrorCode(error: unknown): string | undefined {
42
- if (typeof error !== "object" || error === null || !("code" in error)) {
43
- return undefined;
44
- }
45
-
46
- return typeof error.code === "string" ? error.code : undefined;
47
-}
48
-
47
export async function getLocalVoiceTranscriber(): Promise<VoiceTranscriber | null> {
48
const locales = getPreferredLocales();
49
// Availability is a device and OS check; which languages have a model only `prepare` knows.
52
- if (!AppleTranscription.isAvailable(locales[0]!)) return null;
53
- return { prepare: (options) => prepareVoiceTranscription(locales, options) };
50
+ if (!native?.isAppleSpeechAvailable?.()) return null;
51
+ return { prepare: (options) => prepareVoiceTranscription(native, locales, options) };
52
}
53
54
async function prepareVoiceTranscription(
55
+ native: AppleSpeechModule,
56
locales: readonly string[],
57
{ signal }: VoiceTranscriptionOptions,
58
): Promise<PreparedVoiceTranscription> {
59
throwIfVoiceTranscriptionAborted(signal);
61
- if (!AppleTranscription.isAvailable(locales[0]!)) {
60
+ if (!native?.isAppleSpeechAvailable?.()) {
61
throw new VoiceTranscriptionError({
62
code: "unavailable",
63
message: m(
@@ -70,7 +69,7 @@ async function prepareVoiceTranscription(
69
}
70
71
let locale = locales[0]!;
73
- const model = prepareLocales(locales, signal).then((supported) => {
72
+ const model = prepareLocales(native, locales, signal).then((supported) => {
73
locale = supported;
74
});
75
// Recorder setup can fail before either consumer observes the model.
@@ -98,16 +97,20 @@ async function prepareVoiceTranscription(
97
return null;
98
},
99
transcribe: async (uri, options) =>
101
- transcribeVoiceRecording(uri, await ready(options.signal), options),
100
+ transcribeVoiceRecording(native, uri, await ready(options.signal), options),
101
};
102
}
103
105
-async function prepareLocales(locales: readonly string[], signal: AbortSignal): Promise<string> {
104
+async function prepareLocales(
105
+ native: AppleSpeechModule,
106
+ locales: readonly string[],
107
+ signal: AbortSignal,
108
+): Promise<string> {
109
throwIfVoiceTranscriptionAborted(signal);
110
let unsupported: VoiceTranscriptionError | undefined;
111
for (const locale of locales) {
112
try {
110
- return await prepareLocale(locale, signal);
113
+ return await prepareLocale(native, locale, signal);
114
} catch (error) {
115
if (!isVoiceTranscriptionError(error) || error.code !== "unsupported-locale") throw error;
116
unsupported = error;
@@ -116,44 +119,43 @@ async function prepareLocales(locales: readonly string[], signal: AbortSignal):
119
throw unsupported!;
120
}
121
119
-async function prepareLocale(locale: string, signal: AbortSignal): Promise<string> {
122
+async function prepareLocale(
123
+ native: AppleSpeechModule,
124
+ locale: string,
125
+ signal: AbortSignal,
126
+): Promise<string> {
127
+ let supportedLocale: string | null;
128
try {
121
- const supportedLocale = await AppleTranscription.prepare(locale);
122
- throwIfVoiceTranscriptionAborted(signal);
123
- return supportedLocale;
129
+ supportedLocale = await native.prepareAppleSpeech(locale);
130
} catch (error) {
131
throwIfVoiceTranscriptionAborted(signal);
126
- if (getNativeErrorCode(error) === "AppleTranscriptionUnsupportedLocale") {
127
- throw new VoiceTranscriptionError({
128
- code: "unsupported-locale",
129
- message: m(msg("Voice transcription does not support any of your languages.")),
130
- cause: error,
131
- });
132
- }
133
-
132
throw wrapError(
133
"preparation-failed",
134
m(msg("Voice transcription could not prepare this language.")),
135
error,
136
);
137
}
138
+ throwIfVoiceTranscriptionAborted(signal);
139
+ if (supportedLocale === null) {
140
+ throw new VoiceTranscriptionError({
141
+ code: "unsupported-locale",
142
+ message: m(msg("Voice transcription does not support any of your languages.")),
143
+ });
144
+ }
145
+ return supportedLocale;
146
}
147
148
async function transcribeVoiceRecording(
149
+ native: AppleSpeechModule,
150
uri: string,
151
locale: string,
152
{ signal }: VoiceTranscriptionOptions,
153
): Promise<string> {
154
try {
155
throwIfVoiceTranscriptionAborted(signal);
149
- const audio = await new File(uri).arrayBuffer();
150
- throwIfVoiceTranscriptionAborted(signal);
151
- const result = await AppleTranscription.transcribe(audio, locale);
156
+ const text = await native.transcribeWithAppleSpeech(uri, locale);
157
throwIfVoiceTranscriptionAborted(signal);
153
- return result.segments
154
- .map((segment) => segment.text)
155
- .join(" ")
156
- .trim();
158
+ return text;
159
} catch (error) {
160
throwIfVoiceTranscriptionAborted(signal);
161
throw wrapError("transcription-failed", m(msg("Voice transcription failed.")), error);
apps/web/src/components/chat/GlobalVoiceInputIndicator.tsx
+1
-2
@@ -15,8 +15,7 @@ import { ComposerSpeechRecordingPill } from "./ComposerSpeechButton";
15
*/
16
export function GlobalVoiceInputIndicator({ hidden = false }: { hidden?: boolean }) {
17
const gt = useGT();
18
- const { prepared, grantId, cloudProvider, cloudModel } = useVoiceTranscriptionDestination();
19
- const session = useRetainedVoiceInputSession({ prepared, grantId, cloudProvider, cloudModel });
18
+ const session = useRetainedVoiceInputSession(useVoiceTranscriptionDestination());
19
const { state, target, recordingStartedAt } = useVoiceInputSessionSnapshot(session);
20
const presented = useVoiceOwnerPresented(target?.ownerKey ?? null);
21
const { level } = useVoiceInputSessionActivity(
apps/web/src/components/settings/SpeechLanguageSelect.tsx
+9
-2
@@ -19,7 +19,13 @@ type ModelLanguages = Pick<
19
"languages" | "supportsLanguageDetection"
20
>;
21
22
-export function SpeechLanguageSelect({ model }: { readonly model: ModelLanguages | null }) {
22
+export function SpeechLanguageSelect({
23
+ model,
24
+ automaticLabel,
25
+}: {
26
+ readonly model: ModelLanguages | null;
27
+ readonly automaticLabel?: string | undefined;
28
+}) {
29
const gt = useGT();
30
const locale = useLocale();
31
const preference = useClientSettings((settings) => settings.speechLanguage);
@@ -30,7 +36,8 @@ export function SpeechLanguageSelect({ model }: { readonly model: ModelLanguages
36
preference,
37
)
38
: preference;
33
- const effectiveLabel = resolved === "auto" ? gt("Auto-detect") : languageLabel(resolved, locale);
39
+ const effectiveLabel =
40
+ resolved === "auto" ? (automaticLabel ?? gt("Auto-detect")) : languageLabel(resolved, locale);
41
const unavailable =
42
preference !== "auto" && preference !== resolved
43
? gt("{language} unavailable", { language: languageLabel(preference, locale) })
apps/web/src/components/settings/VoiceSettingsPanel.tsx
+84
-26
@@ -44,6 +44,7 @@ import {
44
DownloadIcon,
45
LanguagesIcon,
46
KeyRoundIcon,
47
+ LaptopIcon,
48
MonitorIcon,
49
MicOffIcon,
50
MicIcon,
@@ -59,6 +60,7 @@ import { useEffect, useRef, useState, type ReactNode } from "react";
60
import { msg, T, useGT, useLocale, useMessages, Var } from "gt-react";
61
62
import { useStableCallback } from "~/hooks/useStableCallback";
63
+import { supportsAppleSpeechLocale, useAppleSpeechLocales } from "../../speech/appleSpeech";
64
import { cn } from "~/lib/utils";
65
import {
66
listAudioInputs,
@@ -88,6 +90,7 @@ import { useEnvironmentScope } from "../../state/session";
90
import { EMPTY_SERVER_PROVIDERS } from "../../state/server";
91
import {
92
useEnvironmentSpeechInput,
93
+ APPLE_SPEECH_LABEL,
94
useVoiceTranscriptionDestination,
95
} from "../../speech/useEnvironmentSpeechInput";
96
import { ComposerSpeechRecordingPill } from "../chat/ComposerSpeechButton";
@@ -146,6 +149,7 @@ import { useScopedModelDisabledReason } from "./useScopedModelAvailability";
149
import { useScopedSettings, useUpdateScopedSettings } from "./useScopedSettings";
150
151
const OFF = "off";
152
+const DEVICE = "device";
153
function CloudSpeechLogo({ provider }: { provider: CloudSpeechProvider }) {
154
if (provider === "openrouter")
155
return <ProviderPackageIcon icon={openRouterIcon} aria-hidden className="size-4 shrink-0" />;
@@ -1321,6 +1325,16 @@ export function VoiceSettingsPanel() {
1325
const settings = useClientSettings();
1326
const settingsScope = useOptionalSettingsScope();
1327
const destination = useVoiceTranscriptionDestination();
1328
+ const appleSpeechLocales = useAppleSpeechLocales();
1329
+ const appleSpeechLanguages =
1330
+ !appleSpeechLocales.includes(settings.speechLanguage) &&
1331
+ supportsAppleSpeechLocale(appleSpeechLocales, settings.speechLanguage)
1332
+ ? [...appleSpeechLocales, settings.speechLanguage]
1333
+ : appleSpeechLocales;
1334
+ const appleSpeechAvailable = appleSpeechLocales.length > 0;
1335
+ const appleSpeechLabel = appleSpeechAvailable
1336
+ ? APPLE_SPEECH_LABEL
1337
+ : gt("Apple Speech (unavailable)");
1338
const canManageKey = useEnvironmentScope(destination.environmentId, AuthSettingsWriteScope);
1339
const [pendingCloud, setPendingCloud] = useState<{
1340
provider: CloudSpeechProvider;
@@ -1377,11 +1391,13 @@ export function VoiceSettingsPanel() {
1391
})),
1392
}));
1393
const cloudChoices = cloudGroups.flatMap((group) => group.choices);
1380
- const destinationValue = destination.cloudProvider
1381
- ? JSON.stringify(["cloud", destination.environmentId, destination.cloudProvider])
1382
- : destination.environmentId
1383
- ? JSON.stringify(["environment", destination.environmentId])
1384
- : OFF;
1394
+ const destinationValue = destination.device
1395
+ ? DEVICE
1396
+ : destination.cloudProvider
1397
+ ? JSON.stringify(["cloud", destination.environmentId, destination.cloudProvider])
1398
+ : destination.environmentId
1399
+ ? JSON.stringify(["environment", destination.environmentId])
1400
+ : OFF;
1401
const cloudEnvironment = environments.find(
1402
(env) => env.environmentId === pendingCloud?.environmentId,
1403
);
@@ -1401,7 +1417,9 @@ export function VoiceSettingsPanel() {
1417
<SettingsPageContainer
1418
searchTargetFallbacks={{
1419
"speech-language":
1404
- model || destination.cloudProvider ? undefined : "voice-transcription-destination",
1420
+ model || destination.cloudProvider || destination.device
1421
+ ? undefined
1422
+ : "voice-transcription-destination",
1423
"speech-models": prepared ? undefined : "voice-transcription-destination",
1424
"speech-hardware": prepared && model ? undefined : "voice-transcription-destination",
1425
"speech-streaming": prepared && model ? undefined : "voice-transcription-destination",
@@ -1512,6 +1530,7 @@ export function VoiceSettingsPanel() {
1530
setPendingCloud(null);
1531
const chosen = environmentChoices.find((choice) => choice.value === value);
1532
if (value === OFF) chooseAudioDestination(null);
1533
+ else if (value === DEVICE) chooseAudioDestination({ kind: "device" });
1534
else if (chosen)
1535
chooseAudioDestination({
1536
kind: "environment",
@@ -1526,7 +1545,9 @@ export function VoiceSettingsPanel() {
1545
>
1546
<SelectValue>
1547
<span className="flex min-w-0 items-center gap-2">
1529
- {destination.cloudProvider ? (
1548
+ {destination.device ? (
1549
+ <LaptopIcon aria-hidden className="size-4" />
1550
+ ) : destination.cloudProvider ? (
1551
<CloudSpeechLogo provider={destination.cloudProvider} />
1552
) : destination.environmentId ? (
1553
<MonitorIcon aria-hidden className="size-4" />
@@ -1534,11 +1555,13 @@ export function VoiceSettingsPanel() {
1555
<MicOffIcon aria-hidden className="size-4" />
1556
)}
1557
<span className="truncate">
1537
- {destination.cloudProvider
1538
- ? CLOUD_SPEECH_LABELS[destination.cloudProvider]
1539
- : destination.environmentId
1540
- ? (chosenEnvironment?.label ?? gt("Chosen environment (unavailable)"))
1541
- : gt("Off")}
1558
+ {destination.device
1559
+ ? appleSpeechLabel
1560
+ : destination.cloudProvider
1561
+ ? CLOUD_SPEECH_LABELS[destination.cloudProvider]
1562
+ : destination.environmentId
1563
+ ? (chosenEnvironment?.label ?? gt("Chosen environment (unavailable)"))
1564
+ : gt("Off")}
1565
{destination.cloudProvider && (
1566
<span className="text-muted-foreground">
1567
{" via "}
@@ -1556,6 +1579,19 @@ export function VoiceSettingsPanel() {
1579
<T>Off</T>
1580
</span>
1581
</SelectItem>
1582
+ {(appleSpeechAvailable || destination.device) && (
1583
+ <SelectGroup>
1584
+ <SelectGroupLabel>
1585
+ <T>On this Mac</T>
1586
+ </SelectGroupLabel>
1587
+ <SelectItem value={DEVICE}>
1588
+ <span className="flex items-center gap-2">
1589
+ <LaptopIcon aria-hidden className="size-4" />
1590
+ {appleSpeechLabel}
1591
+ </span>
1592
+ </SelectItem>
1593
+ </SelectGroup>
1594
+ )}
1595
{environmentChoices.length > 0 && (
1596
<SelectGroup>
1597
<SelectGroupLabel>
@@ -1643,22 +1679,37 @@ export function VoiceSettingsPanel() {
1679
close={() => setPendingCloud(null)}
1680
/>
1681
)}
1646
- {(model || destination.cloudProvider) && (
1682
+ {(model || destination.cloudProvider || destination.device) && (
1683
<SettingsRow
1684
{...setting("speech-language")}
1685
title={gt("Language")}
1686
description={
1651
- destination.cloudProvider
1652
- ? gt("The provider detects your language automatically.")
1653
- : model?.supportsLanguageDetection
1654
- ? gt("{model} detects the language automatically.", { model: model.model })
1655
- : model
1656
- ? gt("{model} uses one fixed language.", { model: model.model })
1657
- : gt("This model uses one fixed language.")
1687
+ destination.device
1688
+ ? gt(
1689
+ "Automatic uses your Mac’s language. The first use of a language downloads it.",
1690
+ )
1691
+ : destination.cloudProvider
1692
+ ? gt("The provider detects your language automatically.")
1693
+ : model?.supportsLanguageDetection
1694
+ ? gt("{model} detects the language automatically.", { model: model.model })
1695
+ : model
1696
+ ? gt("{model} uses one fixed language.", { model: model.model })
1697
+ : gt("This model uses one fixed language.")
1698
}
1699
control={
1700
<SpeechLanguageSelect
1661
- model={destination.cloudProvider ? cloudSpeechLanguages : model}
1701
+ automaticLabel={
1702
+ destination.device
1703
+ ? gt("Auto", { $context: "automatic language detection" })
1704
+ : undefined
1705
+ }
1706
+ model={
1707
+ destination.device
1708
+ ? { languages: appleSpeechLanguages, supportsLanguageDetection: true }
1709
+ : destination.cloudProvider
1710
+ ? cloudSpeechLanguages
1711
+ : model
1712
+ }
1713
/>
1714
}
1715
/>
@@ -1682,14 +1733,16 @@ export function VoiceSettingsPanel() {
1733
{...setting("speech-silence-filtering")}
1734
title={gt("Silence filtering")}
1735
description={
1685
- destination.cloudProvider === "openai"
1686
- ? gt("OpenAI handles silence itself.")
1687
- : gt("Skip silence and background noise before transcribing.")
1736
+ destination.device
1737
+ ? gt("Apple Speech handles silence itself.")
1738
+ : destination.cloudProvider === "openai"
1739
+ ? gt("OpenAI handles silence itself.")
1740
+ : gt("Skip silence and background noise before transcribing.")
1741
}
1742
control={
1743
<Switch
1744
aria-label={gt("Silence filtering")}
1692
- disabled={destination.cloudProvider === "openai"}
1745
+ disabled={destination.device || destination.cloudProvider === "openai"}
1746
checked={settings.speechSilenceFiltering}
1747
onCheckedChange={(checked) =>
1748
void updateClientSettings({ speechSilenceFiltering: checked })
@@ -1700,10 +1753,15 @@ export function VoiceSettingsPanel() {
1753
<SettingsRow
1754
{...setting("remove-filler-words")}
1755
title={gt("Remove filler words")}
1703
- description={gt("Drop “um” and “uh” from transcripts.")}
1756
+ description={
1757
+ destination.device
1758
+ ? gt("Not available with Apple Speech.")
1759
+ : gt("Drop “um” and “uh” from transcripts.")
1760
+ }
1761
control={
1762
<Switch
1763
aria-label={gt("Remove filler words")}
1764
+ disabled={destination.device}
1765
checked={settings.speechRemoveFillerWords}
1766
onCheckedChange={(checked) =>
1767
void updateClientSettings({ speechRemoveFillerWords: checked })
apps/web/src/i18n/translations/de.json
+16
-9
@@ -155,10 +155,9 @@
155
"0cb7a36802fe8089": "Filter {number} braucht einen Pfad unter body, headers oder query.",
156
"1fa38fb049c6b56e": "Filter {number} braucht einen Pfad unter body, headers oder query und mindestens einen Wert.",
157
"31ec02bdcb3920d1": "Filter {number} braucht einen Pfad unter body, headers oder query und einen Wert.",
158
+ "62ae4688ece05590": "Sicher gespeichert, dem Agenten nie angezeigt",
159
"81f613bb68d85bb7": "Nicht im Chat, sondern in einer privaten Datei, die die Befehle dieses Agenten 24 Stunden lang lesen können",
160
"07b56c0c12bd2de1": "Nicht im Chat, sondern in privaten Dateien, die die Befehle dieses Agenten 24 Stunden lang lesen können",
160
- "6435447ce7656f13": "{label} anzeigen",
161
- "62ae4688ece05590": "Sicher gespeichert, dem Agenten nie angezeigt",
161
"8c2d901183b4e219": "Geheimnis einfügen",
162
"610aea624f895a78": "Sicher gespeichert und privat gehalten",
163
"329b7854b7e0546e": "Verwende eine 1Password-Referenz wie {example}.",
@@ -892,6 +891,11 @@
891
"2605da0149cd15f1": "Kontext wird komprimiert",
892
"39a82db18ca50c21": "Kontext komprimiert: {before} → {after} Tokens",
893
"885ae08a2160a158": "Kontext komprimiert",
894
+ "4d4981a1c5bd9728": "Befehl läuft",
895
+ "a078225c5f197cd2": "Befehl fehlgeschlagen",
896
+ "37ab148aaa486051": "Befehl abgelehnt",
897
+ "0112efa1861c7a30": "Befehl gestoppt",
898
+ "930808342aac8010": "Befehl ausgeführt",
899
"3ab6b281a0991766": "{count, plural, =1 {Verknüpfte Pull Requests geprüft} other {Verknüpfte Pull Requests {count}-mal geprüft}}",
900
"857e92a89b6b6257": "{count, plural, one {{count} Datei gelesen} other {{count} Dateien gelesen}}",
901
"466ac7fcdb97bb76": "{count, plural, one {{count} Datei geändert} other {{count} Dateien geändert}}",
@@ -1387,7 +1391,6 @@
1391
"4c9a0b64f128da3a": "Neuer Versuch in {delay} s.",
1392
"5de030e595796117": "Thread erstellt",
1393
"c392becd445ecdba": "Denkt nach",
1390
- "930808342aac8010": "Befehl ausgeführt",
1394
"c01f9d3f3624c903": "Befehl",
1395
"fc933cf9b3edd743": "{fileName} geändert",
1396
"9bdd23eb0206783f": "Dateiänderung",
@@ -2993,9 +2996,11 @@
2996
"8c0223d264d9dc17": "Die Mikrofonaufnahme wurde nicht beendet.",
2997
"43692a5af811085a": "Sprachtranskription fehlgeschlagen. Prüfe das Ziel unter Einstellungen → Spracheingabe.",
2998
"7e047168a2832c65": "Wähle ein OpenRouter-Modell unter Einstellungen → Spracheingabe.",
2999
+ "4094c385ce0a6493": "Spracheingabe konnte nicht gestartet werden",
3000
+ "47e93194d837912b": "Apple Speech unterstützt diese Sprache nicht.",
3001
+ "f9bebb0ec6c93680": "Apple Speech ist auf diesem Mac nicht verfügbar.",
3002
"14ff185a0153700e": "Kein Modell passt zu deiner Sprache. Wähle ein Modell oder ändere die Sprache in den Spracheingabe-Einstellungen.",
3003
"ff4cf071e91f7617": "Transkriptionsmodelle konnten nicht geladen werden. Prüfe die Verbindung und versuche es erneut.",
2998
- "4094c385ce0a6493": "Spracheingabe konnte nicht gestartet werden",
3004
"8fc9dbbfebef2a39": "Spracheingabe ist nicht verfügbar",
3005
"2789404f0dbcdebe": "Das Modell wurde heruntergeladen, aber diese Umgebung konnte es nicht auswählen. Versuche es erneut.",
3006
"d83d0a88ac8cee3e": "Das Modell ist nicht bereit. Lade es erneut herunter.",
@@ -3737,10 +3742,6 @@
3742
"ac511f991a3c1fab": "Websuche",
3743
"07e65dba2b16d3f7": "{count, plural, one {{path} +{count} weitere} other {{path} +{count} weitere}}",
3744
"6ab96e26bda35288": "Denkt nach",
3740
- "4d4981a1c5bd9728": "Befehl läuft",
3741
- "a078225c5f197cd2": "Befehl fehlgeschlagen",
3742
- "37ab148aaa486051": "Befehl abgelehnt",
3743
- "0112efa1861c7a30": "Befehl gestoppt",
3745
"dc8ddcad32e2a50c": "{program} läuft",
3746
"f0db8caadd8f120e": "{program} fehlgeschlagen",
3747
"9a4cc1d1df413b99": "{program} abgelehnt",
@@ -3978,6 +3979,7 @@
3979
"90062342f04966ff": "Aktualisiere den T3-Code-Server dieser Umgebung, um Pull Requests zu durchsuchen.",
3980
"5e7157db126f1641": "Issues nicht verfügbar",
3981
"42ade0e14ff6af94": "Aktualisiere den T3-Code-Server dieser Umgebung, um Issues zu durchsuchen.",
3982
+ "6435447ce7656f13": "{label} anzeigen",
3983
"993dcd04611f9571": "Sicher speichern",
3984
"ccbe48efc8e30c52": "Nebenchat „{title}“ löschen?",
3985
"3a859b690f41e899": "Dadurch wird sein Gesprächsverlauf dauerhaft gelöscht.",
@@ -4709,6 +4711,7 @@
4711
"82d82cdbe3b0f975": "{size} · Mit {shortcut} bleibt großer eingefügter Text im Text.",
4712
"247cd77b35ddb586": "„{name}“ konnte nicht als Bild gelesen werden.",
4713
"7eccb44d5449e777": "„{name}“ ist zu groß zum Anhängen, selbst nach der Komprimierung.",
4714
+ "d07dd6dfd269680a": "{names} konnte nicht wiederhergestellt werden: Das Eingabefeld hat sein Limit von {limit} Anhängen erreicht.",
4715
"1d4059658a0ab500": "{name} aus der Nachricht entfernen?\nEs wird in deinem Text referenziert; beim Entfernen werden auch alle Referenzen entfernt.",
4716
"86261d5bd0651358": "Dieses Bild aus der Nachricht entfernen?\nEs wird in deinem Text referenziert; beim Entfernen werden auch alle Referenzen entfernt.",
4717
"f70c49e9f30807a3": "Der eingefügte Text ist zu groß für diese Nachricht",
@@ -4781,7 +4784,6 @@
4784
"c809a3c353e67a28": "Der Browserspeicher hat die Aktualisierung abgelehnt, daher könnte dieser Eintrag nach dem Neuladen noch da sein.",
4785
"1a4bc01f0ca772c2": "{names} hat beim Speichern dieses Prompts das Größenlimit der Ablage überschritten.",
4786
"bb3b4ad32b596e11": "{names} konnte beim Speichern dieses Prompts nicht gelesen werden.",
4784
- "d07dd6dfd269680a": "{names} konnte nicht wiederhergestellt werden: Das Eingabefeld hat sein Limit von {limit} Anhängen erreicht.",
4787
"7e4a6a2c84d34a80": "{names}: Abgelegte Dateien werden 24 Stunden lang aufbewahrt, und dieser Upload ist abgelaufen. Hänge die Datei erneut an.",
4788
"1e3ede33afee71ba": "Einige Anhänge wurden nicht wiederhergestellt",
4789
"98c76143d9aae871": "Ablage-Eintrag kommt möglicherweise zurück",
@@ -11461,6 +11463,7 @@
11463
"c32c85efb80dc740": "Testtranskript",
11464
"4b2f68f90eb004f6": "Keine Sprache erkannt. Versuch es erneut.",
11465
"cc04b357924afb36": "Modelltest schließen",
11466
+ "25607ff5f39ac0ac": "Apple Speech (nicht verfügbar)",
11467
"97ce6c61f0039edd": "OpenRouter verwalten",
11468
"ca50ce902d534122": "Schlüssel verwalten",
11469
"4993d154ece9c92f": "Die Spracheingabe verwendet das erste verbundene Mikrofon in dieser Liste.",
@@ -11472,6 +11475,7 @@
11475
"817dbf1c068b62e7": "Wo deine Sprache in Text umgewandelt wird.",
11476
"710d3e4f0243014c": "Gewählte Umgebung (nicht verfügbar)",
11477
"61088464d1b7174d": "nicht verfügbare Umgebung",
11478
+ "2b3e8ee4f31d1433": "„Automatisch“ verwendet die Sprache deines Mac. Bei der ersten Verwendung einer Sprache wird sie geladen.",
11479
"71184e5a54a69f1d": "Der Anbieter erkennt deine Sprache automatisch.",
11480
"ffb2653eb2d9fc1a": "{model} erkennt die Sprache automatisch.",
11481
"773cbfca7c466cc4": "{model} verwendet eine feste Sprache.",
@@ -11479,9 +11483,11 @@
11483
"d4b59565bd8b6d07": "Ins Englische übersetzen",
11484
"0d88a0c771d98284": "Sprich in beliebiger Sprache und erhalte englischen Text.",
11485
"f4a8700049fc9dcc": "Stillefilter",
11486
+ "69558ed7b83d671e": "Apple Speech verarbeitet Stille selbst.",
11487
"f22b17f6731c14c0": "OpenAI handhabt Stille selbst.",
11488
"75a3001ae4561b97": "Stille und Hintergrundgeräusche vor dem Transkribieren überspringen.",
11489
"adde9666f7fb8c5d": "Füllwörter entfernen",
11490
+ "95ac70c5da02c46a": "Mit Apple Speech nicht verfügbar.",
11491
"943ea47b1df48f12": "„Äh“ und „ähm“ aus Transkripten entfernen.",
11492
"e1e054a313ece9d0": "Wörterbuch",
11493
"79c4100c78265c98": "Dein Wörterbuch",
@@ -11520,6 +11526,7 @@
11526
"790951b4fc82052f": "Modell testen",
11527
"a3eda37e8d337ebb": "Sprich einen Satz. Die Bereinigung wird übersprungen, damit du genau siehst, was das Modell gehört hat.",
11528
"c613b9c5d54f3c91": "Mikrofone aktualisieren",
11529
+ "1119a2b45988a069": "Auf diesem Mac",
11530
"23196cabaa71f1da": "In einer Umgebung",
11531
"3ba49a214600d0ac": [
11532
"Cloud über ",
apps/web/src/i18n/translations/en.json
+16
-9
@@ -155,10 +155,9 @@
155
"0cb7a36802fe8089": "Filter {number} needs a path under body, headers or query.",
156
"1fa38fb049c6b56e": "Filter {number} needs a path under body, headers or query, and at least one value.",
157
"31ec02bdcb3920d1": "Filter {number} needs a path under body, headers or query, and a value.",
158
+ "62ae4688ece05590": "Stored securely, never shown to the agent",
159
"81f613bb68d85bb7": "Kept out of chat, in a private file this agent's commands can read for 24 hours",
160
"07b56c0c12bd2de1": "Kept out of chat, in private files this agent's commands can read for 24 hours",
160
- "6435447ce7656f13": "Show {label}",
161
- "62ae4688ece05590": "Stored securely, never shown to the agent",
161
"8c2d901183b4e219": "Paste the secret",
162
"610aea624f895a78": "Saved securely and kept private",
163
"329b7854b7e0546e": "Use a 1Password reference like {example}.",
@@ -892,6 +891,11 @@
891
"2605da0149cd15f1": "Compacting context",
892
"39a82db18ca50c21": "Context compacted {before} → {after} tokens",
893
"885ae08a2160a158": "Context compacted",
894
+ "4d4981a1c5bd9728": "Running command",
895
+ "a078225c5f197cd2": "Failed command",
896
+ "37ab148aaa486051": "Declined command",
897
+ "0112efa1861c7a30": "Stopped command",
898
+ "930808342aac8010": "Ran command",
899
"3ab6b281a0991766": "{count, plural, =1 {Checked linked pull requests} other {Checked linked pull requests {count} times}}",
900
"857e92a89b6b6257": "{count, plural, one {Read {count} file} other {Read {count} files}}",
901
"466ac7fcdb97bb76": "{count, plural, one {Changed {count} file} other {Changed {count} files}}",
@@ -1387,7 +1391,6 @@
1391
"4c9a0b64f128da3a": "Retrying in {delay}s.",
1392
"5de030e595796117": "Created thread",
1393
"c392becd445ecdba": "Thinking",
1390
- "930808342aac8010": "Ran command",
1394
"c01f9d3f3624c903": "Command",
1395
"fc933cf9b3edd743": "Changed {fileName}",
1396
"9bdd23eb0206783f": "File change",
@@ -2992,9 +2995,11 @@
2995
"8c0223d264d9dc17": "Microphone capture did not stop.",
2996
"43692a5af811085a": "Voice transcription failed. Check the destination in Settings → Voice.",
2997
"7e047168a2832c65": "Choose an OpenRouter model in Settings → Voice.",
2998
+ "4094c385ce0a6493": "Could not start voice input",
2999
+ "47e93194d837912b": "Apple Speech does not support this language.",
3000
+ "f9bebb0ec6c93680": "Apple Speech is not available on this Mac.",
3001
"14ff185a0153700e": "No model matches your language. Choose a model or change the language in Voice settings.",
3002
"ff4cf071e91f7617": "Could not load transcription models. Check the connection and try again.",
2997
- "4094c385ce0a6493": "Could not start voice input",
3003
"8fc9dbbfebef2a39": "Voice input is not available",
3004
"2789404f0dbcdebe": "The model downloaded, but this environment could not select it. Try again.",
3005
"d83d0a88ac8cee3e": "The model is not ready. Try downloading it again.",
@@ -3736,10 +3741,6 @@
3741
"ac511f991a3c1fab": "Web search",
3742
"07e65dba2b16d3f7": "{count, plural, one {{path} +{count} more} other {{path} +{count} more}}",
3743
"6ab96e26bda35288": "Thinking",
3739
- "4d4981a1c5bd9728": "Running command",
3740
- "a078225c5f197cd2": "Failed command",
3741
- "37ab148aaa486051": "Declined command",
3742
- "0112efa1861c7a30": "Stopped command",
3744
"dc8ddcad32e2a50c": "Running {program}",
3745
"f0db8caadd8f120e": "Failed {program}",
3746
"9a4cc1d1df413b99": "Declined {program}",
@@ -3976,6 +3977,7 @@
3977
"90062342f04966ff": "Update this environment's T3 Code server to browse pull requests.",
3978
"5e7157db126f1641": "Issues unavailable",
3979
"42ade0e14ff6af94": "Update this environment's T3 Code server to browse issues.",
3980
+ "6435447ce7656f13": "Show {label}",
3981
"993dcd04611f9571": "Save securely",
3982
"ccbe48efc8e30c52": "Delete side chat \"{title}\"?",
3983
"3a859b690f41e899": "This permanently clears its conversation history.",
@@ -4708,6 +4710,7 @@
4710
"82d82cdbe3b0f975": "{size} · Use {shortcut} to keep a large paste inline.",
4711
"247cd77b35ddb586": "''{name}'' could not be read as an image.",
4712
"7eccb44d5449e777": "''{name}'' is too large to attach, even after compression.",
4713
+ "d07dd6dfd269680a": "{names} could not be restored: the composer is at its {limit}-attachment limit.",
4714
"1d4059658a0ab500": "Remove {name} from the message?\nIt is referenced in your text; removing it also removes every reference.",
4715
"86261d5bd0651358": "Remove this image from the message?\nIt is referenced in your text; removing it also removes every reference.",
4716
"f70c49e9f30807a3": "Pasted text is too large for this message",
@@ -4780,7 +4783,6 @@
4783
"c809a3c353e67a28": "Browser storage rejected the update, so this entry could still be there after a reload.",
4784
"1a4bc01f0ca772c2": "{names} exceeded the stash size limit when this prompt was saved.",
4785
"bb3b4ad32b596e11": "{names} could not be read when this prompt was saved.",
4783
- "d07dd6dfd269680a": "{names} could not be restored: the composer is at its {limit}-attachment limit.",
4786
"7e4a6a2c84d34a80": "{names}: stashed files are kept for 24 hours and this upload expired. Attach the file again.",
4787
"1e3ede33afee71ba": "Some attachments were not restored",
4788
"98c76143d9aae871": "Stash entry may come back",
@@ -11470,6 +11472,7 @@
11472
"c32c85efb80dc740": "Test transcript",
11473
"4b2f68f90eb004f6": "No speech recognized. Try again.",
11474
"cc04b357924afb36": "Close model test",
11475
+ "25607ff5f39ac0ac": "Apple Speech (unavailable)",
11476
"97ce6c61f0039edd": "Manage OpenRouter",
11477
"ca50ce902d534122": "Manage key",
11478
"4993d154ece9c92f": "Voice input uses the first connected microphone in this list.",
@@ -11481,6 +11484,7 @@
11484
"817dbf1c068b62e7": "Where your speech is turned into text.",
11485
"710d3e4f0243014c": "Chosen environment (unavailable)",
11486
"61088464d1b7174d": "unavailable environment",
11487
+ "2b3e8ee4f31d1433": "Automatic uses your Mac’s language. The first use of a language downloads it.",
11488
"71184e5a54a69f1d": "The provider detects your language automatically.",
11489
"ffb2653eb2d9fc1a": "{model} detects the language automatically.",
11490
"773cbfca7c466cc4": "{model} uses one fixed language.",
@@ -11488,9 +11492,11 @@
11492
"d4b59565bd8b6d07": "Translate to English",
11493
"0d88a0c771d98284": "Speak any language and get English text.",
11494
"f4a8700049fc9dcc": "Silence filtering",
11495
+ "69558ed7b83d671e": "Apple Speech handles silence itself.",
11496
"f22b17f6731c14c0": "OpenAI handles silence itself.",
11497
"75a3001ae4561b97": "Skip silence and background noise before transcribing.",
11498
"adde9666f7fb8c5d": "Remove filler words",
11499
+ "95ac70c5da02c46a": "Not available with Apple Speech.",
11500
"943ea47b1df48f12": "Drop “um” and “uh” from transcripts.",
11501
"e1e054a313ece9d0": "Dictionary",
11502
"79c4100c78265c98": "Your dictionary",
@@ -11528,6 +11534,7 @@
11534
"790951b4fc82052f": "Test model",
11535
"a3eda37e8d337ebb": "Say a sentence. Cleanup is skipped, so you see exactly what the model heard.",
11536
"c613b9c5d54f3c91": "Refresh microphones",
11537
+ "1119a2b45988a069": "On this Mac",
11538
"23196cabaa71f1da": "On an environment",
11539
"3ba49a214600d0ac": [
11540
"Cloud via ",
apps/web/src/i18n/translations/es.json
+16
-9
@@ -155,10 +155,9 @@
155
"0cb7a36802fe8089": "El filtro {number} necesita una ruta dentro de body, headers o query.",
156
"1fa38fb049c6b56e": "El filtro {number} necesita una ruta dentro de body, headers o query, y al menos un valor.",
157
"31ec02bdcb3920d1": "El filtro {number} necesita una ruta dentro de body, headers o query, y un valor.",
158
+ "62ae4688ece05590": "Guardado de forma segura, nunca se muestra al agente",
159
"81f613bb68d85bb7": "Fuera del chat, en un archivo privado que los comandos de este agente pueden leer durante 24 horas",
160
"07b56c0c12bd2de1": "Fuera del chat, en archivos privados que los comandos de este agente pueden leer durante 24 horas",
160
- "6435447ce7656f13": "Mostrar {label}",
161
- "62ae4688ece05590": "Guardado de forma segura, nunca se muestra al agente",
161
"8c2d901183b4e219": "Pega el secreto",
162
"610aea624f895a78": "Guardado de forma segura y privada",
163
"329b7854b7e0546e": "Usa una referencia de 1Password como {example}.",
@@ -892,6 +891,11 @@
891
"2605da0149cd15f1": "Compactando el contexto",
892
"39a82db18ca50c21": "Contexto compactado de {before} → {after} tokens",
893
"885ae08a2160a158": "Contexto compactado",
894
+ "4d4981a1c5bd9728": "Ejecutando comando",
895
+ "a078225c5f197cd2": "Comando fallido",
896
+ "37ab148aaa486051": "Comando rechazado",
897
+ "0112efa1861c7a30": "Comando detenido",
898
+ "930808342aac8010": "Comando ejecutado",
899
"3ab6b281a0991766": "{count, plural, =1 {Se comprobaron las pull requests vinculadas} other {Se comprobaron las pull requests vinculadas {count} veces}}",
900
"857e92a89b6b6257": "{count, plural, one {Se leyó {count} archivo} other {Se leyeron {count} archivos}}",
901
"466ac7fcdb97bb76": "{count, plural, one {Se cambió {count} archivo} other {Se cambiaron {count} archivos}}",
@@ -1387,7 +1391,6 @@
1391
"4c9a0b64f128da3a": "Reintentando en {delay} s.",
1392
"5de030e595796117": "Hilo creado",
1393
"c392becd445ecdba": "Pensando",
1390
- "930808342aac8010": "Comando ejecutado",
1394
"c01f9d3f3624c903": "Comando",
1395
"fc933cf9b3edd743": "Se cambió {fileName}",
1396
"9bdd23eb0206783f": "Cambio de archivo",
@@ -2992,9 +2995,11 @@
2995
"8c0223d264d9dc17": "La captura del micrófono no se detuvo.",
2996
"43692a5af811085a": "Falló la transcripción de voz. Revisa el destino en Ajustes → Voz.",
2997
"7e047168a2832c65": "Elige un modelo de OpenRouter en Ajustes → Voz.",
2998
+ "4094c385ce0a6493": "No se pudo iniciar la entrada de voz",
2999
+ "47e93194d837912b": "Apple Speech no admite este idioma.",
3000
+ "f9bebb0ec6c93680": "Apple Speech no está disponible en este Mac.",
3001
"14ff185a0153700e": "Ningún modelo coincide con tu idioma. Elige un modelo o cambia el idioma en los ajustes de Voz.",
3002
"ff4cf071e91f7617": "No se pudieron cargar los modelos de transcripción. Comprueba la conexión y vuelve a intentarlo.",
2997
- "4094c385ce0a6493": "No se pudo iniciar la entrada de voz",
3003
"8fc9dbbfebef2a39": "La entrada de voz no está disponible",
3004
"2789404f0dbcdebe": "El modelo se descargó, pero este entorno no pudo seleccionarlo. Vuelve a intentarlo.",
3005
"d83d0a88ac8cee3e": "El modelo no está listo. Prueba a descargarlo de nuevo.",
@@ -3734,10 +3739,6 @@
3739
"ac511f991a3c1fab": "Búsqueda web",
3740
"07e65dba2b16d3f7": "{count, plural, one {{path} y {count} más} other {{path} y {count} más}}",
3741
"6ab96e26bda35288": "Pensando",
3737
- "4d4981a1c5bd9728": "Ejecutando comando",
3738
- "a078225c5f197cd2": "Comando fallido",
3739
- "37ab148aaa486051": "Comando rechazado",
3740
- "0112efa1861c7a30": "Comando detenido",
3742
"dc8ddcad32e2a50c": "Ejecutando {program}",
3743
"f0db8caadd8f120e": "Falló {program}",
3744
"9a4cc1d1df413b99": "Se rechazó {program}",
@@ -3974,6 +3975,7 @@
3975
"90062342f04966ff": "Actualiza el servidor de T3 Code de este entorno para explorar pull requests.",
3976
"5e7157db126f1641": "Issues no disponibles",
3977
"42ade0e14ff6af94": "Actualiza el servidor de T3 Code de este entorno para explorar issues.",
3978
+ "6435447ce7656f13": "Mostrar {label}",
3979
"993dcd04611f9571": "Guardar de forma segura",
3980
"ccbe48efc8e30c52": "¿Eliminar el chat lateral \"{title}\"?",
3981
"3a859b690f41e899": "Esto borra de forma permanente su historial de conversación.",
@@ -4706,6 +4708,7 @@
4708
"82d82cdbe3b0f975": "{size} · Usa {shortcut} para mantener en línea un texto pegado grande.",
4709
"247cd77b35ddb586": "''{name}'' no se pudo leer como imagen.",
4710
"7eccb44d5449e777": "''{name}'' es demasiado grande para adjuntarlo, incluso después de comprimirlo.",
4711
+ "d07dd6dfd269680a": "No se pudo restaurar {names}: el cuadro de mensaje está en su límite de {limit} adjuntos.",
4712
"1d4059658a0ab500": "¿Quitar {name} del mensaje?\nSe menciona en tu texto; al quitarlo también se quitan todas las referencias.",
4713
"86261d5bd0651358": "¿Quitar esta imagen del mensaje?\nSe menciona en tu texto; al quitarla también se quitan todas las referencias.",
4714
"f70c49e9f30807a3": "El texto pegado es demasiado grande para este mensaje",
@@ -4778,7 +4781,6 @@
4781
"c809a3c353e67a28": "El almacenamiento del navegador rechazó la actualización, así que esta entrada podría seguir ahí tras recargar.",
4782
"1a4bc01f0ca772c2": "{names} superó el límite de tamaño del stash cuando se guardó este prompt.",
4783
"bb3b4ad32b596e11": "No se pudo leer {names} cuando se guardó este prompt.",
4781
- "d07dd6dfd269680a": "No se pudo restaurar {names}: el cuadro de mensaje está en su límite de {limit} adjuntos.",
4784
"7e4a6a2c84d34a80": "{names}: los archivos del stash se conservan 24 horas y esta subida caducó. Vuelve a adjuntar el archivo.",
4785
"1e3ede33afee71ba": "Algunos adjuntos no se restauraron",
4786
"98c76143d9aae871": "Puede que la entrada del stash vuelva",
@@ -11455,6 +11457,7 @@
11457
"c32c85efb80dc740": "Transcripción de prueba",
11458
"4b2f68f90eb004f6": "No se reconoció voz. Inténtalo de nuevo.",
11459
"cc04b357924afb36": "Cerrar prueba del modelo",
11460
+ "25607ff5f39ac0ac": "Apple Speech (no disponible)",
11461
"97ce6c61f0039edd": "Gestionar OpenRouter",
11462
"ca50ce902d534122": "Gestionar clave",
11463
"4993d154ece9c92f": "La entrada de voz usa el primer micrófono conectado de esta lista.",
@@ -11466,6 +11469,7 @@
11469
"817dbf1c068b62e7": "Dónde se convierte tu voz en texto.",
11470
"710d3e4f0243014c": "Entorno elegido (no disponible)",
11471
"61088464d1b7174d": "entorno no disponible",
11472
+ "2b3e8ee4f31d1433": "Automático usa el idioma de tu Mac. La primera vez que se usa un idioma, se descarga.",
11473
"71184e5a54a69f1d": "El proveedor detecta tu idioma automáticamente.",
11474
"ffb2653eb2d9fc1a": "{model} detecta el idioma automáticamente.",
11475
"773cbfca7c466cc4": "{model} usa un solo idioma fijo.",
@@ -11473,9 +11477,11 @@
11477
"d4b59565bd8b6d07": "Traducir al inglés",
11478
"0d88a0c771d98284": "Habla en cualquier idioma y obtén texto en inglés.",
11479
"f4a8700049fc9dcc": "Filtrado de silencios",
11480
+ "69558ed7b83d671e": "Apple Speech gestiona el silencio por sí mismo.",
11481
"f22b17f6731c14c0": "OpenAI gestiona los silencios por sí mismo.",
11482
"75a3001ae4561b97": "Omite los silencios y el ruido de fondo antes de transcribir.",
11483
"adde9666f7fb8c5d": "Quitar muletillas",
11484
+ "95ac70c5da02c46a": "No disponible con Apple Speech.",
11485
"943ea47b1df48f12": "Elimina «eh» y «em» de las transcripciones.",
11486
"e1e054a313ece9d0": "Diccionario",
11487
"79c4100c78265c98": "Tu diccionario",
@@ -11513,6 +11519,7 @@
11519
"790951b4fc82052f": "Probar modelo",
11520
"a3eda37e8d337ebb": "Di una frase. Se omite la limpieza, así que ves exactamente lo que oyó el modelo.",
11521
"c613b9c5d54f3c91": "Actualizar micrófonos",
11522
+ "1119a2b45988a069": "En este Mac",
11523
"23196cabaa71f1da": "En un entorno",
11524
"3ba49a214600d0ac": [
11525
"En la nube con ",
apps/web/src/i18n/translations/fr.json
+16
-9
@@ -155,10 +155,9 @@
155
"0cb7a36802fe8089": "Le filtre {number} a besoin d’un chemin sous body, headers ou query.",
156
"1fa38fb049c6b56e": "Le filtre {number} a besoin d’un chemin sous body, headers ou query, et d’au moins une valeur.",
157
"31ec02bdcb3920d1": "Le filtre {number} a besoin d’un chemin sous body, headers ou query, et d’une valeur.",
158
+ "62ae4688ece05590": "Stocké de façon sécurisée, jamais montré à l’agent",
159
"81f613bb68d85bb7": "Hors de la discussion, dans un fichier privé que les commandes de cet agent peuvent lire pendant 24 heures",
160
"07b56c0c12bd2de1": "Hors de la discussion, dans des fichiers privés que les commandes de cet agent peuvent lire pendant 24 heures",
160
- "6435447ce7656f13": "Afficher {label}",
161
- "62ae4688ece05590": "Stocké de façon sécurisée, jamais montré à l’agent",
161
"8c2d901183b4e219": "Collez le secret",
162
"610aea624f895a78": "Enregistré de façon sécurisée et gardé privé",
163
"329b7854b7e0546e": "Utilisez une référence 1Password comme {example}.",
@@ -892,6 +891,11 @@
891
"2605da0149cd15f1": "Compactage du contexte",
892
"39a82db18ca50c21": "Contexte compacté de {before} → {after} tokens",
893
"885ae08a2160a158": "Contexte compacté",
894
+ "4d4981a1c5bd9728": "Exécution de la commande",
895
+ "a078225c5f197cd2": "Commande en échec",
896
+ "37ab148aaa486051": "Commande refusée",
897
+ "0112efa1861c7a30": "Commande arrêtée",
898
+ "930808342aac8010": "Commande exécutée",
899
"3ab6b281a0991766": "{count, plural, =1 {Pull requests associées vérifiées} other {Pull requests associées vérifiées {count} fois}}",
900
"857e92a89b6b6257": "{count, plural, one {{count} fichier lu} other {{count} fichiers lus}}",
901
"466ac7fcdb97bb76": "{count, plural, one {{count} fichier modifié} other {{count} fichiers modifiés}}",
@@ -1387,7 +1391,6 @@
1391
"4c9a0b64f128da3a": "Nouvelle tentative dans {delay} s.",
1392
"5de030e595796117": "Fil créé",
1393
"c392becd445ecdba": "Réflexion",
1390
- "930808342aac8010": "Commande exécutée",
1394
"c01f9d3f3624c903": "Commande",
1395
"fc933cf9b3edd743": "{fileName} modifié",
1396
"9bdd23eb0206783f": "Modification de fichier",
@@ -2992,9 +2995,11 @@
2995
"8c0223d264d9dc17": "La capture du micro ne s’est pas arrêtée.",
2996
"43692a5af811085a": "Échec de la transcription vocale. Vérifiez la destination dans Paramètres → Voix.",
2997
"7e047168a2832c65": "Choisissez un modèle OpenRouter dans Paramètres → Voix.",
2998
+ "4094c385ce0a6493": "Impossible de démarrer la saisie vocale",
2999
+ "47e93194d837912b": "Apple Speech ne prend pas en charge cette langue.",
3000
+ "f9bebb0ec6c93680": "Apple Speech n’est pas disponible sur ce Mac.",
3001
"14ff185a0153700e": "Aucun modèle ne correspond à votre langue. Choisissez un modèle ou changez de langue dans les paramètres Voix.",
3002
"ff4cf071e91f7617": "Impossible de charger les modèles de transcription. Vérifiez la connexion et réessayez.",
2997
- "4094c385ce0a6493": "Impossible de démarrer la saisie vocale",
3003
"8fc9dbbfebef2a39": "La saisie vocale n’est pas disponible",
3004
"2789404f0dbcdebe": "Le modèle a été téléchargé, mais cet environnement n’a pas pu le sélectionner. Réessayez.",
3005
"d83d0a88ac8cee3e": "Le modèle n’est pas prêt. Essayez de le télécharger à nouveau.",
@@ -3735,10 +3740,6 @@
3740
"ac511f991a3c1fab": "Recherche web",
3741
"07e65dba2b16d3f7": "{count, plural, one {{path} +{count} autre} other {{path} +{count} autres}}",
3742
"6ab96e26bda35288": "Réflexion",
3738
- "4d4981a1c5bd9728": "Exécution de la commande",
3739
- "a078225c5f197cd2": "Commande en échec",
3740
- "37ab148aaa486051": "Commande refusée",
3741
- "0112efa1861c7a30": "Commande arrêtée",
3743
"dc8ddcad32e2a50c": "Exécution de {program}",
3744
"f0db8caadd8f120e": "Échec de {program}",
3745
"9a4cc1d1df413b99": "{program} refusé",
@@ -3975,6 +3976,7 @@
3976
"90062342f04966ff": "Mettez à jour le serveur T3 Code de cet environnement pour parcourir les pull requests.",
3977
"5e7157db126f1641": "Tickets indisponibles",
3978
"42ade0e14ff6af94": "Mettez à jour le serveur T3 Code de cet environnement pour parcourir les tickets.",
3979
+ "6435447ce7656f13": "Afficher {label}",
3980
"993dcd04611f9571": "Enregistrer de façon sécurisée",
3981
"ccbe48efc8e30c52": "Supprimer la discussion annexe « {title} » ?",
3982
"3a859b690f41e899": "Cela efface définitivement son historique de conversation.",
@@ -4707,6 +4709,7 @@
4709
"82d82cdbe3b0f975": "{size} · Utilisez {shortcut} pour garder un long collage dans le texte.",
4710
"247cd77b35ddb586": "« {name} » n’a pas pu être lu comme une image.",
4711
"7eccb44d5449e777": "« {name} » est trop volumineux pour être joint, même après compression.",
4712
+ "d07dd6dfd269680a": "{names} n’a pas pu être restauré : la zone de saisie a atteint sa limite de {limit} pièces jointes.",
4713
"1d4059658a0ab500": "Retirer {name} du message ?\nIl est référencé dans votre texte ; le retirer supprime aussi toutes ses références.",
4714
"86261d5bd0651358": "Retirer cette image du message ?\nElle est référencée dans votre texte ; la retirer supprime aussi toutes ses références.",
4715
"f70c49e9f30807a3": "Le texte collé est trop long pour ce message",
@@ -4779,7 +4782,6 @@
4782
"c809a3c353e67a28": "Le stockage du navigateur a refusé la mise à jour ; cette entrée pourrait donc encore être là après un rechargement.",
4783
"1a4bc01f0ca772c2": "{names} dépassait la taille limite de la réserve lors de l’enregistrement de ce prompt.",
4784
"bb3b4ad32b596e11": "{names} n’a pas pu être lu lors de l’enregistrement de ce prompt.",
4782
- "d07dd6dfd269680a": "{names} n’a pas pu être restauré : la zone de saisie a atteint sa limite de {limit} pièces jointes.",
4785
"7e4a6a2c84d34a80": "{names} : les fichiers mis de côté sont conservés 24 heures et cet envoi a expiré. Joignez à nouveau le fichier.",
4786
"1e3ede33afee71ba": "Certaines pièces jointes n’ont pas été restaurées",
4787
"98c76143d9aae871": "L’entrée de la réserve peut revenir",
@@ -11460,6 +11462,7 @@
11462
"c32c85efb80dc740": "Transcription de test",
11463
"4b2f68f90eb004f6": "Aucune parole reconnue. Réessayez.",
11464
"cc04b357924afb36": "Fermer le test du modèle",
11465
+ "25607ff5f39ac0ac": "Apple Speech (indisponible)",
11466
"97ce6c61f0039edd": "Gérer OpenRouter",
11467
"ca50ce902d534122": "Gérer la clé",
11468
"4993d154ece9c92f": "La saisie vocale utilise le premier microphone connecté de cette liste.",
@@ -11471,6 +11474,7 @@
11474
"817dbf1c068b62e7": "Où votre parole est convertie en texte.",
11475
"710d3e4f0243014c": "Environnement choisi (indisponible)",
11476
"61088464d1b7174d": "environnement indisponible",
11477
+ "2b3e8ee4f31d1433": "Automatique utilise la langue de votre Mac. Une langue est téléchargée à sa première utilisation.",
11478
"71184e5a54a69f1d": "Le fournisseur détecte automatiquement votre langue.",
11479
"ffb2653eb2d9fc1a": "{model} détecte automatiquement la langue.",
11480
"773cbfca7c466cc4": "{model} utilise une seule langue fixe.",
@@ -11478,9 +11482,11 @@
11482
"d4b59565bd8b6d07": "Traduire en anglais",
11483
"0d88a0c771d98284": "Parlez dans n’importe quelle langue et obtenez du texte en anglais.",
11484
"f4a8700049fc9dcc": "Filtrage du silence",
11485
+ "69558ed7b83d671e": "Apple Speech gère lui-même les silences.",
11486
"f22b17f6731c14c0": "OpenAI gère lui-même le silence.",
11487
"75a3001ae4561b97": "Ignore le silence et le bruit de fond avant la transcription.",
11488
"adde9666f7fb8c5d": "Supprimer les mots de remplissage",
11489
+ "95ac70c5da02c46a": "Indisponible avec Apple Speech.",
11490
"943ea47b1df48f12": "Retire les « euh » et « hum » des transcriptions.",
11491
"e1e054a313ece9d0": "Dictionnaire",
11492
"79c4100c78265c98": "Votre dictionnaire",
@@ -11518,6 +11524,7 @@
11524
"790951b4fc82052f": "Tester le modèle",
11525
"a3eda37e8d337ebb": "Dites une phrase. Le nettoyage est ignoré, vous voyez donc exactement ce que le modèle a entendu.",
11526
"c613b9c5d54f3c91": "Actualiser les microphones",
11527
+ "1119a2b45988a069": "Sur ce Mac",
11528
"23196cabaa71f1da": "Dans un environnement",
11529
"3ba49a214600d0ac": [
11530
"Cloud via ",
apps/web/src/i18n/translations/ja.json
+16
-9
@@ -155,10 +155,9 @@
155
"0cb7a36802fe8089": "フィルター {number} には body、headers、query 配下のパスが必要です。",
156
"1fa38fb049c6b56e": "フィルター {number} には body、headers、query 配下のパスと、少なくとも 1 つの値が必要です。",
157
"31ec02bdcb3920d1": "フィルター {number} には body、headers、query 配下のパスと値が必要です。",
158
+ "62ae4688ece05590": "安全に保存され、エージェントには表示されません",
159
"81f613bb68d85bb7": "チャットには表示せず、このエージェントのコマンドが 24 時間読み取れる非公開ファイルに保存します",
160
"07b56c0c12bd2de1": "チャットには表示せず、このエージェントのコマンドが 24 時間読み取れる非公開ファイルに保存します",
160
- "6435447ce7656f13": "{label}を表示",
161
- "62ae4688ece05590": "安全に保存され、エージェントには表示されません",
161
"8c2d901183b4e219": "シークレットを貼り付け",
162
"610aea624f895a78": "安全に保存し、非公開にしました",
163
"329b7854b7e0546e": "{example} のような 1Password の参照を使用してください。",
@@ -892,6 +891,11 @@
891
"2605da0149cd15f1": "コンテキストを圧縮しています",
892
"39a82db18ca50c21": "コンテキストを圧縮しました ({before} → {after} トークン)",
893
"885ae08a2160a158": "コンテキストを圧縮しました",
894
+ "4d4981a1c5bd9728": "コマンドを実行中",
895
+ "a078225c5f197cd2": "失敗したコマンド",
896
+ "37ab148aaa486051": "拒否されたコマンド",
897
+ "0112efa1861c7a30": "停止したコマンド",
898
+ "930808342aac8010": "コマンドを実行しました",
899
"3ab6b281a0991766": "{count, plural, =1 {リンクされたプルリクエストを確認しました} other {リンクされたプルリクエストを {count} 回確認しました}}",
900
"857e92a89b6b6257": "{count, plural, other {{count} 個のファイルを読み取りました}}",
901
"466ac7fcdb97bb76": "{count, plural, other {{count} 個のファイルを変更しました}}",
@@ -1387,7 +1391,6 @@
1391
"4c9a0b64f128da3a": "{delay} 秒後に再試行します。",
1392
"5de030e595796117": "スレッドを作成しました",
1393
"c392becd445ecdba": "思考中",
1390
- "930808342aac8010": "コマンドを実行しました",
1394
"c01f9d3f3624c903": "コマンド",
1395
"fc933cf9b3edd743": "{fileName} を変更しました",
1396
"9bdd23eb0206783f": "ファイルの変更",
@@ -2990,9 +2993,11 @@
2993
"8c0223d264d9dc17": "マイクの録音が停止しませんでした。",
2994
"43692a5af811085a": "音声の文字起こしに失敗しました。[設定] → [音声] で送信先を確認してください。",
2995
"7e047168a2832c65": "[設定] → [音声] で OpenRouter のモデルを選択してください。",
2996
+ "4094c385ce0a6493": "音声入力を開始できませんでした",
2997
+ "47e93194d837912b": "Apple Speech はこの言語に対応していません。",
2998
+ "f9bebb0ec6c93680": "この Mac では Apple Speech を利用できません。",
2999
"14ff185a0153700e": "言語に一致するモデルがありません。音声の設定でモデルを選択するか、言語を変更してください。",
3000
"ff4cf071e91f7617": "文字起こしモデルを読み込めませんでした。接続を確認して、もう一度お試しください。",
2995
- "4094c385ce0a6493": "音声入力を開始できませんでした",
3001
"8fc9dbbfebef2a39": "音声入力を利用できません",
3002
"2789404f0dbcdebe": "モデルはダウンロードされましたが、この環境で選択できませんでした。もう一度お試しください。",
3003
"d83d0a88ac8cee3e": "モデルの準備ができていません。もう一度ダウンロードしてみてください。",
@@ -3728,10 +3733,6 @@
3733
"ac511f991a3c1fab": "Web 検索",
3734
"07e65dba2b16d3f7": "{count, plural, other {{path} と他 {count} 件}}",
3735
"6ab96e26bda35288": "思考中",
3731
- "4d4981a1c5bd9728": "コマンドを実行中",
3732
- "a078225c5f197cd2": "失敗したコマンド",
3733
- "37ab148aaa486051": "拒否されたコマンド",
3734
- "0112efa1861c7a30": "停止したコマンド",
3736
"dc8ddcad32e2a50c": "{program} を実行中",
3737
"f0db8caadd8f120e": "{program} が失敗しました",
3738
"9a4cc1d1df413b99": "{program} が拒否されました",
@@ -3965,6 +3966,7 @@
3966
"90062342f04966ff": "プルリクエストを参照するには、この環境の T3 Code サーバーを更新してください。",
3967
"5e7157db126f1641": "Issue を利用できません",
3968
"42ade0e14ff6af94": "Issue を参照するには、この環境の T3 Code サーバーを更新してください。",
3969
+ "6435447ce7656f13": "{label}を表示",
3970
"993dcd04611f9571": "安全に保存",
3971
"ccbe48efc8e30c52": "サイドチャット「{title}」を削除しますか?",
3972
"3a859b690f41e899": "会話履歴が完全に消去されます。",
@@ -4696,6 +4698,7 @@
4698
"82d82cdbe3b0f975": "{size} · 大きな貼り付けをインラインのままにするには {shortcut} を使用します。",
4699
"247cd77b35ddb586": "「{name}」を画像として読み取れませんでした。",
4700
"7eccb44d5449e777": "「{name}」は圧縮しても大きすぎるため、添付できません。",
4701
+ "d07dd6dfd269680a": "{names} を復元できませんでした: 入力欄の添付ファイルが上限の {limit} 個に達しています。",
4702
"1d4059658a0ab500": "{name} をメッセージから削除しますか?\nテキスト内で参照されているため、削除するとすべての参照も削除されます。",
4703
"86261d5bd0651358": "この画像をメッセージから削除しますか?\nテキスト内で参照されているため、削除するとすべての参照も削除されます。",
4704
"f70c49e9f30807a3": "貼り付けたテキストがこのメッセージには大きすぎます",
@@ -4768,7 +4771,6 @@
4771
"c809a3c353e67a28": "ブラウザーのストレージが更新を拒否したため、再読み込み後もこの項目が残っている可能性があります。",
4772
"1a4bc01f0ca772c2": "このプロンプトの保存時に、{names} が退避のサイズ上限を超えました。",
4773
"bb3b4ad32b596e11": "このプロンプトの保存時に、{names} を読み取れませんでした。",
4771
- "d07dd6dfd269680a": "{names} を復元できませんでした: 入力欄の添付ファイルが上限の {limit} 個に達しています。",
4774
"7e4a6a2c84d34a80": "{names}: 退避したファイルは 24 時間保持されますが、このアップロードは期限切れです。ファイルをもう一度添付してください。",
4775
"1e3ede33afee71ba": "一部の添付ファイルは復元されませんでした",
4776
"98c76143d9aae871": "退避した項目が戻る可能性があります",
@@ -11410,6 +11412,7 @@
11412
"c32c85efb80dc740": "テストの文字起こし",
11413
"4b2f68f90eb004f6": "音声を認識できませんでした。もう一度お試しください。",
11414
"cc04b357924afb36": "モデルのテストを閉じる",
11415
+ "25607ff5f39ac0ac": "Apple Speech(利用不可)",
11416
"97ce6c61f0039edd": "OpenRouter を管理",
11417
"ca50ce902d534122": "キーを管理",
11418
"4993d154ece9c92f": "音声入力には、この一覧で最初に接続されているマイクを使用します。",
@@ -11421,6 +11424,7 @@
11424
"817dbf1c068b62e7": "音声をテキストに変換する場所です。",
11425
"710d3e4f0243014c": "選択した環境 (利用不可)",
11426
"61088464d1b7174d": "利用できない環境",
11427
+ "2b3e8ee4f31d1433": "「自動」では Mac の言語を使用します。言語は初回使用時にダウンロードされます。",
11428
"71184e5a54a69f1d": "プロバイダーが言語を自動的に検出します。",
11429
"ffb2653eb2d9fc1a": "{model} が言語を自動的に検出します。",
11430
"773cbfca7c466cc4": "{model} は 1 つの固定言語を使用します。",
@@ -11428,9 +11432,11 @@
11432
"d4b59565bd8b6d07": "英語に翻訳",
11433
"0d88a0c771d98284": "どの言語で話しても英語のテキストになります。",
11434
"f4a8700049fc9dcc": "無音のフィルタリング",
11435
+ "69558ed7b83d671e": "Apple Speech が無音を自動で処理します。",
11436
"f22b17f6731c14c0": "OpenAI が無音を独自に処理します。",
11437
"75a3001ae4561b97": "文字起こしの前に無音と背景ノイズをスキップします。",
11438
"adde9666f7fb8c5d": "フィラーを削除",
11439
+ "95ac70c5da02c46a": "Apple Speech では利用できません。",
11440
"943ea47b1df48f12": "文字起こしから「えー」「あの」などを削除します。",
11441
"e1e054a313ece9d0": "辞書",
11442
"79c4100c78265c98": "あなたの辞書",
@@ -11468,6 +11474,7 @@
11474
"790951b4fc82052f": "モデルをテスト",
11475
"a3eda37e8d337ebb": "文を 1 つ話してください。整形はスキップされるため、モデルが聞き取った内容がそのまま表示されます。",
11476
"c613b9c5d54f3c91": "マイクを更新",
11477
+ "1119a2b45988a069": "この Mac",
11478
"23196cabaa71f1da": "環境上",
11479
"3ba49a214600d0ac": [
11480
{
apps/web/src/i18n/translations/ko.json
+16
-9
@@ -155,10 +155,9 @@
155
"0cb7a36802fe8089": "필터 {number}에는 body, headers 또는 query 아래의 경로가 필요합니다.",
156
"1fa38fb049c6b56e": "필터 {number}에는 body, headers 또는 query 아래의 경로와 값이 하나 이상 필요합니다.",
157
"31ec02bdcb3920d1": "필터 {number}에는 body, headers 또는 query 아래의 경로와 값이 필요합니다.",
158
+ "62ae4688ece05590": "안전하게 저장되며 에이전트에게 표시되지 않습니다",
159
"81f613bb68d85bb7": "채팅에 표시하지 않고, 이 에이전트의 명령이 24시간 동안 읽을 수 있는 비공개 파일에 보관됩니다",
160
"07b56c0c12bd2de1": "채팅에 표시하지 않고, 이 에이전트의 명령이 24시간 동안 읽을 수 있는 비공개 파일들에 보관됩니다",
160
- "6435447ce7656f13": "{label} 표시",
161
- "62ae4688ece05590": "안전하게 저장되며 에이전트에게 표시되지 않습니다",
161
"8c2d901183b4e219": "시크릿 붙여 넣기",
162
"610aea624f895a78": "안전하게 저장되어 비공개로 유지됩니다",
163
"329b7854b7e0546e": "{example}과(와) 같은 1Password 참조를 사용하세요.",
@@ -892,6 +891,11 @@
891
"2605da0149cd15f1": "컨텍스트 압축 중",
892
"39a82db18ca50c21": "컨텍스트 압축됨: 토큰 {before} → {after}",
893
"885ae08a2160a158": "컨텍스트 압축됨",
894
+ "4d4981a1c5bd9728": "명령 실행 중",
895
+ "a078225c5f197cd2": "명령 실패",
896
+ "37ab148aaa486051": "명령 거부됨",
897
+ "0112efa1861c7a30": "명령 중지됨",
898
+ "930808342aac8010": "명령 실행함",
899
"3ab6b281a0991766": "{count, plural, =1 {연결된 풀 리퀘스트 확인함} other {연결된 풀 리퀘스트 {count}번 확인함}}",
900
"857e92a89b6b6257": "{count, plural, other {파일 {count}개 읽음}}",
901
"466ac7fcdb97bb76": "{count, plural, other {파일 {count}개 변경함}}",
@@ -1387,7 +1391,6 @@
1391
"4c9a0b64f128da3a": "{delay}초 후 다시 시도합니다.",
1392
"5de030e595796117": "스레드 만듦",
1393
"c392becd445ecdba": "생각 중",
1390
- "930808342aac8010": "명령 실행함",
1394
"c01f9d3f3624c903": "명령",
1395
"fc933cf9b3edd743": "{fileName} 변경함",
1396
"9bdd23eb0206783f": "파일 변경",
@@ -2991,9 +2994,11 @@
2994
"8c0223d264d9dc17": "마이크 캡처가 중지되지 않았습니다.",
2995
"43692a5af811085a": "음성 받아쓰기에 실패했습니다. 설정 → 음성에서 대상을 확인하세요.",
2996
"7e047168a2832c65": "설정 → 음성에서 OpenRouter 모델을 선택하세요.",
2997
+ "4094c385ce0a6493": "음성 입력을 시작할 수 없습니다",
2998
+ "47e93194d837912b": "Apple Speech는 이 언어를 지원하지 않습니다.",
2999
+ "f9bebb0ec6c93680": "이 Mac에서는 Apple Speech를 사용할 수 없습니다.",
3000
"14ff185a0153700e": "언어와 일치하는 모델이 없습니다. 음성 설정에서 모델을 선택하거나 언어를 변경하세요.",
3001
"ff4cf071e91f7617": "받아쓰기 모델을 불러올 수 없습니다. 연결을 확인하고 다시 시도하세요.",
2996
- "4094c385ce0a6493": "음성 입력을 시작할 수 없습니다",
3002
"8fc9dbbfebef2a39": "음성 입력을 사용할 수 없습니다",
3003
"2789404f0dbcdebe": "모델을 다운로드했지만 이 환경에서 선택할 수 없습니다. 다시 시도하세요.",
3004
"d83d0a88ac8cee3e": "모델이 준비되지 않았습니다. 다시 다운로드해 보세요.",
@@ -3728,10 +3733,6 @@
3733
"ac511f991a3c1fab": "웹 검색",
3734
"07e65dba2b16d3f7": "{count, plural, other {{path} 외 {count}개}}",
3735
"6ab96e26bda35288": "생각 중",
3731
- "4d4981a1c5bd9728": "명령 실행 중",
3732
- "a078225c5f197cd2": "명령 실패",
3733
- "37ab148aaa486051": "명령 거부됨",
3734
- "0112efa1861c7a30": "명령 중지됨",
3736
"dc8ddcad32e2a50c": "{program} 실행 중",
3737
"f0db8caadd8f120e": "{program} 실패",
3738
"9a4cc1d1df413b99": "{program} 거부됨",
@@ -3963,6 +3964,7 @@
3964
"90062342f04966ff": "풀 리퀘스트를 탐색하려면 이 환경의 T3 Code 서버를 업데이트하세요.",
3965
"5e7157db126f1641": "이슈를 사용할 수 없음",
3966
"42ade0e14ff6af94": "이슈를 탐색하려면 이 환경의 T3 Code 서버를 업데이트하세요.",
3967
+ "6435447ce7656f13": "{label} 표시",
3968
"993dcd04611f9571": "안전하게 저장",
3969
"ccbe48efc8e30c52": "사이드 채팅 \"{title}\"을(를) 삭제할까요?",
3970
"3a859b690f41e899": "대화 기록이 영구적으로 삭제됩니다.",
@@ -4693,6 +4695,7 @@
4695
"82d82cdbe3b0f975": "{size} · 큰 붙여넣기를 본문에 유지하려면 {shortcut}을(를) 사용하세요.",
4696
"247cd77b35ddb586": "‘{name}’을(를) 이미지로 읽을 수 없습니다.",
4697
"7eccb44d5449e777": "‘{name}’은(는) 압축 후에도 너무 커서 첨부할 수 없습니다.",
4698
+ "d07dd6dfd269680a": "{names}을(를) 복원할 수 없습니다: 입력창이 첨부 파일 한도({limit}개)에 도달했습니다.",
4699
"1d4059658a0ab500": "메시지에서 {name}을(를) 제거할까요?\n텍스트에서 참조하고 있어 제거하면 모든 참조도 함께 제거됩니다.",
4700
"86261d5bd0651358": "메시지에서 이 이미지를 제거할까요?\n텍스트에서 참조하고 있어 제거하면 모든 참조도 함께 제거됩니다.",
4701
"f70c49e9f30807a3": "붙여 넣은 텍스트가 이 메시지에 비해 너무 큽니다",
@@ -4765,7 +4768,6 @@
4768
"c809a3c353e67a28": "브라우저 저장소가 업데이트를 거부해서 새로 고친 후에도 이 항목이 남아 있을 수 있습니다.",
4769
"1a4bc01f0ca772c2": "이 프롬프트를 저장할 때 {names}이(가) 임시 저장함 크기 한도를 초과했습니다.",
4770
"bb3b4ad32b596e11": "이 프롬프트를 저장할 때 {names}을(를) 읽을 수 없었습니다.",
4768
- "d07dd6dfd269680a": "{names}을(를) 복원할 수 없습니다: 입력창이 첨부 파일 한도({limit}개)에 도달했습니다.",
4771
"7e4a6a2c84d34a80": "{names}: 임시 저장한 파일은 24시간 동안 유지되며 이 업로드는 만료되었습니다. 파일을 다시 첨부하세요.",
4772
"1e3ede33afee71ba": "일부 첨부 파일이 복원되지 않았습니다",
4773
"98c76143d9aae871": "임시 저장함 항목이 다시 나타날 수 있습니다",
@@ -11407,6 +11409,7 @@
11409
"c32c85efb80dc740": "받아쓰기 테스트",
11410
"4b2f68f90eb004f6": "인식된 음성이 없습니다. 다시 시도하세요.",
11411
"cc04b357924afb36": "모델 테스트 닫기",
11412
+ "25607ff5f39ac0ac": "Apple Speech(사용할 수 없음)",
11413
"97ce6c61f0039edd": "OpenRouter 관리",
11414
"ca50ce902d534122": "키 관리",
11415
"4993d154ece9c92f": "음성 입력은 이 목록에서 처음으로 연결된 마이크를 사용합니다.",
@@ -11418,6 +11421,7 @@
11421
"817dbf1c068b62e7": "음성이 텍스트로 변환되는 곳입니다.",
11422
"710d3e4f0243014c": "선택한 환경(사용할 수 없음)",
11423
"61088464d1b7174d": "사용할 수 없는 환경",
11424
+ "2b3e8ee4f31d1433": "자동은 Mac의 언어를 사용합니다. 언어는 처음 사용할 때 다운로드됩니다.",
11425
"71184e5a54a69f1d": "제공자가 언어를 자동으로 감지합니다.",
11426
"ffb2653eb2d9fc1a": "{model}이(가) 언어를 자동으로 감지합니다.",
11427
"773cbfca7c466cc4": "{model}은(는) 고정된 언어 하나를 사용합니다.",
@@ -11425,9 +11429,11 @@
11429
"d4b59565bd8b6d07": "영어로 번역",
11430
"0d88a0c771d98284": "어떤 언어로 말해도 영어 텍스트를 얻습니다.",
11431
"f4a8700049fc9dcc": "무음 필터링",
11432
+ "69558ed7b83d671e": "Apple Speech가 무음을 자체적으로 처리합니다.",
11433
"f22b17f6731c14c0": "OpenAI가 무음을 직접 처리합니다.",
11434
"75a3001ae4561b97": "받아쓰기 전에 무음과 배경 소음을 건너뜁니다.",
11435
"adde9666f7fb8c5d": "군말 제거",
11436
+ "95ac70c5da02c46a": "Apple Speech에서는 사용할 수 없습니다.",
11437
"943ea47b1df48f12": "받아쓰기에서 “음”, “어” 같은 말을 뺍니다.",
11438
"e1e054a313ece9d0": "사전",
11439
"79c4100c78265c98": "내 사전",
@@ -11465,6 +11471,7 @@
11471
"790951b4fc82052f": "모델 테스트",
11472
"a3eda37e8d337ebb": "한 문장을 말해 보세요. 정리를 건너뛰므로 모델이 들은 그대로 확인할 수 있습니다.",
11473
"c613b9c5d54f3c91": "마이크 새로 고침",
11474
+ "1119a2b45988a069": "이 Mac에서",
11475
"23196cabaa71f1da": "환경에서",
11476
"3ba49a214600d0ac": [
11477
{
apps/web/src/i18n/translations/pt-BR.json
+16
-9
@@ -155,10 +155,9 @@
155
"0cb7a36802fe8089": "O filtro {number} precisa de um caminho em body, headers ou query.",
156
"1fa38fb049c6b56e": "O filtro {number} precisa de um caminho em body, headers ou query e de pelo menos um valor.",
157
"31ec02bdcb3920d1": "O filtro {number} precisa de um caminho em body, headers ou query e de um valor.",
158
+ "62ae4688ece05590": "Armazenado com segurança, nunca mostrado ao agente",
159
"81f613bb68d85bb7": "Fora do chat, em um arquivo privado que os comandos deste agente podem ler por 24 horas",
160
"07b56c0c12bd2de1": "Fora do chat, em arquivos privados que os comandos deste agente podem ler por 24 horas",
160
- "6435447ce7656f13": "Mostrar {label}",
161
- "62ae4688ece05590": "Armazenado com segurança, nunca mostrado ao agente",
161
"8c2d901183b4e219": "Cole o segredo",
162
"610aea624f895a78": "Salvo com segurança e mantido privado",
163
"329b7854b7e0546e": "Use uma referência do 1Password como {example}.",
@@ -892,6 +891,11 @@
891
"2605da0149cd15f1": "Compactando o contexto",
892
"39a82db18ca50c21": "Contexto compactado de {before} → {after} tokens",
893
"885ae08a2160a158": "Contexto compactado",
894
+ "4d4981a1c5bd9728": "Executando comando",
895
+ "a078225c5f197cd2": "Comando com falha",
896
+ "37ab148aaa486051": "Comando recusado",
897
+ "0112efa1861c7a30": "Comando interrompido",
898
+ "930808342aac8010": "Comando executado",
899
"3ab6b281a0991766": "{count, plural, =1 {Verificou os pull requests vinculados} other {Verificou os pull requests vinculados {count} vezes}}",
900
"857e92a89b6b6257": "{count, plural, one {Leu {count} arquivo} other {Leu {count} arquivos}}",
901
"466ac7fcdb97bb76": "{count, plural, one {Alterou {count} arquivo} other {Alterou {count} arquivos}}",
@@ -1387,7 +1391,6 @@
1391
"4c9a0b64f128da3a": "Tentando novamente em {delay}s.",
1392
"5de030e595796117": "Thread criada",
1393
"c392becd445ecdba": "Pensando",
1390
- "930808342aac8010": "Comando executado",
1394
"c01f9d3f3624c903": "Comando",
1395
"fc933cf9b3edd743": "{fileName} alterado",
1396
"9bdd23eb0206783f": "Alteração de arquivo",
@@ -2992,9 +2995,11 @@
2995
"8c0223d264d9dc17": "A captura do microfone não parou.",
2996
"43692a5af811085a": "Falha na transcrição de voz. Verifique o destino em Configurações → Voz.",
2997
"7e047168a2832c65": "Escolha um modelo do OpenRouter em Configurações → Voz.",
2998
+ "4094c385ce0a6493": "Não foi possível iniciar a entrada de voz",
2999
+ "47e93194d837912b": "O Apple Speech não é compatível com este idioma.",
3000
+ "f9bebb0ec6c93680": "O Apple Speech não está disponível neste Mac.",
3001
"14ff185a0153700e": "Nenhum modelo corresponde ao seu idioma. Escolha um modelo ou mude o idioma nas configurações de Voz.",
3002
"ff4cf071e91f7617": "Não foi possível carregar os modelos de transcrição. Verifique a conexão e tente novamente.",
2997
- "4094c385ce0a6493": "Não foi possível iniciar a entrada de voz",
3003
"8fc9dbbfebef2a39": "A entrada de voz não está disponível",
3004
"2789404f0dbcdebe": "O modelo foi baixado, mas este ambiente não conseguiu selecioná-lo. Tente novamente.",
3005
"d83d0a88ac8cee3e": "O modelo não está pronto. Tente baixá-lo novamente.",
@@ -3735,10 +3740,6 @@
3740
"ac511f991a3c1fab": "Pesquisa na web",
3741
"07e65dba2b16d3f7": "{count, plural, one {{path} e mais {count}} other {{path} e mais {count}}}",
3742
"6ab96e26bda35288": "Pensando",
3738
- "4d4981a1c5bd9728": "Executando comando",
3739
- "a078225c5f197cd2": "Comando com falha",
3740
- "37ab148aaa486051": "Comando recusado",
3741
- "0112efa1861c7a30": "Comando interrompido",
3743
"dc8ddcad32e2a50c": "Executando {program}",
3744
"f0db8caadd8f120e": "{program} falhou",
3745
"9a4cc1d1df413b99": "{program} recusado",
@@ -3975,6 +3976,7 @@
3976
"90062342f04966ff": "Atualize o servidor do T3 Code deste ambiente para navegar pelos pull requests.",
3977
"5e7157db126f1641": "Issues indisponíveis",
3978
"42ade0e14ff6af94": "Atualize o servidor do T3 Code deste ambiente para navegar pelas issues.",
3979
+ "6435447ce7656f13": "Mostrar {label}",
3980
"993dcd04611f9571": "Salvar com segurança",
3981
"ccbe48efc8e30c52": "Excluir o chat paralelo \"{title}\"?",
3982
"3a859b690f41e899": "Isso apaga permanentemente o histórico dele.",
@@ -4706,6 +4708,7 @@
4708
"82d82cdbe3b0f975": "{size} · Use {shortcut} para manter uma colagem grande no texto.",
4709
"247cd77b35ddb586": "Não foi possível ler ''{name}'' como imagem.",
4710
"7eccb44d5449e777": "''{name}'' é grande demais para anexar, mesmo após a compressão.",
4711
+ "d07dd6dfd269680a": "Não foi possível restaurar {names}: o editor de mensagens atingiu o limite de {limit} anexos.",
4712
"1d4059658a0ab500": "Remover {name} da mensagem?\nEle é referenciado no seu texto; removê-lo também remove todas as referências.",
4713
"86261d5bd0651358": "Remover esta imagem da mensagem?\nEla é referenciada no seu texto; removê-la também remove todas as referências.",
4714
"f70c49e9f30807a3": "O texto colado é grande demais para esta mensagem",
@@ -4778,7 +4781,6 @@
4781
"c809a3c353e67a28": "O armazenamento do navegador rejeitou a atualização, então este item ainda pode estar lá após recarregar.",
4782
"1a4bc01f0ca772c2": "{names} excedeu o limite de tamanho dos guardados quando este prompt foi salvo.",
4783
"bb3b4ad32b596e11": "Não foi possível ler {names} quando este prompt foi salvo.",
4781
- "d07dd6dfd269680a": "Não foi possível restaurar {names}: o editor de mensagens atingiu o limite de {limit} anexos.",
4784
"7e4a6a2c84d34a80": "{names}: os arquivos guardados são mantidos por 24 horas e este upload expirou. Anexe o arquivo novamente.",
4785
"1e3ede33afee71ba": "Alguns anexos não foram restaurados",
4786
"98c76143d9aae871": "O item guardado pode voltar",
@@ -11459,6 +11461,7 @@
11461
"c32c85efb80dc740": "Transcrição de teste",
11462
"4b2f68f90eb004f6": "Nenhuma fala reconhecida. Tente novamente.",
11463
"cc04b357924afb36": "Fechar teste do modelo",
11464
+ "25607ff5f39ac0ac": "Apple Speech (indisponível)",
11465
"97ce6c61f0039edd": "Gerenciar OpenRouter",
11466
"ca50ce902d534122": "Gerenciar chave",
11467
"4993d154ece9c92f": "A entrada de voz usa o primeiro microfone conectado desta lista.",
@@ -11470,6 +11473,7 @@
11473
"817dbf1c068b62e7": "Onde sua fala é convertida em texto.",
11474
"710d3e4f0243014c": "Ambiente escolhido (indisponível)",
11475
"61088464d1b7174d": "ambiente indisponível",
11476
+ "2b3e8ee4f31d1433": "Automático usa o idioma do seu Mac. Um idioma é baixado no primeiro uso.",
11477
"71184e5a54a69f1d": "O provedor detecta seu idioma automaticamente.",
11478
"ffb2653eb2d9fc1a": "{model} detecta o idioma automaticamente.",
11479
"773cbfca7c466cc4": "{model} usa um idioma fixo.",
@@ -11477,9 +11481,11 @@
11481
"d4b59565bd8b6d07": "Traduzir para o inglês",
11482
"0d88a0c771d98284": "Fale em qualquer idioma e receba texto em inglês.",
11483
"f4a8700049fc9dcc": "Filtragem de silêncio",
11484
+ "69558ed7b83d671e": "O Apple Speech lida com o silêncio por conta própria.",
11485
"f22b17f6731c14c0": "A OpenAI trata o silêncio por conta própria.",
11486
"75a3001ae4561b97": "Ignora o silêncio e o ruído de fundo antes de transcrever.",
11487
"adde9666f7fb8c5d": "Remover palavras de preenchimento",
11488
+ "95ac70c5da02c46a": "Indisponível com o Apple Speech.",
11489
"943ea47b1df48f12": "Remove “hã” e “é…” das transcrições.",
11490
"e1e054a313ece9d0": "Dicionário",
11491
"79c4100c78265c98": "Seu dicionário",
@@ -11517,6 +11523,7 @@
11523
"790951b4fc82052f": "Testar modelo",
11524
"a3eda37e8d337ebb": "Diga uma frase. A limpeza é ignorada, então você vê exatamente o que o modelo ouviu.",
11525
"c613b9c5d54f3c91": "Atualizar microfones",
11526
+ "1119a2b45988a069": "Neste Mac",
11527
"23196cabaa71f1da": "Em um ambiente",
11528
"3ba49a214600d0ac": [
11529
"Nuvem via ",
apps/web/src/i18n/translations/ru.json
+16
-9
@@ -155,10 +155,9 @@
155
"0cb7a36802fe8089": "Фильтру {number} нужен путь в body, headers или query.",
156
"1fa38fb049c6b56e": "Фильтру {number} нужен путь в body, headers или query и хотя бы одно значение.",
157
"31ec02bdcb3920d1": "Фильтру {number} нужен путь в body, headers или query и значение.",
158
+ "62ae4688ece05590": "Хранится надёжно, агенту никогда не показывается",
159
"81f613bb68d85bb7": "Не попадает в чат: хранится в закрытом файле, который команды этого агента могут читать 24 часа",
160
"07b56c0c12bd2de1": "Не попадает в чат: хранится в закрытых файлах, которые команды этого агента могут читать 24 часа",
160
- "6435447ce7656f13": "Показать {label}",
161
- "62ae4688ece05590": "Хранится надёжно, агенту никогда не показывается",
161
"8c2d901183b4e219": "Вставьте секрет",
162
"610aea624f895a78": "Сохранено надёжно и скрыто",
163
"329b7854b7e0546e": "Используйте ссылку 1Password, например {example}.",
@@ -892,6 +891,11 @@
891
"2605da0149cd15f1": "Сжатие контекста",
892
"39a82db18ca50c21": "Контекст сжат: {before} → {after} токенов",
893
"885ae08a2160a158": "Контекст сжат",
894
+ "4d4981a1c5bd9728": "Выполняется команда",
895
+ "a078225c5f197cd2": "Команда с ошибкой",
896
+ "37ab148aaa486051": "Команда отклонена",
897
+ "0112efa1861c7a30": "Команда остановлена",
898
+ "930808342aac8010": "Команда выполнена",
899
"3ab6b281a0991766": "{count, plural, =1 {Проверены привязанные пул-реквесты} one {Привязанные пул-реквесты проверены {count} раз} few {Привязанные пул-реквесты проверены {count} раза} many {Привязанные пул-реквесты проверены {count} раз} other {Привязанные пул-реквесты проверены {count} раза}}",
900
"857e92a89b6b6257": "{count, plural, one {Прочитан {count} файл} few {Прочитано {count} файла} many {Прочитано {count} файлов} other {Прочитано {count} файла}}",
901
"466ac7fcdb97bb76": "{count, plural, one {Изменён {count} файл} few {Изменено {count} файла} many {Изменено {count} файлов} other {Изменено {count} файла}}",
@@ -1387,7 +1391,6 @@
1391
"4c9a0b64f128da3a": "Повтор через {delay} с.",
1392
"5de030e595796117": "Тред создан",
1393
"c392becd445ecdba": "Думает",
1390
- "930808342aac8010": "Команда выполнена",
1394
"c01f9d3f3624c903": "Команда",
1395
"fc933cf9b3edd743": "Изменён {fileName}",
1396
"9bdd23eb0206783f": "Изменение файла",
@@ -2992,9 +2995,11 @@
2995
"8c0223d264d9dc17": "Запись с микрофона не остановилась.",
2996
"43692a5af811085a": "Ошибка расшифровки голоса. Проверьте адрес назначения в «Настройки → Голос».",
2997
"7e047168a2832c65": "Выберите модель OpenRouter в «Настройки → Голос».",
2998
+ "4094c385ce0a6493": "Не удалось начать голосовой ввод",
2999
+ "47e93194d837912b": "Apple Speech не поддерживает этот язык.",
3000
+ "f9bebb0ec6c93680": "Apple Speech недоступен на этом Mac.",
3001
"14ff185a0153700e": "Нет модели для вашего языка. Выберите модель или смените язык в настройках голоса.",
3002
"ff4cf071e91f7617": "Не удалось загрузить модели расшифровки. Проверьте подключение и повторите попытку.",
2997
- "4094c385ce0a6493": "Не удалось начать голосовой ввод",
3003
"8fc9dbbfebef2a39": "Голосовой ввод недоступен",
3004
"2789404f0dbcdebe": "Модель скачана, но окружению не удалось её выбрать. Повторите попытку.",
3005
"d83d0a88ac8cee3e": "Модель не готова. Попробуйте скачать её снова.",
@@ -3735,10 +3740,6 @@
3740
"ac511f991a3c1fab": "Поиск в интернете",
3741
"07e65dba2b16d3f7": "{count, plural, one {{path} и ещё {count}} few {{path} и ещё {count}} many {{path} и ещё {count}} other {{path} и ещё {count}}}",
3742
"6ab96e26bda35288": "Думает",
3738
- "4d4981a1c5bd9728": "Выполняется команда",
3739
- "a078225c5f197cd2": "Команда с ошибкой",
3740
- "37ab148aaa486051": "Команда отклонена",
3741
- "0112efa1861c7a30": "Команда остановлена",
3743
"dc8ddcad32e2a50c": "Выполняется {program}",
3744
"f0db8caadd8f120e": "Ошибка {program}",
3745
"9a4cc1d1df413b99": "Отклонено: {program}",
@@ -3975,6 +3976,7 @@
3976
"90062342f04966ff": "Обновите сервер T3 Code этого окружения, чтобы просматривать пул-реквесты.",
3977
"5e7157db126f1641": "Issue недоступны",
3978
"42ade0e14ff6af94": "Обновите сервер T3 Code в этом окружении, чтобы просматривать issue.",
3979
+ "6435447ce7656f13": "Показать {label}",
3980
"993dcd04611f9571": "Сохранить безопасно",
3981
"ccbe48efc8e30c52": "Удалить боковой чат «{title}»?",
3982
"3a859b690f41e899": "Его история беседы будет удалена безвозвратно.",
@@ -4706,6 +4708,7 @@
4708
"82d82cdbe3b0f975": "{size} · {shortcut} — оставить большую вставку в тексте.",
4709
"247cd77b35ddb586": "''{name}'' не удалось прочитать как изображение.",
4710
"7eccb44d5449e777": "''{name}'' слишком большой для прикрепления даже после сжатия.",
4711
+ "d07dd6dfd269680a": "{names} не удалось восстановить: в поле ввода достигнут лимит вложений ({limit}).",
4712
"1d4059658a0ab500": "Удалить {name} из сообщения?\nНа него есть ссылки в тексте; при удалении все ссылки тоже будут удалены.",
4713
"86261d5bd0651358": "Удалить это изображение из сообщения?\nНа него есть ссылки в тексте; при удалении все ссылки тоже будут удалены.",
4714
"f70c49e9f30807a3": "Вставленный текст слишком велик для этого сообщения",
@@ -4778,7 +4781,6 @@
4781
"c809a3c353e67a28": "Хранилище браузера отклонило обновление, поэтому запись может остаться после перезагрузки.",
4782
"1a4bc01f0ca772c2": "{names} превысили лимит размера тайника при сохранении этого промпта.",
4783
"bb3b4ad32b596e11": "{names} не удалось прочитать при сохранении этого промпта.",
4781
- "d07dd6dfd269680a": "{names} не удалось восстановить: в поле ввода достигнут лимит вложений ({limit}).",
4784
"7e4a6a2c84d34a80": "{names}: спрятанные файлы хранятся 24 часа, срок этой загрузки истёк. Прикрепите файл снова.",
4785
"1e3ede33afee71ba": "Некоторые вложения не восстановлены",
4786
"98c76143d9aae871": "Запись тайника может вернуться",
@@ -11460,6 +11462,7 @@
11462
"c32c85efb80dc740": "Пробная расшифровка",
11463
"4b2f68f90eb004f6": "Речь не распознана. Попробуйте ещё раз.",
11464
"cc04b357924afb36": "Закрыть проверку модели",
11465
+ "25607ff5f39ac0ac": "Apple Speech (недоступно)",
11466
"97ce6c61f0039edd": "Управление OpenRouter",
11467
"ca50ce902d534122": "Управление ключом",
11468
"4993d154ece9c92f": "Голосовой ввод использует первый подключённый микрофон из этого списка.",
@@ -11471,6 +11474,7 @@
11474
"817dbf1c068b62e7": "Где ваша речь превращается в текст.",
11475
"710d3e4f0243014c": "Выбранное окружение (недоступно)",
11476
"61088464d1b7174d": "недоступное окружение",
11477
+ "2b3e8ee4f31d1433": "«Автоматически» использует язык вашего Mac. Язык загружается при первом использовании.",
11478
"71184e5a54a69f1d": "Провайдер определяет язык автоматически.",
11479
"ffb2653eb2d9fc1a": "{model} определяет язык автоматически.",
11480
"773cbfca7c466cc4": "{model} использует один фиксированный язык.",
@@ -11478,9 +11482,11 @@
11482
"d4b59565bd8b6d07": "Переводить на английский",
11483
"0d88a0c771d98284": "Говорите на любом языке и получайте текст на английском.",
11484
"f4a8700049fc9dcc": "Фильтрация тишины",
11485
+ "69558ed7b83d671e": "Apple Speech сам обрабатывает тишину.",
11486
"f22b17f6731c14c0": "OpenAI сам обрабатывает тишину.",
11487
"75a3001ae4561b97": "Пропускать тишину и фоновый шум перед расшифровкой.",
11488
"adde9666f7fb8c5d": "Удалять слова-паразиты",
11489
+ "95ac70c5da02c46a": "Недоступно с Apple Speech.",
11490
"943ea47b1df48f12": "Убирать «э-э» и «м-м» из расшифровки.",
11491
"e1e054a313ece9d0": "Словарь",
11492
"79c4100c78265c98": "Ваш словарь",
@@ -11518,6 +11524,7 @@
11524
"790951b4fc82052f": "Проверить модель",
11525
"a3eda37e8d337ebb": "Скажите фразу. Очистка пропускается, поэтому вы увидите ровно то, что услышала модель.",
11526
"c613b9c5d54f3c91": "Обновить список микрофонов",
11527
+ "1119a2b45988a069": "На этом Mac",
11528
"23196cabaa71f1da": "В окружении",
11529
"3ba49a214600d0ac": [
11530
"Облако через ",
apps/web/src/i18n/translations/sv.json
+16
-9
@@ -155,10 +155,9 @@
155
"0cb7a36802fe8089": "Filter {number} behöver en sökväg under body, headers eller query.",
156
"1fa38fb049c6b56e": "Filter {number} behöver en sökväg under body, headers eller query och minst ett värde.",
157
"31ec02bdcb3920d1": "Filter {number} behöver en sökväg under body, headers eller query och ett värde.",
158
+ "62ae4688ece05590": "Lagras säkert, visas aldrig för agenten",
159
"81f613bb68d85bb7": "Hålls utanför chatten, i en privat fil som den här agentens kommandon kan läsa i 24 timmar",
160
"07b56c0c12bd2de1": "Hålls utanför chatten, i privata filer som den här agentens kommandon kan läsa i 24 timmar",
160
- "6435447ce7656f13": "Visa {label}",
161
- "62ae4688ece05590": "Lagras säkert, visas aldrig för agenten",
161
"8c2d901183b4e219": "Klistra in hemligheten",
162
"610aea624f895a78": "Sparad säkert och hålls privat",
163
"329b7854b7e0546e": "Använd en 1Password-referens som {example}.",
@@ -892,6 +891,11 @@
891
"2605da0149cd15f1": "Komprimerar kontext",
892
"39a82db18ca50c21": "Kontexten komprimerades {before} → {after} token",
893
"885ae08a2160a158": "Kontexten komprimerades",
894
+ "4d4981a1c5bd9728": "Kör kommando",
895
+ "a078225c5f197cd2": "Misslyckat kommando",
896
+ "37ab148aaa486051": "Avböjt kommando",
897
+ "0112efa1861c7a30": "Stoppat kommando",
898
+ "930808342aac8010": "Körde kommando",
899
"3ab6b281a0991766": "{count, plural, =1 {Kontrollerade länkade pull requests} other {Kontrollerade länkade pull requests {count} gånger}}",
900
"857e92a89b6b6257": "{count, plural, one {Läste {count} fil} other {Läste {count} filer}}",
901
"466ac7fcdb97bb76": "{count, plural, one {Ändrade {count} fil} other {Ändrade {count} filer}}",
@@ -1387,7 +1391,6 @@
1391
"4c9a0b64f128da3a": "Försöker igen om {delay} s.",
1392
"5de030e595796117": "Skapade tråd",
1393
"c392becd445ecdba": "Tänker",
1390
- "930808342aac8010": "Körde kommando",
1394
"c01f9d3f3624c903": "Kommando",
1395
"fc933cf9b3edd743": "Ändrade {fileName}",
1396
"9bdd23eb0206783f": "Filändring",
@@ -2992,9 +2995,11 @@
2995
"8c0223d264d9dc17": "Mikrofoninspelningen stoppades inte.",
2996
"43692a5af811085a": "Rösttranskriberingen misslyckades. Kontrollera målet i Inställningar → Röst.",
2997
"7e047168a2832c65": "Välj en OpenRouter-modell i Inställningar → Röst.",
2998
+ "4094c385ce0a6493": "Kunde inte starta röstinmatning",
2999
+ "47e93194d837912b": "Apple Speech stöder inte det här språket.",
3000
+ "f9bebb0ec6c93680": "Apple Speech är inte tillgängligt på den här Macen.",
3001
"14ff185a0153700e": "Ingen modell matchar ditt språk. Välj en modell eller ändra språket i röstinställningarna.",
3002
"ff4cf071e91f7617": "Kunde inte läsa in transkriberingsmodeller. Kontrollera anslutningen och försök igen.",
2997
- "4094c385ce0a6493": "Kunde inte starta röstinmatning",
3003
"8fc9dbbfebef2a39": "Röstinmatning är inte tillgänglig",
3004
"2789404f0dbcdebe": "Modellen laddades ned, men den här miljön kunde inte välja den. Försök igen.",
3005
"d83d0a88ac8cee3e": "Modellen är inte redo. Försök ladda ned den igen.",
@@ -3735,10 +3740,6 @@
3740
"ac511f991a3c1fab": "Webbsökning",
3741
"07e65dba2b16d3f7": "{count, plural, one {{path} +{count} till} other {{path} +{count} till}}",
3742
"6ab96e26bda35288": "Tänker",
3738
- "4d4981a1c5bd9728": "Kör kommando",
3739
- "a078225c5f197cd2": "Misslyckat kommando",
3740
- "37ab148aaa486051": "Avböjt kommando",
3741
- "0112efa1861c7a30": "Stoppat kommando",
3743
"dc8ddcad32e2a50c": "Kör {program}",
3744
"f0db8caadd8f120e": "Misslyckades: {program}",
3745
"9a4cc1d1df413b99": "Avböjde {program}",
@@ -3975,6 +3976,7 @@
3976
"90062342f04966ff": "Uppdatera den här miljöns T3 Code-server för att bläddra bland pull requests.",
3977
"5e7157db126f1641": "Ärenden är inte tillgängliga",
3978
"42ade0e14ff6af94": "Uppdatera T3 Code-servern i den här miljön för att bläddra bland ärenden.",
3979
+ "6435447ce7656f13": "Visa {label}",
3980
"993dcd04611f9571": "Spara säkert",
3981
"ccbe48efc8e30c52": "Ta bort sidochatten ”{title}”?",
3982
"3a859b690f41e899": "Det här rensar dess konversationshistorik permanent.",
@@ -4707,6 +4709,7 @@
4709
"82d82cdbe3b0f975": "{size} · Använd {shortcut} för att behålla en stor inklistring i texten.",
4710
"247cd77b35ddb586": "”{name}” kunde inte läsas som en bild.",
4711
"7eccb44d5449e777": "”{name}” är för stor att bifoga, även efter komprimering.",
4712
+ "d07dd6dfd269680a": "{names} kunde inte återställas: inmatningsfältet har nått gränsen på {limit} bilagor.",
4713
"1d4059658a0ab500": "Ta bort {name} från meddelandet?\nDen refereras i din text; om du tar bort den tas även alla referenser bort.",
4714
"86261d5bd0651358": "Ta bort den här bilden från meddelandet?\nDen refereras i din text; om du tar bort den tas även alla referenser bort.",
4715
"f70c49e9f30807a3": "Den inklistrade texten är för stor för det här meddelandet",
@@ -4779,7 +4782,6 @@
4782
"c809a3c353e67a28": "Webbläsarens lagring avvisade uppdateringen, så posten kan finnas kvar efter en omladdning.",
4783
"1a4bc01f0ca772c2": "{names} överskred storleksgränsen för undanlagda promptar när prompten sparades.",
4784
"bb3b4ad32b596e11": "{names} kunde inte läsas när prompten sparades.",
4782
- "d07dd6dfd269680a": "{names} kunde inte återställas: inmatningsfältet har nått gränsen på {limit} bilagor.",
4785
"7e4a6a2c84d34a80": "{names}: undanlagda filer behålls i 24 timmar och den här uppladdningen har gått ut. Bifoga filen igen.",
4786
"1e3ede33afee71ba": "Vissa bilagor återställdes inte",
4787
"98c76143d9aae871": "Den undanlagda prompten kan komma tillbaka",
@@ -11468,6 +11470,7 @@
11470
"c32c85efb80dc740": "Testtranskription",
11471
"4b2f68f90eb004f6": "Inget tal kändes igen. Försök igen.",
11472
"cc04b357924afb36": "Stäng modelltestet",
11473
+ "25607ff5f39ac0ac": "Apple Speech (inte tillgängligt)",
11474
"97ce6c61f0039edd": "Hantera OpenRouter",
11475
"ca50ce902d534122": "Hantera nyckel",
11476
"4993d154ece9c92f": "Röstinmatning använder den första anslutna mikrofonen i listan.",
@@ -11479,6 +11482,7 @@
11482
"817dbf1c068b62e7": "Var ditt tal omvandlas till text.",
11483
"710d3e4f0243014c": "Vald miljö (inte tillgänglig)",
11484
"61088464d1b7174d": "miljö som inte är tillgänglig",
11485
+ "2b3e8ee4f31d1433": "Automatiskt använder din Macs språk. Ett språk hämtas första gången det används.",
11486
"71184e5a54a69f1d": "Leverantören identifierar ditt språk automatiskt.",
11487
"ffb2653eb2d9fc1a": "{model} identifierar språket automatiskt.",
11488
"773cbfca7c466cc4": "{model} använder ett fast språk.",
@@ -11486,9 +11490,11 @@
11490
"d4b59565bd8b6d07": "Översätt till engelska",
11491
"0d88a0c771d98284": "Prata vilket språk som helst och få engelsk text.",
11492
"f4a8700049fc9dcc": "Tystnadsfiltrering",
11493
+ "69558ed7b83d671e": "Apple Speech hanterar tystnad på egen hand.",
11494
"f22b17f6731c14c0": "OpenAI hanterar tystnad själv.",
11495
"75a3001ae4561b97": "Hoppa över tystnad och bakgrundsljud före transkriberingen.",
11496
"adde9666f7fb8c5d": "Ta bort utfyllnadsord",
11497
+ "95ac70c5da02c46a": "Inte tillgängligt med Apple Speech.",
11498
"943ea47b1df48f12": "Ta bort ”öh” och ”ehm” från transkriptioner.",
11499
"e1e054a313ece9d0": "Ordlista",
11500
"79c4100c78265c98": "Din ordlista",
@@ -11526,6 +11532,7 @@
11532
"790951b4fc82052f": "Testa modell",
11533
"a3eda37e8d337ebb": "Säg en mening. Rensningen hoppas över, så du ser exakt vad modellen hörde.",
11534
"c613b9c5d54f3c91": "Uppdatera mikrofoner",
11535
+ "1119a2b45988a069": "På den här Macen",
11536
"23196cabaa71f1da": "I en miljö",
11537
"3ba49a214600d0ac": [
11538
"Moln via ",
apps/web/src/i18n/translations/zh.json
+16
-9
@@ -155,10 +155,9 @@
155
"0cb7a36802fe8089": "筛选器 {number} 需要 body、headers 或 query 下的路径。",
156
"1fa38fb049c6b56e": "筛选器 {number} 需要 body、headers 或 query 下的路径,以及至少一个值。",
157
"31ec02bdcb3920d1": "筛选器 {number} 需要 body、headers 或 query 下的路径,以及一个值。",
158
+ "62ae4688ece05590": "安全存储,绝不会展示给智能体",
159
"81f613bb68d85bb7": "不会出现在对话中,而是存放在一个私密文件里,此智能体的命令可在 24 小时内读取",
160
"07b56c0c12bd2de1": "不会出现在对话中,而是存放在私密文件里,此智能体的命令可在 24 小时内读取",
160
- "6435447ce7656f13": "显示{label}",
161
- "62ae4688ece05590": "安全存储,绝不会展示给智能体",
161
"8c2d901183b4e219": "粘贴凭据",
162
"610aea624f895a78": "已安全保存并保密",
163
"329b7854b7e0546e": "请使用类似 {example} 的 1Password 引用。",
@@ -892,6 +891,11 @@
891
"2605da0149cd15f1": "正在压缩上下文",
892
"39a82db18ca50c21": "上下文已压缩:{before} → {after} token",
893
"885ae08a2160a158": "上下文已压缩",
894
+ "4d4981a1c5bd9728": "正在运行命令",
895
+ "a078225c5f197cd2": "命令失败",
896
+ "37ab148aaa486051": "已拒绝命令",
897
+ "0112efa1861c7a30": "已停止命令",
898
+ "930808342aac8010": "已运行命令",
899
"3ab6b281a0991766": "{count, plural, =1 {已检查关联的 pull request } other {已检查关联的 pull request {count} 次}}",
900
"857e92a89b6b6257": "{count, plural, other {已读取 {count} 个文件}}",
901
"466ac7fcdb97bb76": "{count, plural, other {已更改 {count} 个文件}}",
@@ -1387,7 +1391,6 @@
1391
"4c9a0b64f128da3a": "{delay} 秒后重试。",
1392
"5de030e595796117": "已创建会话",
1393
"c392becd445ecdba": "正在思考",
1390
- "930808342aac8010": "已运行命令",
1394
"c01f9d3f3624c903": "命令",
1395
"fc933cf9b3edd743": "已更改 {fileName}",
1396
"9bdd23eb0206783f": "文件修改",
@@ -2996,9 +2999,11 @@
2999
"8c0223d264d9dc17": "麦克风采集未停止。",
3000
"43692a5af811085a": "语音转写失败。请检查“设置 → 语音”中的目标。",
3001
"7e047168a2832c65": "请在“设置 → 语音”中选择 OpenRouter 模型。",
3002
+ "4094c385ce0a6493": "无法开始语音输入",
3003
+ "47e93194d837912b": "Apple Speech 不支持此语言。",
3004
+ "f9bebb0ec6c93680": "此 Mac 上无法使用 Apple Speech。",
3005
"14ff185a0153700e": "没有与你的语言匹配的模型。请选择模型,或在“设置 → 语音”中更改语言。",
3006
"ff4cf071e91f7617": "无法加载转写模型。请检查连接后重试。",
3001
- "4094c385ce0a6493": "无法开始语音输入",
3007
"8fc9dbbfebef2a39": "语音输入不可用",
3008
"2789404f0dbcdebe": "模型已下载,但此环境无法选用它。请重试。",
3009
"d83d0a88ac8cee3e": "模型尚未就绪。请重新下载。",
@@ -3739,10 +3744,6 @@
3744
"ac511f991a3c1fab": "网络搜索",
3745
"07e65dba2b16d3f7": "{count, plural, other {{path},另有 {count} 个}}",
3746
"6ab96e26bda35288": "正在思考",
3742
- "4d4981a1c5bd9728": "正在运行命令",
3743
- "a078225c5f197cd2": "命令失败",
3744
- "37ab148aaa486051": "已拒绝命令",
3745
- "0112efa1861c7a30": "已停止命令",
3747
"dc8ddcad32e2a50c": "正在运行 {program}",
3748
"f0db8caadd8f120e": "{program} 失败",
3749
"9a4cc1d1df413b99": "已拒绝 {program}",
@@ -3980,6 +3981,7 @@
3981
"90062342f04966ff": "请更新此环境的 T3 Code 服务器后再浏览 pull request。",
3982
"5e7157db126f1641": "issue 不可用",
3983
"42ade0e14ff6af94": "请更新此环境的 T3 Code 服务器以浏览 issue。",
3984
+ "6435447ce7656f13": "显示{label}",
3985
"993dcd04611f9571": "安全保存",
3986
"ccbe48efc8e30c52": "删除侧聊“{title}”?",
3987
"3a859b690f41e899": "这会永久清除它的对话记录。",
@@ -4713,6 +4715,7 @@
4715
"82d82cdbe3b0f975": "{size} · 按 {shortcut} 可将大段内容直接粘贴到正文中。",
4716
"247cd77b35ddb586": "无法将“{name}”读取为图片。",
4717
"7eccb44d5449e777": "“{name}”过大,即使压缩后也无法附加。",
4718
+ "d07dd6dfd269680a": "无法恢复 {names}:输入框已达到 {limit} 个附件的上限。",
4719
"1d4059658a0ab500": "要从消息中移除 {name} 吗?\n正文中引用了它,移除后所有引用也会一并删除。",
4720
"86261d5bd0651358": "从消息中移除此图片?\n文本中引用了它;移除后所有引用也会一并移除。",
4721
"f70c49e9f30807a3": "粘贴的文字对这条消息来说太长了",
@@ -4785,7 +4788,6 @@
4788
"c809a3c353e67a28": "浏览器存储拒绝了这次更新,所以刷新后这条记录可能仍在。",
4789
"1a4bc01f0ca772c2": "保存这条提示词时,{names} 超出了暂存大小限制。",
4790
"bb3b4ad32b596e11": "保存这条提示词时,无法读取 {names}。",
4788
- "d07dd6dfd269680a": "无法恢复 {names}:输入框已达到 {limit} 个附件的上限。",
4791
"7e4a6a2c84d34a80": "{names}:暂存的文件只保留 24 小时,这次上传已过期,请重新添加文件。",
4792
"1e3ede33afee71ba": "部分附件未能恢复",
4793
"98c76143d9aae871": "暂存条目可能会再次出现",
@@ -11482,6 +11484,7 @@
11484
"c32c85efb80dc740": "测试转写文本",
11485
"4b2f68f90eb004f6": "未识别到语音,请重试。",
11486
"cc04b357924afb36": "关闭模型测试",
11487
+ "25607ff5f39ac0ac": "Apple Speech(不可用)",
11488
"97ce6c61f0039edd": "管理 OpenRouter",
11489
"ca50ce902d534122": "管理密钥",
11490
"4993d154ece9c92f": "语音输入会使用此列表中排在最前且已连接的麦克风。",
@@ -11493,6 +11496,7 @@
11496
"817dbf1c068b62e7": "将语音转为文本的位置。",
11497
"710d3e4f0243014c": "已选择的环境(不可用)",
11498
"61088464d1b7174d": "环境不可用",
11499
+ "2b3e8ee4f31d1433": "“自动”使用 Mac 的语言。首次使用某种语言时会下载该语言。",
11500
"71184e5a54a69f1d": "提供方会自动检测语言。",
11501
"ffb2653eb2d9fc1a": "{model} 会自动检测语言。",
11502
"773cbfca7c466cc4": "{model} 使用固定语言。",
@@ -11500,9 +11504,11 @@
11504
"d4b59565bd8b6d07": "翻译为英文",
11505
"0d88a0c771d98284": "用任意语言说话,生成英文文本。",
11506
"f4a8700049fc9dcc": "静音过滤",
11507
+ "69558ed7b83d671e": "Apple Speech 会自行处理静音。",
11508
"f22b17f6731c14c0": "OpenAI 会自行处理静音。",
11509
"75a3001ae4561b97": "转写前跳过静音和背景噪声。",
11510
"adde9666f7fb8c5d": "移除语气词",
11511
+ "95ac70c5da02c46a": "Apple Speech 不支持此功能。",
11512
"943ea47b1df48f12": "从转写文本中移除“嗯”“呃”等语气词。",
11513
"e1e054a313ece9d0": "词典",
11514
"79c4100c78265c98": "你的词典",
@@ -11541,6 +11547,7 @@
11547
"790951b4fc82052f": "测试模型",
11548
"a3eda37e8d337ebb": "说一句话。测试会跳过整理步骤,直接显示模型听到的内容。",
11549
"c613b9c5d54f3c91": "刷新麦克风",
11550
+ "1119a2b45988a069": "在此 Mac 上",
11551
"23196cabaa71f1da": "在环境中",
11552
"3ba49a214600d0ac": [
11553
"通过 ",
apps/web/src/speech/appleSpeech.ts
new
+55
@@ -0,0 +1,55 @@
1
+import { useSyncExternalStore } from "react";
2
+
3
+const emptyLocales: readonly string[] = [];
4
+let locales = emptyLocales;
5
+let probe: Promise<void> | undefined;
6
+const listeners = new Set<() => void>();
7
+
8
+export function readAppleSpeechLocales() {
9
+ return locales;
10
+}
11
+
12
+export function supportsAppleSpeechLocale(available: readonly string[], locale: string) {
13
+ const language = locale.toLowerCase().split("-")[0];
14
+ return available.some((candidate) => candidate.toLowerCase().split("-")[0] === language);
15
+}
16
+
17
+export function resolveAppleSpeechLocale(
18
+ available: readonly string[],
19
+ preference: string,
20
+ system: readonly string[],
21
+) {
22
+ if (supportsAppleSpeechLocale(available, preference)) return preference;
23
+ return system.find((locale) => supportsAppleSpeechLocale(available, locale)) ?? system[0];
24
+}
25
+
26
+function probeLocales() {
27
+ if (locales.length === 0 && !probe && window.desktopBridge?.appleSpeech) {
28
+ probe = window.desktopBridge.appleSpeech
29
+ .supportedLocales()
30
+ .then((value) => {
31
+ if (value.length === 0) return;
32
+ locales = value;
33
+ listeners.forEach((notify) => notify());
34
+ })
35
+ .catch(() => {})
36
+ .finally(() => {
37
+ probe = undefined;
38
+ });
39
+ }
40
+}
41
+
42
+function subscribe(listener: () => void) {
43
+ if (listeners.size === 0) window.addEventListener("focus", probeLocales);
44
+ listeners.add(listener);
45
+ probeLocales();
46
+ return () => {
47
+ listeners.delete(listener);
48
+ if (listeners.size === 0) window.removeEventListener("focus", probeLocales);
49
+ };
50
+}
51
+
52
+/** Apple Speech runs only in the desktop app on macOS 26 or later. */
53
+export function useAppleSpeechLocales() {
54
+ return useSyncExternalStore(subscribe, readAppleSpeechLocales, () => emptyLocales);
55
+}
apps/web/src/speech/browserVoiceInput.browser.test.ts
+60
-1
@@ -9,8 +9,12 @@ import { decodeSpeechPcmRequest } from "@t3tools/shared/speech";
9
import { expect, it, vi } from "vite-plus/test";
10
11
import { stubGlobal } from "../../test/render";
12
+import { resolveAppleSpeechLocale } from "./appleSpeech";
13
import { createBrowserPcmCapture } from "./browserPcmCapture";
13
-import { createBrowserVoiceInputPlatform } from "./browserVoiceInput";
14
+import {
15
+ createAppleSpeechVoiceInputPlatform,
16
+ createBrowserVoiceInputPlatform,
17
+} from "./browserVoiceInput";
18
19
vi.mock("../connection/runtime", async () => {
20
const [{ Atom }, { layerRemoteHttpClient }] = await Promise.all([
@@ -194,6 +198,61 @@ it("retains all PCM until stop, retries batch audio, and captures preferences be
198
expect(platform.recorder.uri).toBeNull();
199
});
200
201
+it.each([
202
+ ["fr", ["en-US"], "fr"],
203
+ ["auto", ["nl-NL", "en-US"], "en-US"],
204
+] as const)(
205
+ "resolves Apple Speech language %s with Mac preferences %j",
206
+ (preference, system, expected) => {
207
+ expect(resolveAppleSpeechLocale(["en-US", "fr-FR"], preference, system)).toBe(expected);
208
+ },
209
+);
210
+
211
+it.each(["prepare", "transcribe"] as const)(
212
+ "cancels Apple Speech while native %s is pending",
213
+ async (stage) => {
214
+ const entered = Promise.withResolvers<void>();
215
+ const pending = Promise.withResolvers<{ ok: true; value: string }>();
216
+ using _bridge = stubGlobal("desktopBridge", {
217
+ appleSpeech: {
218
+ prepare: async () => {
219
+ if (stage !== "prepare") return { ok: true, value: "en-US" };
220
+ entered.resolve();
221
+ return pending.promise;
222
+ },
223
+ transcribe: async () => {
224
+ entered.resolve();
225
+ return pending.promise;
226
+ },
227
+ },
228
+ });
229
+ const platform = createAppleSpeechVoiceInputPlatform({
230
+ hasAudioConsent: () => true,
231
+ getTranscriptionOptions: () => DEFAULT_SPEECH_TRANSCRIPTION_OPTIONS,
232
+ getMicrophoneId: () => "",
233
+ onLevel() {},
234
+ onDurationLimit() {},
235
+ onError() {},
236
+ });
237
+ const abort = new AbortController();
238
+ using _cleanup = {
239
+ [Symbol.dispose]: () => {
240
+ abort.abort();
241
+ pending.resolve({ ok: true, value: "late" });
242
+ platform.cancelRecording();
243
+ },
244
+ };
245
+ const options = { signal: abort.signal };
246
+ const transcription = await platform.transcriber.prepare(options);
247
+ const uri = URL.createObjectURL(new Blob([new Float32Array([0.5])]));
248
+ using _blob = { [Symbol.dispose]: () => URL.revokeObjectURL(uri) };
249
+ const result = transcription.transcribe(uri, options);
250
+ await entered.promise;
251
+ abort.abort();
252
+ await expect(result).rejects.toThrow();
253
+ },
254
+);
255
+
256
it("streams the opening audio in order when the destination becomes ready during capture", async () => {
257
using microphone = capture();
258
const feed = vi.fn();
apps/web/src/speech/browserVoiceInput.ts
+71
@@ -20,6 +20,7 @@ import type {
20
import type { CloudSpeechModelId, CloudSpeechProvider } from "@t3tools/contracts";
21
import * as Schema from "effect/Schema";
22
23
+import { readAppleSpeechLocales, resolveAppleSpeechLocale } from "./appleSpeech";
24
import { createBrowserPcmCapture } from "./browserPcmCapture";
25
import { runEnvironmentSpeech } from "./runEnvironmentSpeech";
26
import { msg } from "gt-react";
@@ -145,3 +146,73 @@ export function createBrowserVoiceInputPlatform(input: {
146
};
147
});
148
}
149
+
150
+async function waitForAppleSpeech<T>(request: Promise<T>, signal: AbortSignal): Promise<T> {
151
+ const aborted = Promise.withResolvers<never>();
152
+ const onAbort = () => aborted.reject(signal.reason);
153
+ signal.addEventListener("abort", onAbort, { once: true });
154
+ if (signal.aborted) onAbort();
155
+ try {
156
+ return await Promise.race([request, aborted.promise]);
157
+ } finally {
158
+ signal.removeEventListener("abort", onAbort);
159
+ }
160
+}
161
+
162
+/** Records like the environment path, then transcribes in the desktop main process; audio stays on this Mac. */
163
+export function createAppleSpeechVoiceInputPlatform(input: {
164
+ readonly hasAudioConsent: () => boolean;
165
+ readonly getTranscriptionOptions: () => SpeechTranscriptionOptions;
166
+ readonly getMicrophoneId: () => string | Promise<string>;
167
+ readonly onLevel: (level: number) => void;
168
+ readonly onDurationLimit: () => void;
169
+ readonly onError: (message: string, code?: VoiceInputErrorCode) => void;
170
+}) {
171
+ return createBrowserPcmCapture(input, async ({ signal }) => {
172
+ const appleSpeech = window.desktopBridge?.appleSpeech;
173
+ const { speechLanguage } = input.getTranscriptionOptions();
174
+ // The packaged app pins `navigator.language` to en-US, so "auto" asks the OS.
175
+ const system = window.desktopBridge?.getPreferredSystemLanguages?.() ?? [];
176
+ if (!appleSpeech) throw new Error("Apple Speech is not available.");
177
+ signal.throwIfAborted();
178
+ const prepared = await waitForAppleSpeech(
179
+ appleSpeech.prepare(
180
+ resolveAppleSpeechLocale(readAppleSpeechLocales(), speechLanguage, system) ??
181
+ navigator.language,
182
+ ),
183
+ signal,
184
+ );
185
+ throwIfVoiceTranscriptionAborted(signal);
186
+ if (!prepared.ok) {
187
+ if (prepared.code === "failed") throw new Error("Apple Speech could not prepare.");
188
+ throw new VoiceTranscriptionError({
189
+ code: prepared.code,
190
+ message:
191
+ prepared.code === "unsupported-locale"
192
+ ? m(msg("Apple Speech does not support this language."))
193
+ : m(msg("Apple Speech is not available on this Mac.")),
194
+ });
195
+ }
196
+ const locale = prepared.value;
197
+ return {
198
+ locale,
199
+ transcribe: async (uri, { signal: transcriptionSignal }) => {
200
+ const response = await fetch(uri, { signal: transcriptionSignal });
201
+ const pcm = new Uint8Array(await response.arrayBuffer());
202
+ throwIfVoiceTranscriptionAborted(transcriptionSignal);
203
+ if (!input.hasAudioConsent())
204
+ throw new VoiceTranscriptionError({
205
+ code: "cancelled",
206
+ message: m(msg("Voice transcription was cancelled.")),
207
+ });
208
+ const result = await waitForAppleSpeech(
209
+ appleSpeech.transcribe({ locale, pcm }),
210
+ transcriptionSignal,
211
+ );
212
+ throwIfVoiceTranscriptionAborted(transcriptionSignal);
213
+ if (!result.ok) throw new Error("Apple Speech could not transcribe.");
214
+ return result.value;
215
+ },
216
+ };
217
+ });
218
+}
apps/web/src/speech/useEnvironmentSpeechInput.browser.test.tsx
+78
-39
@@ -61,6 +61,7 @@ const mocks = vi.hoisted(() => ({
61
transcripts: [] as Array<string | Error>,
62
committed: vi.fn(),
63
draft: "",
64
+ appleSpeech: false,
65
storedDraft: "",
66
}));
67
@@ -175,44 +176,53 @@ vi.mock("@t3tools/client-runtime/voice-input", async (importOriginal) => ({
176
return { text: `Cleaned ${transcript}` };
177
}),
178
}));
179
+vi.mock("./appleSpeech", () => ({
180
+ useAppleSpeechLocales: () => (mocks.appleSpeech ? ["en-US"] : []),
181
+}));
182
vi.mock("./browserVoiceInput", () => ({
179
- createBrowserVoiceInputPlatform: (
180
- input: Parameters<typeof createBrowserVoiceInputPlatform>[0],
181
- ) => {
182
- const environmentId = input.prepared.environmentId;
183
- mocks.platforms.push(environmentId);
184
- return {
185
- recorder: {
186
- uri: `blob:${environmentId}`,
187
- prepareToRecordAsync: async () => {
188
- mocks.microphoneRequests.push(environmentId);
189
- },
190
- record() {},
191
- stop: async () => {},
183
+ createAppleSpeechVoiceInputPlatform: (
184
+ input: Omit<Parameters<typeof createBrowserVoiceInputPlatform>[0], "prepared">,
185
+ ) => mockPlatform("apple-speech", input),
186
+ createBrowserVoiceInputPlatform: (input: Parameters<typeof createBrowserVoiceInputPlatform>[0]) =>
187
+ mockPlatform(input.prepared.environmentId, input),
188
+}));
189
+
190
+function mockPlatform(
191
+ environmentId: string,
192
+ input: Omit<Parameters<typeof createBrowserVoiceInputPlatform>[0], "prepared">,
193
+) {
194
+ mocks.platforms.push(environmentId);
195
+ return {
196
+ recorder: {
197
+ uri: `blob:${environmentId}`,
198
+ prepareToRecordAsync: async () => {
199
+ mocks.microphoneRequests.push(environmentId);
200
},
193
- transcriber: {
194
- prepare: async () => {
195
- mocks.recordingOptions.push(input.getTranscriptionOptions());
196
- return {
197
- locale: "en",
198
- transcribe: async () => {
199
- mocks.transcribeCalls.push(
200
- input.cloudProvider
201
- ? `${[input.cloudProvider, (input as { cloudModel?: string }).cloudModel].filter(Boolean).join(":")} via ${environmentId}`
202
- : environmentId,
203
- );
204
- const next = mocks.transcripts.shift() ?? "dictated";
205
- if (next instanceof Error) throw next;
206
- return next;
207
- },
208
- };
209
- },
201
+ record() {},
202
+ stop: async () => {},
203
+ },
204
+ transcriber: {
205
+ prepare: async () => {
206
+ mocks.recordingOptions.push(input.getTranscriptionOptions());
207
+ return {
208
+ locale: "en",
209
+ transcribe: async () => {
210
+ mocks.transcribeCalls.push(
211
+ input.cloudProvider
212
+ ? `${[input.cloudProvider, (input as { cloudModel?: string }).cloudModel].filter(Boolean).join(":")} via ${environmentId}`
213
+ : environmentId,
214
+ );
215
+ const next = mocks.transcripts.shift() ?? "dictated";
216
+ if (next instanceof Error) throw next;
217
+ return next;
218
+ },
219
+ };
220
},
211
- cancelRecording() {},
212
- deleteRecording() {},
213
- };
214
- },
215
-}));
221
+ },
222
+ cancelRecording() {},
223
+ deleteRecording() {},
224
+ };
225
+}
226
227
const THREAD_ENV = "thread-env";
228
@@ -248,6 +258,7 @@ function setup(options: { readonly destination?: string | null } = {}) {
258
mocks.transcripts = [];
259
mocks.committed.mockClear();
260
mocks.draft = "";
261
+ mocks.appleSpeech = false;
262
mocks.storedDraft = "";
263
}
264
@@ -387,6 +398,29 @@ it.each([
398
expect(mocks.committed).not.toHaveBeenCalled();
399
});
400
401
+it.each([true, false])(
402
+ "transcribes on this Mac with Apple Speech, never an environment, when available is %s",
403
+ async (available) => {
404
+ setup();
405
+ mocks.appleSpeech = available;
406
+ chooseAudioDestination({ kind: "device" });
407
+ await using _screen = await render(<Probe />);
408
+ expect(mocks.voice.transcriptionEnvironmentId).toBeNull();
409
+ expect(mocks.voice.available).toBe(available);
410
+ await act(() => mocks.voice.start());
411
+ if (!available) {
412
+ expectNoAudioSent();
413
+ return;
414
+ }
415
+ await act(() => mocks.voice.stop());
416
+ expect(new Set([...mocks.platforms, ...mocks.transcribeCalls])).toEqual(
417
+ new Set(["apple-speech"]),
418
+ );
419
+ expect(mocks.statusRequests).toEqual([]);
420
+ expect(mocks.committed).toHaveBeenCalledExactlyOnceWith("dictated", expect.anything());
421
+ },
422
+);
423
+
424
it("retries a failed transcription on the same chosen environment", async () => {
425
setup({ destination: "env-a" });
426
mocks.transcripts = [new Error("inference failed"), "second try"];
@@ -401,10 +435,15 @@ it("retries a failed transcription on the same chosen environment", async () =>
435
});
436
437
it.each([
404
- ["a stored thread draft keeps recording into it", true],
405
- ["an editor-only draft is abandoned", false],
406
-])("when the editor switches owner mid-recording, %s", async (_name, persistent) => {
438
+ ["a stored thread draft keeps recording into it", true, false],
439
+ ["an editor-only draft is abandoned", false, false],
440
+ ["Apple Speech keeps recording into a stored thread draft", true, true],
441
+])("when the editor switches owner mid-recording, %s", async (_name, persistent, onDevice) => {
442
setup({ destination: "env-a" });
443
+ if (onDevice) {
444
+ mocks.appleSpeech = true;
445
+ chooseAudioDestination({ kind: "device" });
446
+ }
447
mocks.storedDraft = "Earlier text";
448
const view = (ownerKey: string) => (
449
<>
@@ -432,7 +471,7 @@ it.each([
471
await page.getByRole("button", { name: "Finish voice input" }).click();
472
473
await vi.waitFor(() => expect(mocks.storedDraft).toBe("Earlier text dictated"));
435
- expect(mocks.transcribeCalls).toEqual(["env-a"]);
474
+ expect(mocks.transcribeCalls).toEqual([onDevice ? "apple-speech" : "env-a"]);
475
expect(mocks.committed).not.toHaveBeenCalled();
476
});
477
apps/web/src/speech/useEnvironmentSpeechInput.ts
+33
-8
@@ -33,6 +33,7 @@ import {
33
} from "../hooks/useSettings";
34
import { useEnvironment } from "../state/environments";
35
import { useEnvironmentScope, usePreparedConnection } from "../state/session";
36
+import { useAppleSpeechLocales } from "./appleSpeech";
37
import { preferredSpeechLanguages } from "./preferredSpeechLanguages";
38
import { runEnvironmentSpeech } from "./runEnvironmentSpeech";
39
import { useAudioChoice } from "./voiceConsent";
@@ -45,6 +46,9 @@ import {
46
type VoiceInputTarget,
47
} from "./voiceInputSession";
48
49
+/** A product name, shown untranslated. */
50
+export const APPLE_SPEECH_LABEL = "Apple Speech";
51
+
52
const INITIAL_SETUP = {
53
open: false,
54
step: 0,
@@ -114,13 +118,19 @@ type HookInput = {
118
* Microphone audio leaves this device only for the environment the person chose in
119
* Voice settings. Nothing is inferred from the primary or the draft's environment, and
120
* the recording is abandoned the moment that choice changes or its connection drops.
121
+ * Apple Speech ("device") keeps audio on this Mac and needs no environment.
122
*/
123
export function useVoiceTranscriptionDestination() {
124
const gt = useGT();
125
const hydrated = useClientSettingsHydrated();
126
const choice = useAudioChoice();
127
const grant = choice === "off" ? null : choice;
123
- const environmentId = hydrated && grant ? grant.destination.environmentId : null;
128
+ const appleSpeechAvailable = useAppleSpeechLocales().length > 0;
129
+ const device = hydrated && grant?.destination.kind === "device";
130
+ const environmentId =
131
+ hydrated && grant && grant.destination.kind !== "device"
132
+ ? grant.destination.environmentId
133
+ : null;
134
const environment = useEnvironment(environmentId);
135
const connection = Option.getOrNull(usePreparedConnection(environmentId));
136
const canDictate = useEnvironmentScope(environmentId, AuthOrchestrationOperateScope);
@@ -134,11 +144,13 @@ export function useVoiceTranscriptionDestination() {
144
return {
145
...(hydrated && choice === null ? { offerFirstRunSetup: true } : {}),
146
environmentId,
147
+ ...(device ? { device: true, onDevice: appleSpeechAvailable } : {}),
148
...(provider ? { cloudProvider: provider } : {}),
149
...(model ? { cloudModel: model } : {}),
150
grantId: grant?.id ?? null,
140
- label:
141
- provider && environment
151
+ label: device
152
+ ? APPLE_SPEECH_LABEL
153
+ : provider && environment
154
? gt("{provider} via {environment}", {
155
provider: CLOUD_SPEECH_LABELS[provider],
156
environment: environment.label,
@@ -152,6 +164,7 @@ export function useEnvironmentSpeechInput(input: HookInput) {
164
const navigate = useNavigate();
165
const destination = useVoiceTranscriptionDestination();
166
const prepared = destination.prepared;
167
+ const onDevice = destination.onDevice === true;
168
const grantId = destination.grantId;
169
const cloudProvider = destination.cloudProvider;
170
const cloudModel = destination.cloudModel;
@@ -189,7 +202,13 @@ export function useEnvironmentSpeechInput(input: HookInput) {
202
setSetup(INITIAL_SETUP);
203
}
204
192
- const session = useRetainedVoiceInputSession({ prepared, grantId, cloudProvider, cloudModel });
205
+ const session = useRetainedVoiceInputSession({
206
+ prepared,
207
+ grantId,
208
+ onDevice,
209
+ cloudProvider,
210
+ cloudModel,
211
+ });
212
const snapshot = useVoiceInputSessionSnapshot(session);
213
const owns = snapshot.target?.ownerKey === input.ownerKey;
214
const activity = useVoiceInputSessionActivity(session, input.ownerKey);
@@ -395,9 +414,14 @@ export function useEnvironmentSpeechInput(input: HookInput) {
414
await navigate({ to: "/settings/voice", hash: "voice-transcription-destination" });
415
return;
416
}
398
- if (!session || !prepared || voiceInputBlocksSubmission(session.state)) return;
417
+ if (!session || voiceInputBlocksSubmission(session.state)) return;
418
const request = ++startRequestRef.current;
419
const owner = latestRef.current.input.ownerKey;
420
+ if (onDevice) {
421
+ await session.start(createTarget());
422
+ return;
423
+ }
424
+ if (!prepared) return;
425
if (cloudProvider) {
426
await session.start(createTarget());
427
return;
@@ -515,9 +539,10 @@ export function useEnvironmentSpeechInput(input: HookInput) {
539
const destinationReady =
540
grantId === null
541
? Boolean(destination.offerFirstRunSetup) && input.offerSetup !== false
518
- : prepared !== null &&
519
- (cloudProvider !== undefined ||
520
- (status?.prepared === prepared && status.value?.supported !== false));
542
+ : onDevice ||
543
+ (prepared !== null &&
544
+ (cloudProvider !== undefined ||
545
+ (status?.prepared === prepared && status.value?.supported !== false)));
546
return {
547
available:
548
destinationReady &&
apps/web/src/speech/voiceConsent.ts
+8
-2
@@ -13,7 +13,13 @@ import {
13
// Separate keys: a stale window saving ordinary preferences must not restore either grant.
14
const AUDIO_KEY = "t3code:voice-audio-grant:v1";
15
const CLEANUP_KEY = "t3code:voice-cleanup-grant:v1";
16
-const Grant = Schema.Struct({ id: Schema.String, destination: VoiceTranscriptionDestination });
16
+// "device" is Apple Speech in the macOS desktop app. Audio stays on this device, so it stays out of the shared contract.
17
+const AudioDestination = Schema.Union([
18
+ VoiceTranscriptionDestination,
19
+ Schema.Struct({ kind: Schema.Literal("device") }),
20
+]);
21
+export type AudioDestination = typeof AudioDestination.Type;
22
+const Grant = Schema.Struct({ id: Schema.String, destination: AudioDestination });
23
const AudioGrant = Schema.NullOr(Grant);
24
const sameGrant = Schema.toEquivalence(AudioGrant);
25
const SavedChoice = Schema.Union([AudioGrant, Schema.Literal("off")]);
@@ -62,7 +68,7 @@ function replaceChoice(choice: AudioChoice, previous = readChoice()) {
68
window.localStorage.removeItem(savedKey(old.id));
69
}
70
65
-export function chooseAudioDestination(destination: VoiceTranscriptionDestination | null) {
71
+export function chooseAudioDestination(destination: AudioDestination | null) {
72
replaceChoice(destination ? { id: randomUUID(), destination } : "off");
73
}
74
apps/web/src/speech/voiceInputSession.ts
+29
-16
@@ -4,6 +4,7 @@ import {
4
voiceInputBlocksSubmission,
5
type VoiceDraftSnapshot,
6
type VoiceInputControllerDependencies,
7
+ type VoiceInputErrorCode,
8
type VoiceInputState,
9
} from "@t3tools/client-runtime/voice-input";
10
import type { PreparedConnection } from "@t3tools/client-runtime/connection";
@@ -24,7 +25,10 @@ import { useEffect, useSyncExternalStore } from "react";
25
26
import { toastManager } from "../components/ui/toast";
27
import { chooseRecordingMicrophone } from "./browserMicrophones";
27
-import { createBrowserVoiceInputPlatform } from "./browserVoiceInput";
28
+import {
29
+ createAppleSpeechVoiceInputPlatform,
30
+ createBrowserVoiceInputPlatform,
31
+} from "./browserVoiceInput";
32
import { runEnvironmentSpeech } from "./runEnvironmentSpeech";
33
import { bindAudioGrant, readCleanupGrant } from "./voiceConsent";
34
import { msg } from "gt-react";
@@ -72,7 +76,8 @@ export type VoiceInputSessionActivity = {
76
};
77
78
type SessionKey = {
75
- readonly prepared: PreparedConnection;
79
+ /** Null is Apple Speech, which transcribes on this Mac without an environment. */
80
+ readonly prepared: PreparedConnection | null;
81
readonly grantId: string;
82
readonly cloudProvider: CloudSpeechProvider | undefined;
83
readonly cloudModel: CloudSpeechModelId | undefined;
@@ -121,10 +126,7 @@ export class VoiceInputSession {
126
readonly cleanupPrepared: PreparedConnection | null;
127
}
128
| undefined;
124
- const platform = createBrowserVoiceInputPlatform({
125
- prepared: key.prepared,
126
- cloudProvider: key.cloudProvider,
127
- cloudModel: key.cloudModel,
129
+ const platformInput = {
130
hasAudioConsent,
131
getStatusListener: () => this.onSpeechStatus,
132
getStreamingEnabled: () =>
@@ -164,15 +166,23 @@ export class VoiceInputSession {
166
};
167
},
168
getMicrophoneId: chooseRecordingMicrophone,
167
- onLevel: (level) => this.publishActivity({ ...this.activity, level }),
169
+ onLevel: (level: number) => this.publishActivity({ ...this.activity, level }),
170
onDurationLimit: () => void this.controller.stop(),
169
- onText: (preview) => {
170
- if (!this.disposed) this.publishActivity({ ...this.activity, preview });
171
- },
172
- onError: (message, code) => {
171
+ onError: (message: string, code?: VoiceInputErrorCode) => {
172
if (!this.disposed) void this.controller.interruptRecording(message, null, code);
173
},
175
- });
174
+ };
175
+ const platform = key.prepared
176
+ ? createBrowserVoiceInputPlatform({
177
+ ...platformInput,
178
+ prepared: key.prepared,
179
+ cloudProvider: key.cloudProvider,
180
+ cloudModel: key.cloudModel,
181
+ onText: (preview) => {
182
+ if (!this.disposed) this.publishActivity({ ...this.activity, preview });
183
+ },
184
+ })
185
+ : createAppleSpeechVoiceInputPlatform(platformInput);
186
const postProcess: NonNullable<VoiceInputControllerDependencies["postProcess"]> = (
187
transcript,
188
options,
@@ -363,17 +373,20 @@ function subscribeRegistry(listener: () => void): () => void {
373
export function useRetainedVoiceInputSession(input: {
374
readonly prepared: PreparedConnection | null;
375
readonly grantId: string | null;
376
+ readonly onDevice?: boolean | undefined;
377
readonly cloudProvider?: CloudSpeechProvider | undefined;
378
readonly cloudModel?: CloudSpeechModelId | undefined;
379
}): VoiceInputSession | null {
369
- const { prepared, grantId, cloudProvider, cloudModel } = input;
380
+ const { grantId, cloudProvider, cloudModel } = input;
381
+ const prepared = input.onDevice ? null : input.prepared;
382
+ const ready = (input.onDevice === true || prepared !== null) && grantId !== null;
383
// oxlint-disable-next-line t3code/no-unreasoned-state-sync -- retains the shared recording session for this destination while mounted
384
useEffect(() => {
372
- if (!prepared || !grantId || typeof navigator === "undefined") return;
385
+ if (!ready || !grantId || typeof navigator === "undefined") return;
386
return retainVoiceInputSession({ prepared, grantId, cloudProvider, cloudModel });
374
- }, [prepared, grantId, cloudProvider, cloudModel]);
387
+ }, [ready, prepared, grantId, cloudProvider, cloudModel]);
388
return useSyncExternalStore(subscribeRegistry, () =>
376
- prepared && grantId ? findSession({ prepared, grantId, cloudProvider, cloudModel }) : null,
389
+ ready && grantId ? findSession({ prepared, grantId, cloudProvider, cloudModel }) : null,
390
);
391
}
392
docs/internals/voice-input.md
+6
@@ -22,6 +22,12 @@ transcription share a recorder and upload only finished recordings. The client
22
keeps the grant in device-bound secure storage, outside preference backups, and
23
rechecks it after native decoding and before upload.
24
25
+The macOS desktop app adds a `device` destination, Apple Speech. It exists only in
26
+the web grant schema, not in `VoiceTranscriptionDestination`, because no environment
27
+or other client can act on it. The desktop main process runs a
28
+[Swift helper](../../native/apple-speech/AppleSpeech.swift) that the macOS release
29
+runners compile; the Speech framework exists only in the macOS SDK.
30
+
31
The [web grant](../../apps/web/src/speech/voiceConsent.ts) lives outside the preferences snapshot so another
32
window saving unrelated settings cannot resurrect a revoked grant. Each new choice
33
gets a distinct grant, even if the destination was previously selected. The
docs/user/composer.md
+3
-2
@@ -205,8 +205,9 @@ and use **Attach again** or remove the missing file before sending.
205
## Voice input on web and desktop
206
207
Use the composer's microphone or `mod+shift+d` to dictate into your draft. Audio
208
-is transcribed on an environment you choose in **Settings → Voice**; nothing is
209
-sent until you choose one. See [Voice input](./voice-input.md).
208
+is transcribed on an environment you choose in **Settings → Voice**, or on the Mac
209
+with Apple Speech in the macOS desktop app; nothing is sent until you choose one.
210
+See [Voice input](./voice-input.md).
211
212
## Voice input on mobile
213
docs/user/faq.md
+1
-1
@@ -77,7 +77,7 @@ Open **Settings → Worktrees → Cleanup** and turn on automatic worktree clean
77
78
## Is there voice input?
79
80
-Yes. On iPhone and Android, dictation uses on-device speech by default; you can opt in to a paired environment instead. Web and desktop require you to choose an environment first. The transcript goes into your draft for review. See [Voice input](./voice-input.md).
80
+Yes. On iPhone and Android, dictation uses on-device speech by default, with the option to use a paired environment. On macOS 26 or later, desktop users can choose Apple Speech directly under **On this Mac** or choose an environment. Web and other desktop users can enable dictation by choosing an environment. The transcript goes into your draft for review. See [Voice input](./voice-input.md).
81
82
## Does it work on Windows, Mac, and Linux?
83
docs/user/voice-input.md
+7
@@ -24,6 +24,13 @@ Set it back to **Off** at any time; a recording in progress is discarded.
24
If the chosen environment goes offline, voice input waits for it. T3 Code never
25
substitutes another environment.
26
27
+In the desktop app on macOS 26 or later, you can instead choose **Apple Speech**
28
+under **On this Mac**. Audio stays on the Mac and macOS transcribes it. The first
29
+recording in a language can take longer while macOS downloads its speech model.
30
+**Language** set to automatic uses your Mac's language. Silence filtering and
31
+filler-word removal are not available; the dictionary applies only when transcript
32
+cleanup is on.
33
+
34
For cloud dictation, choose **OpenAI** or **Grok Voice Transcribe** via the environment
35
you want to use. If it needs a key, enter one and choose **Save and enable**.
36
You can also choose a [secret provider](secrets.md) instead of **Value** and enter a
native/apple-speech/AppleSpeech.swift
new
+49
@@ -0,0 +1,49 @@
1
+// t3-apple-speech available -> {"value":"en-US,fr-FR,..."}
2
+// t3-apple-speech prepare <locale> -> {"value":"en-US"} (resolved locale)
3
+// t3-apple-speech transcribe <locale> <wav-path> -> {"value":"..."} (transcript)
4
+// Exit codes are consumed by AppleSpeech.ts; failures print one message line to stderr.
5
+
6
+import Foundation
7
+
8
+private enum ExitCode: Int32 {
9
+ case failure = 1
10
+ case unsupportedLocale = 2
11
+ case unavailable = 3
12
+ case usage = 64
13
+}
14
+
15
+@main
16
+struct AppleSpeech {
17
+ static func main() async {
18
+ let arguments = Array(CommandLine.arguments.dropFirst())
19
+ do {
20
+ switch (arguments.first, arguments.count) {
21
+ case ("available", 1):
22
+ try write(try await AppleSpeechEngine.supportedLocales().joined(separator: ","))
23
+ case ("prepare", 2):
24
+ try write(try await AppleSpeechEngine.prepare(arguments[1]))
25
+ case ("transcribe", 3):
26
+ try write(try await AppleSpeechEngine.transcribe(arguments[1], file: URL(fileURLWithPath: arguments[2])))
27
+ default:
28
+ fail(.usage, "Unknown command.")
29
+ }
30
+ } catch let failure as AppleSpeechEngine.Failure {
31
+ switch failure {
32
+ case .unsupportedLocale: fail(.unsupportedLocale, failure.localizedDescription)
33
+ case .unavailable: fail(.unavailable, failure.localizedDescription)
34
+ case .unknownAssetStatus: fail(.failure, failure.localizedDescription)
35
+ }
36
+ } catch {
37
+ fail(.failure, error.localizedDescription)
38
+ }
39
+ }
40
+
41
+ private static func write(_ value: String) throws {
42
+ FileHandle.standardOutput.write(try JSONSerialization.data(withJSONObject: ["value": value]))
43
+ }
44
+
45
+ private static func fail(_ code: ExitCode, _ message: String) -> Never {
46
+ FileHandle.standardError.write(Data((message + "\n").utf8))
47
+ exit(code.rawValue)
48
+ }
49
+}
native/apple-speech/AppleSpeechEngine.swift
new
+98
@@ -0,0 +1,98 @@
1
+// Adapted from AppleTranscriptionImpl.swift in @react-native-ai/apple (MIT, Callstack).
2
+import AVFoundation
3
+import Foundation
4
+import Speech
5
+
6
+@available(iOS 26, macOS 26, *)
7
+enum AppleSpeechEngine {
8
+ enum Failure: LocalizedError {
9
+ case unavailable
10
+ case unsupportedLocale(String)
11
+ case unknownAssetStatus
12
+
13
+ var errorDescription: String? {
14
+ switch self {
15
+ case .unavailable: return "Speech transcription is not available."
16
+ case .unsupportedLocale(let locale): return "Locale not supported: \(locale)"
17
+ case .unknownAssetStatus: return "Unknown asset inventory status."
18
+ }
19
+ }
20
+ }
21
+
22
+ static var isAvailable: Bool { SpeechTranscriber.isAvailable }
23
+
24
+ static func supportedLocales() async throws -> [String] {
25
+ try requireAvailable()
26
+ return await SpeechTranscriber.supportedLocales.map { $0.identifier(.bcp47) }
27
+ }
28
+
29
+ private static func requireAvailable() throws {
30
+ guard isAvailable else {
31
+ throw Failure.unavailable
32
+ }
33
+ }
34
+
35
+ private static func makeTranscriber(for locale: Locale) -> SpeechTranscriber {
36
+ let preset = SpeechTranscriber.Preset.timeIndexedTranscriptionWithAlternatives
37
+ return SpeechTranscriber(
38
+ locale: locale,
39
+ transcriptionOptions: preset.transcriptionOptions,
40
+ reportingOptions: preset.reportingOptions.subtracting([.alternativeTranscriptions]),
41
+ attributeOptions: preset.attributeOptions
42
+ )
43
+ }
44
+
45
+ static func prepare(_ identifier: String) async throws -> String {
46
+ try requireAvailable()
47
+ guard
48
+ let locale = await SpeechTranscriber.supportedLocale(
49
+ equivalentTo: Locale(identifier: identifier))
50
+ else {
51
+ throw Failure.unsupportedLocale(identifier)
52
+ }
53
+ let transcriber = makeTranscriber(for: locale)
54
+ switch await AssetInventory.status(forModules: [transcriber]) {
55
+ case .installed:
56
+ break
57
+ case .supported, .downloading:
58
+ if let request = try await AssetInventory.assetInstallationRequest(supporting: [transcriber]) {
59
+ try await request.downloadAndInstall()
60
+ }
61
+ case .unsupported:
62
+ throw Failure.unsupportedLocale(identifier)
63
+ @unknown default:
64
+ throw Failure.unknownAssetStatus
65
+ }
66
+ return locale.identifier(.bcp47)
67
+ }
68
+
69
+ static func transcribe(_ identifier: String, file: URL) async throws -> String {
70
+ try requireAvailable()
71
+ guard file.isFileURL else { throw CocoaError(.fileReadUnsupportedScheme) }
72
+ let audioFile = try AVAudioFile(forReading: file)
73
+ let transcriber = makeTranscriber(for: Locale(identifier: identifier))
74
+ let analyzer = SpeechAnalyzer(modules: [transcriber])
75
+ let collector = Task { () throws -> [String] in
76
+ var texts: [String] = []
77
+ for try await result in transcriber.results where result.isFinal {
78
+ let text = String(result.text.characters).trimmingCharacters(in: .whitespacesAndNewlines)
79
+ if !text.isEmpty { texts.append(text) }
80
+ }
81
+ return texts
82
+ }
83
+ do {
84
+ if let lastSampleTime = try await analyzer.analyzeSequence(from: audioFile) {
85
+ try await analyzer.finalizeAndFinish(through: lastSampleTime)
86
+ } else {
87
+ await analyzer.cancelAndFinishNow()
88
+ }
89
+ return try await collector.value.joined(separator: " ")
90
+ } catch {
91
+ collector.cancel()
92
+ await analyzer.cancelAndFinishNow()
93
+ _ = try? await collector.value
94
+ throw error
95
+ }
96
+ }
97
+
98
+}
packages/contracts/src/ipc.ts
+22
@@ -1085,6 +1085,22 @@ export const DesktopMediaReadSchema = Schema.Struct({
1085
});
1086
export type DesktopMediaRead = typeof DesktopMediaReadSchema.Type;
1087
1088
+/** `value` is the resolved locale from `prepare` and the transcript from `transcribe`. */
1089
+export const DesktopAppleSpeechResultSchema = Schema.Union([
1090
+ Schema.Struct({ ok: Schema.Literal(true), value: Schema.String }),
1091
+ Schema.Struct({
1092
+ ok: Schema.Literal(false),
1093
+ code: Schema.Literals(["unavailable", "unsupported-locale", "failed"]),
1094
+ }),
1095
+]);
1096
+export type DesktopAppleSpeechResult = typeof DesktopAppleSpeechResultSchema.Type;
1097
+
1098
+export const DesktopAppleSpeechTranscribeInputSchema = Schema.Struct({
1099
+ locale: Schema.String.check(Schema.isMaxLength(64)),
1100
+ // 16 kHz mono Float32 PCM, at most five minutes.
1101
+ pcm: Schema.Uint8Array,
1102
+});
1103
+
1104
export const SystemSettingsPaneSchema = Schema.Literals(["full-disk-access"]);
1105
export type SystemSettingsPane = typeof SystemSettingsPaneSchema.Type;
1106
@@ -1225,6 +1241,12 @@ export interface DesktopBridge {
1241
onRequest: (listener: (request: DesktopAppActivationRequest) => void) => () => void;
1242
};
1243
preview: DesktopPreviewBridge;
1244
+ /** On-device dictation through macOS 26 SpeechAnalyzer; absent in older desktop builds. */
1245
+ appleSpeech?: {
1246
+ supportedLocales: () => Promise<readonly string[]>;
1247
+ prepare: (locale: string) => Promise<DesktopAppleSpeechResult>;
1248
+ transcribe: (input: { locale: string; pcm: Uint8Array }) => Promise<DesktopAppleSpeechResult>;
1249
+ };
1250
}
1251
1252
/** Renderer callback invoked by Electron with a fresh user gesture before display-media capture. */
patches/@react-native-ai__apple@0.12.0.patch
deleted
-194
@@ -1,194 +0,0 @@
1
-diff --git a/ios/transcription/AppleTranscriptionImpl.swift b/ios/transcription/AppleTranscriptionImpl.swift
2
-index 188371a5f55fadae19187108c4a688569d0223e3..3e1cdd77b0bb8ae6c97a40d29c1854200d931eee 100644
3
---- a/ios/transcription/AppleTranscriptionImpl.swift
4
-+++ b/ios/transcription/AppleTranscriptionImpl.swift
5
-@@ -12,6 +12,11 @@ import UniformTypeIdentifiers
6
-
7
- @objc
8
- public class AppleTranscriptionImpl: NSObject {
9
-+ private struct CollectedSegment: Sendable {
10
-+ let text: String
11
-+ let startSecond: Double
12
-+ let endSecond: Double
13
-+ }
14
-
15
- @available(iOS 26, *)
16
- private func createTranscriber(for locale: Locale) -> SpeechTranscriber {
17
-@@ -41,7 +46,7 @@ public class AppleTranscriptionImpl: NSObject {
18
- let locale = Locale(identifier: language)
19
-
20
- guard let supportedLocale = await SpeechTranscriber.supportedLocale(equivalentTo: locale) else {
21
-- reject("AppleTranscription", "Locale not supported: \(language)", nil)
22
-+ reject("AppleTranscriptionUnsupportedLocale", "Locale not supported: \(language)", nil)
23
- return
24
- }
25
-
26
-@@ -51,16 +56,14 @@ public class AppleTranscriptionImpl: NSObject {
27
-
28
- switch status {
29
- case .installed:
30
-- resolve(nil)
31
-+ resolve(supportedLocale.identifier)
32
- case .supported, .downloading:
33
-- if let request = try? await AssetInventory.assetInstallationRequest(supporting: [transcriber]) {
34
-+ if let request = try await AssetInventory.assetInstallationRequest(supporting: [transcriber]) {
35
- try await request.downloadAndInstall()
36
-- resolve(nil)
37
-- } else {
38
-- resolve(nil)
39
- }
40
-+ resolve(supportedLocale.identifier)
41
- case .unsupported:
42
-- reject("AppleTranscription", "Assets not supported for locale: \(supportedLocale.identifier)", nil)
43
-+ reject("AppleTranscriptionUnsupportedLocale", "Assets not supported for locale: \(supportedLocale.identifier)", nil)
44
- @unknown default:
45
- reject ("AppleTranscription", "Unknown asset inventory status", nil)
46
- }
47
-@@ -83,57 +86,77 @@ public class AppleTranscriptionImpl: NSObject {
48
- do {
49
- try audioData.write(to: fileURL)
50
-
51
-- guard let audioFile = try? AVAudioFile(forReading: fileURL) else {
52
-- reject("AppleTranscription", "Invalid audio data", nil)
53
-+ let audioFile: AVAudioFile
54
-+ do {
55
-+ audioFile = try AVAudioFile(forReading: fileURL)
56
-+ } catch {
57
-+ try? FileManager.default.removeItem(at: fileURL)
58
-+ reject("AppleTranscription", "Invalid audio data", error)
59
- return
60
- }
61
-
62
- Task {
63
-+ defer {
64
-+ try? FileManager.default.removeItem(at: fileURL)
65
-+ }
66
-+
67
- do {
68
- let transcriber = createTranscriber(for: Locale(identifier: language))
69
-
70
- let analyzer = SpeechAnalyzer(modules: [transcriber])
71
--
72
-- defer {
73
-- try? FileManager.default.removeItem(at: fileURL)
74
-- }
75
--
76
-- var segments: [[String: Any]] = []
77
--
78
-- Task {
79
-+
80
-+ let collectorTask = Task { () throws -> [CollectedSegment] in
81
-+ var segments: [CollectedSegment] = []
82
-+
83
- for try await result in transcriber.results {
84
- if result.isFinal {
85
-- let segment: [String: Any] = [
86
-- "text": String(result.text.characters),
87
-- "startSecond": CMTimeGetSeconds(result.range.start),
88
-- "endSecond": CMTimeGetSeconds(CMTimeRangeGetEnd(result.range))
89
-- ]
90
-- segments.append(segment)
91
-+ segments.append(
92
-+ CollectedSegment(
93
-+ text: String(result.text.characters),
94
-+ startSecond: CMTimeGetSeconds(result.range.start),
95
-+ endSecond: CMTimeGetSeconds(CMTimeRangeGetEnd(result.range))
96
-+ )
97
-+ )
98
- }
99
- }
100
-+
101
-+ return segments
102
- }
103
--
104
-- let lastSampleTime = try await analyzer.analyzeSequence(from: audioFile)
105
--
106
-- if let lastSampleTime {
107
-- try await analyzer.finalizeAndFinish(through: lastSampleTime)
108
-- } else {
109
-+
110
-+ do {
111
-+ let lastSampleTime = try await analyzer.analyzeSequence(from: audioFile)
112
-+
113
-+ if let lastSampleTime {
114
-+ try await analyzer.finalizeAndFinish(through: lastSampleTime)
115
-+ } else {
116
-+ await analyzer.cancelAndFinishNow()
117
-+ }
118
-+
119
-+ let segments: [[String: Any]] = try await collectorTask.value.map { segment in
120
-+ [
121
-+ "text": segment.text,
122
-+ "startSecond": segment.startSecond,
123
-+ "endSecond": segment.endSecond
124
-+ ]
125
-+ }
126
-+ let totalDuration = if let lastSampleTime { CMTimeGetSeconds(lastSampleTime) } else { 0.0 }
127
-+
128
-+ resolve([
129
-+ "segments": segments,
130
-+ "duration": totalDuration
131
-+ ])
132
-+ } catch {
133
-+ collectorTask.cancel()
134
- await analyzer.cancelAndFinishNow()
135
-+ _ = try? await collectorTask.value
136
-+ throw error
137
- }
138
--
139
-- let totalDuration = if let lastSampleTime { CMTimeGetSeconds(lastSampleTime) } else { 0.0 }
140
--
141
-- let result: [String: Any] = [
142
-- "segments": segments,
143
-- "duration": totalDuration
144
-- ]
145
--
146
-- resolve(result)
147
- } catch {
148
- reject("AppleTranscription", "Transcription failed: \(error.localizedDescription)", error)
149
- }
150
- }
151
- } catch {
152
-+ try? FileManager.default.removeItem(at: fileURL)
153
- reject("AppleTranscription", "Failed to write audio data: \(error.localizedDescription)", error)
154
- }
155
- } else {
156
-@@ -141,4 +164,3 @@ public class AppleTranscriptionImpl: NSObject {
157
- }
158
- }
159
- }
160
--
161
-diff --git a/lib/typescript/NativeAppleTranscription.d.ts b/lib/typescript/NativeAppleTranscription.d.ts
162
-index 985b6b3593a884c41d689346be9d73d86c55eae1..86e7936f23a8673d099f7fe18af9a31abae5a13a 100644
163
---- a/lib/typescript/NativeAppleTranscription.d.ts
164
-+++ b/lib/typescript/NativeAppleTranscription.d.ts
165
-@@ -10,14 +10,14 @@ export interface TranscriptionResult {
166
- }
167
- export interface Spec extends TurboModule {
168
- isAvailable(language: string): boolean;
169
-- prepare(language: string): Promise<void>;
170
-+ prepare(language: string): Promise<string>;
171
- }
172
- declare global {
173
- function __apple__llm__transcribe__(data: ArrayBufferLike, language: string): Promise<TranscriptionResult>;
174
- }
175
- declare const _default: {
176
- transcribe: (data: ArrayBufferLike, language: string) => Promise<TranscriptionResult>;
177
-- prepare: (language: string) => Promise<void>;
178
-+ prepare: (language: string) => Promise<string>;
179
- isAvailable: (language: string) => boolean;
180
- };
181
- export default _default;
182
-diff --git a/src/NativeAppleTranscription.ts b/src/NativeAppleTranscription.ts
183
-index 13332a0176000b60b6f6f043de681db55a7b4bef..5389fb4b3a53de48721c307d2145b6770624c852 100644
184
---- a/src/NativeAppleTranscription.ts
185
-+++ b/src/NativeAppleTranscription.ts
186
-@@ -14,7 +14,7 @@ export interface TranscriptionResult {
187
-
188
- export interface Spec extends TurboModule {
189
- isAvailable(language: string): boolean
190
-- prepare(language: string): Promise<void>
191
-+ prepare(language: string): Promise<string>
192
- }
193
-
194
- declare global {
pnpm-lock.yaml
-39
@@ -286,7 +286,6 @@ overrides:
286
'@ff-labs/fff-node': 0.11.0
287
'@legendapp/list': 3.7.3
288
'@pierre/diffs': 1.7.0-beta.4
289
- '@react-native-ai/apple': 0.12.0
289
'@react-native-menu/menu': 2.0.0
290
'@react-navigation/native-stack': 7.21.0
291
dbus-next: 0.10.2
@@ -372,7 +371,6 @@ patchedDependencies:
371
'@ff-labs/fff-node@0.11.0': 93f62a76399b435a76588b2bef237db0a1e85880c1ac0d0759c416e9cc579252
372
'@muse-code/sdk@1.4.6': 7b495b607fc5d76b444c7c4d58821e839726a30e6f3c53564f0d59f2d5b42101
373
'@pierre/diffs@1.7.0-beta.4': 7edcdd484a99c7ec0b2667499c4cb21d113ec9bea1f8570c0b0a030d33bbf1cd
375
- '@react-native-ai/apple@0.12.0': 2d09870c2848d185cb05b53ed823a46e12dba519324d8dd8e584e28731990f9d
374
'@react-native-menu/menu@2.0.0': 6872ba71b9847c5a0210b1b896923dadc3860faedfe28d9f062bcedfe786ef1d
375
'@react-navigation/native-stack@7.21.0': 990d575444c4af2ce8218b3b7a8280fe244c03abbdb32b822a2e862f791dbf42
376
alchemy@2.0.0-beta.85: 07cc8c7e14b3b9af143ddd40a059f117c27e55139fbf20bd5dde2eb30509cedd
@@ -585,9 +583,6 @@ importers:
583
'@pierre/highlights':
584
specifier: 'catalog:'
585
version: 0.5.0
588
- '@react-native-ai/apple':
589
- specifier: 0.12.0
590
- version: 0.12.0(patch_hash=2d09870c2848d185cb05b53ed823a46e12dba519324d8dd8e584e28731990f9d)(react-native@0.88.1(@babel/core@7.29.7(supports-color@8.1.1))(@react-native/metro-config@0.88.1(@babel/core@7.29.7(supports-color@8.1.1))(bufferutil@4.1.0)(supports-color@8.1.1)(utf-8-validate@6.0.6))(@types/react@19.3.0)(bufferutil@4.1.0)(react@19.3.0)(supports-color@8.1.1)(utf-8-validate@6.0.6))
586
'@react-native-menu/menu':
587
specifier: 2.0.0
588
version: 2.0.0(patch_hash=6872ba71b9847c5a0210b1b896923dadc3860faedfe28d9f062bcedfe786ef1d)(react-native@0.88.1(@babel/core@7.29.7(supports-color@8.1.1))(@react-native/metro-config@0.88.1(@babel/core@7.29.7(supports-color@8.1.1))(bufferutil@4.1.0)(supports-color@8.1.1)(utf-8-validate@6.0.6))(@types/react@19.3.0)(bufferutil@4.1.0)(react@19.3.0)(supports-color@8.1.1)(utf-8-validate@6.0.6))(react@19.3.0)
@@ -2660,16 +2655,6 @@ packages:
2655
typescript:
2656
optional: true
2657
2663
- '@ai-sdk/provider-utils@4.0.57':
2664
- resolution: {integrity: sha512-89a7sPvZqXsP3PigcAQLWntu/duIVEcN/RyChAB+j6p3C7NwW767sVttvL8r0+BetTg63uAXQoYHCZZueQKBSw==}
2665
- engines: {node: '>=18.17'}
2666
- peerDependencies:
2667
- zod: ^3.25.76 || ^4.1.8
2668
-
2669
- '@ai-sdk/provider@3.0.18':
2670
- resolution: {integrity: sha512-IpefF5ssZVOZCD4Wu7zxt6PwZoGT2HLVjxpJ10Bjx6EAmRfLYJPjyrfxb0RYDlwvXnDb9nkQ7Do/oJVDuRFzew==}
2671
- engines: {node: '>=18'}
2672
-
2658
'@ai-sdk/provider@4.0.36':
2659
resolution: {integrity: sha512-GqvWZSZdBelCGughlBdOoupT258rgM3YMbaLAS9WSZJ0vlt8c9vm3My+ZT31mYhiReMCMCF2qF2axnGbILpk1A==}
2660
engines: {node: '>=22'}
@@ -6488,11 +6473,6 @@ packages:
6473
resolution: {integrity: sha512-gMDYY2rw6OWajCcDlXSIgs2LC432YJXSb3Lm5yM187uhRgBYddoEVULi36h+IolX3r7jSb3ew7vn9FfI8NSo0A==}
6474
hasBin: true
6475
6491
- '@react-native-ai/apple@0.12.0':
6492
- resolution: {integrity: sha512-BC/kEDbCZprv1xcQCWsgapXm/WEsj5lieBDvU1vJXStrN+BG+hWM01zoqDGTD/j71zvt9DEfHcMvEqbrGY2uAA==}
6493
- peerDependencies:
6494
- react-native: '>=0.76.0'
6495
-
6476
'@react-native-masked-view/masked-view@0.3.2':
6477
resolution: {integrity: sha512-XwuQoW7/GEgWRMovOQtX3A4PrXhyaZm0lVUiY8qJDvdngjLms9Cpdck6SmGAUNqQwcj2EadHC1HwL0bEyoa/SQ==}
6478
peerDependencies:
@@ -13147,18 +13127,6 @@ snapshots:
13127
optionalDependencies:
13128
typescript: 6.0.3
13129
13150
- '@ai-sdk/provider-utils@4.0.57(zod@4.6.7)':
13151
- dependencies:
13152
- '@ai-sdk/provider': 3.0.18
13153
- '@standard-schema/spec': 1.1.0
13154
- eventsource-parser: 3.1.0
13155
- undici: 6.29.1
13156
- zod: 4.6.7
13157
-
13158
- '@ai-sdk/provider@3.0.18':
13159
- dependencies:
13160
- json-schema: 0.4.0
13161
-
13130
'@ai-sdk/provider@4.0.36':
13131
dependencies:
13132
json-schema: 0.4.0
@@ -16563,13 +16531,6 @@ snapshots:
16531
prompts: 2.4.2
16532
tinyexec: 1.3.1
16533
16566
- '@react-native-ai/apple@0.12.0(patch_hash=2d09870c2848d185cb05b53ed823a46e12dba519324d8dd8e584e28731990f9d)(react-native@0.88.1(@babel/core@7.29.7(supports-color@8.1.1))(@react-native/metro-config@0.88.1(@babel/core@7.29.7(supports-color@8.1.1))(bufferutil@4.1.0)(supports-color@8.1.1)(utf-8-validate@6.0.6))(@types/react@19.3.0)(bufferutil@4.1.0)(react@19.3.0)(supports-color@8.1.1)(utf-8-validate@6.0.6))':
16567
- dependencies:
16568
- '@ai-sdk/provider': 3.0.18
16569
- '@ai-sdk/provider-utils': 4.0.57(zod@4.6.7)
16570
- react-native: 0.88.1(@babel/core@7.29.7(supports-color@8.1.1))(@react-native/metro-config@0.88.1(@babel/core@7.29.7(supports-color@8.1.1))(bufferutil@4.1.0)(supports-color@8.1.1)(utf-8-validate@6.0.6))(@types/react@19.3.0)(bufferutil@4.1.0)(react@19.3.0)(supports-color@8.1.1)(utf-8-validate@6.0.6)
16571
- zod: 4.6.7
16572
-
16534
'@react-native-masked-view/masked-view@0.3.2(react-native@0.88.1(@babel/core@7.29.7(supports-color@8.1.1))(@react-native/metro-config@0.88.1(@babel/core@7.29.7(supports-color@8.1.1))(bufferutil@4.1.0)(supports-color@8.1.1)(utf-8-validate@6.0.6))(@types/react@19.3.0)(bufferutil@4.1.0)(react@19.3.0)(supports-color@8.1.1)(utf-8-validate@6.0.6))(react@19.3.0)':
16535
dependencies:
16536
react: 19.3.0
pnpm-workspace.yaml
-2
@@ -117,7 +117,6 @@ overrides:
117
"@ff-labs/fff-node": 0.11.0
118
"@legendapp/list": 3.7.3
119
"@pierre/diffs": 1.7.0-beta.4
120
- "@react-native-ai/apple": 0.12.0
120
"@react-native-menu/menu": 2.0.0
121
"@react-navigation/native-stack": 7.21.0
122
dbus-next: 0.10.2
@@ -252,7 +251,6 @@ patchedDependencies:
251
# editor carets when the code font changes, stops the find bar reclaiming focus from the file,
252
# and keeps drag selections intact across virtualized scroll renders.
253
"@pierre/diffs@1.7.0-beta.4": patches/@pierre__diffs@1.7.0-beta.4.patch
255
- "@react-native-ai/apple@0.12.0": patches/@react-native-ai__apple@0.12.0.patch
254
"@react-native-menu/menu@2.0.0": patches/@react-native-menu__menu@2.0.0.patch
255
"@react-navigation/native-stack@7.21.0": patches/@react-navigation%2Fnative-stack@7.21.0.patch
256
dbus-next@0.10.2: patches/dbus-next@0.10.2.patch
scripts/build-desktop-artifact.ts
+40
@@ -997,6 +997,8 @@ export const DESKTOP_FILE_EXCLUSIONS = [
997
"!apps/desktop/resources/browser-secret/**/*",
998
"!apps/desktop/prod-resources/browser-secret",
999
"!apps/desktop/prod-resources/browser-secret/**/*",
1000
+ "!apps/desktop/prod-resources/apple-speech",
1001
+ "!apps/desktop/prod-resources/apple-speech/**/*",
1002
"!apps/desktop/prod-resources/windows-server",
1003
"!apps/desktop/prod-resources/windows-server/**/*",
1004
"!apps/desktop/prod-resources/wsl-runtime.tar.gz",
@@ -1119,6 +1121,9 @@ export const LINUX_CAPTURE_EXTRA_RESOURCES = [
1121
export const LINUX_BROWSER_SECRET_EXTRA_RESOURCES = [
1122
{ from: "apps/desktop/prod-resources/browser-secret", to: "browser-secret" },
1123
] as const;
1124
+export const MAC_APPLE_SPEECH_EXTRA_RESOURCES = [
1125
+ { from: "apps/desktop/prod-resources/apple-speech", to: "apple-speech" },
1126
+] as const;
1127
1128
export interface MacPasskeySigningConfiguration {
1129
readonly appId: string;
@@ -2468,6 +2473,31 @@ export const stageBrowserSecret = Effect.fn("stageBrowserSecret")(function* (inp
2473
);
2474
});
2475
2476
+export const stageAppleSpeech = Effect.fn("stageAppleSpeech")(function* (input: {
2477
+ readonly repoRoot: string;
2478
+ readonly stageResourcesDir: string;
2479
+ readonly platform: typeof BuildPlatform.Type;
2480
+ readonly arch: typeof BuildArch.Type;
2481
+ readonly verbose: boolean;
2482
+}) {
2483
+ if (input.platform !== "mac") return;
2484
+ const path = yield* Path.Path;
2485
+ yield* runCommand(
2486
+ ChildProcess.make(
2487
+ "node",
2488
+ [
2489
+ path.join(input.repoRoot, "apps/desktop/scripts/build-apple-speech.mjs"),
2490
+ "--arch",
2491
+ input.arch,
2492
+ "--output",
2493
+ path.join(input.stageResourcesDir, "apple-speech", "t3-apple-speech"),
2494
+ ],
2495
+ { cwd: input.repoRoot },
2496
+ ),
2497
+ { label: "build macOS Apple Speech helper", verbose: input.verbose },
2498
+ );
2499
+});
2500
+
2501
const generateMacIconSet = Effect.fn("build-desktop-artifact.generateMacIconSet")(function* (
2502
sourcePng: string,
2503
targetIcns: string,
@@ -2812,6 +2842,7 @@ export const createBuildConfig = Effect.fn("createBuildConfig")(function* (
2842
...DESKTOP_EXTRA_RESOURCES,
2843
...(platform === "linux" ? LINUX_CAPTURE_EXTRA_RESOURCES : []),
2844
...(platform === "linux" ? LINUX_BROWSER_SECRET_EXTRA_RESOURCES : []),
2845
+ ...(platform === "mac" ? MAC_APPLE_SPEECH_EXTRA_RESOURCES : []),
2846
...(platform === "win" ? WINDOWS_SERVER_EXTRA_RESOURCES : []),
2847
...(platform === "win" && wslRuntimeBundled ? WSL_RUNTIME_EXTRA_RESOURCES : []),
2848
],
@@ -2857,6 +2888,8 @@ export const createBuildConfig = Effect.fn("createBuildConfig")(function* (
2888
"T3 Code lets commands run by terminals and coding agents use the camera.",
2889
NSMicrophoneUsageDescription:
2890
"T3 Code lets commands run by terminals and coding agents use the microphone.",
2891
+ NSSpeechRecognitionUsageDescription:
2892
+ "T3 Code transcribes your dictation on this Mac when you choose Apple Speech.",
2893
// macOS lists an app under Default web browser only when it opens web
2894
// pages as documents as well as http and https links (see protocols).
2895
CFBundleDocumentTypes: [
@@ -3840,6 +3873,13 @@ const buildDesktopArtifactUnlocked = Effect.fn("buildDesktopArtifactUnlocked")(f
3873
arch: options.arch,
3874
verbose: options.verbose,
3875
});
3876
+ yield* stageAppleSpeech({
3877
+ repoRoot,
3878
+ stageResourcesDir,
3879
+ platform: options.platform,
3880
+ arch: options.arch,
3881
+ verbose: options.verbose,
3882
+ });
3883
3884
yield* assertPlatformBuildResources(
3885
options.platform,
third-party-licenses.config.json
+15
-11
@@ -1,5 +1,20 @@
1
{
2
"customNotices": [
3
+ {
4
+ "bundles": ["desktop", "mobile"],
5
+ "license": "MIT",
6
+ "name": "Apple Speech engine (adapted from @react-native-ai/apple)",
7
+ "sourceUrl": "https://github.com/callstackincubator/ai",
8
+ "generatedNotices": [
9
+ {
10
+ "licenseId": "MIT",
11
+ "copyrights": [
12
+ "Copyright (c) 2024-2025 Szymon Rybczak",
13
+ "Copyright (c) 2025-present Callstack"
14
+ ]
15
+ }
16
+ ]
17
+ },
18
{
19
"bundles": ["desktop", "mobile", "web"],
20
"license": "MIT",
@@ -608,17 +623,6 @@
623
"copyrights": ["Copyright (c) Meta Platforms, Inc. and affiliates."]
624
}
625
},
611
- {
612
- "name": "@react-native-ai/apple",
613
- "sourceUrl": "https://github.com/callstackincubator/ai",
614
- "generatedNotice": {
615
- "licenseId": "MIT",
616
- "copyrights": [
617
- "Copyright (c) 2024-2025 Szymon Rybczak",
618
- "Copyright (c) 2025-present Callstack"
619
- ]
620
- }
621
- },
626
{
627
"name": "react-remove-scroll-bar",
628
"generatedNotice": {