Open-source Grok Bot alternative with a virtual machine that bots can use
TypeScript ai-agentsclaude-codecodexcomputer-usedockerelectrongrokgrok-botgrok-bot-alternativeself-hostedtypescript
Voice: DeepSeek reads replies in Stella or Tide and hears dictation (#6243)
Krishna Dobhal56bb04cd61d8
diff --git a/docs/verification/README.md b/docs/verification/README.mdindex 846dfb102b..5b249044f9 100644--- a/docs/verification/README.md+++ b/docs/verification/README.md@@ -345,6 +345,9 @@ desktop routing, cancellation, and computer authority cleanup.The [Gemini speech fixture](gemini-speech.md) checks write-only credentials,voice selection and WAV synthesis against an offline provider in an isolatedserver, with manual steps for real Google access and playback.+The [DeepSeek speech fixture](deepseek-speech.md) checks the shared DeepSeek+key, the Stella/Tide choice, WAV synthesis and DeepSeek transcription against an+offline provider in an isolated server.The [persistence responsiveness benchmark](persistence-performance.md) measuressynthetic message/log bursts and history scans, with isolated chat, visibilitydiff --git a/docs/verification/deepseek-speech.md b/docs/verification/deepseek-speech.mdnew file mode 100644index 0000000000..d9779e8f11--- /dev/null+++ b/docs/verification/deepseek-speech.md@@ -0,0 +1,42 @@+# DeepSeek speech++Run the offline provider and isolated server fixtures:++```sh+node node_modules/vitest/vitest.mjs run server/tts/deepseek.test.ts server/routes/tts.test.ts src/lib/speech.test.ts src/components/VoiceSettings.test.ts scripts/testing/key-readback.e2e.test.ts+```++The server fixture uses `launchVerificationServer`, a temporary home and the+fake engine. It restarts only that child with `OMB_DEEPSEEK_SPEECH_API` pointing+to a loopback stand-in. No DeepSeek account, real credential or microphone is+used.++The isolated check saves the DeepSeek key through `/api/config` (the same+`deepseek.key` the DeepSeek engine uses), selects DeepSeek and sees Stella as+the default voice, lists exactly Stella and Tide, saves Tide and reads it back.+It synthesizes through `/api/tts/speak` with a Stella override and verifies the+WAV bytes, content type and the request body (`text`, `voice_id`, `format`,+`filter_markdown` only). A bot voice from another catalog falls back to the+workspace's DeepSeek voice. A provider refusal returns 502 without the spoken+text. A synthetic 16 kHz PCM WAV posted to `/api/tts/transcribe` reaches+`/tools/asr` as the multipart `file` and returns its text. A 121-second clip+and a non-WAV body are refused before any provider request. Removing the key+turns transcription into a 409 asking for a DeepSeek key, with no fallback to+another provider; saving it again recovers. Switching to Fish Audio clears the+voice and returns transcription to the Fish/ElevenLabs order. The server log+never contains the key.++The unit suites cover cancellation, bounded and truncated audio, malformed+transcripts, input limits, safe errors, the Mac using the page recorder while+DeepSeek is the voice, the 115-second recording cap with 64 ms frame rounding,+and the Voice settings picker.++Contract: [TTS](https://api-docs.deepseek.com/guides/tts/) and+[ASR](https://api-docs.deepseek.com/guides/asr/).++For a manual desktop check, save a DeepSeek key under Settings → API keys,+choose DeepSeek in a bot's Voice settings, pick Tide and play the sample.+Enable spoken replies, send a message, and request a voice note. Dictate into+the composer and take a turn in a call, on macOS and on Windows. This verifies+real DeepSeek access, microphone capture, playback and quality, which the+offline fixture cannot prove.diff --git a/scripts/testing/key-readback.e2e.test.ts b/scripts/testing/key-readback.e2e.test.tsindex 9cd09fc6f2..f2bfc18e55 100644--- a/scripts/testing/key-readback.e2e.test.ts+++ b/scripts/testing/key-readback.e2e.test.ts@@ -37,6 +37,17 @@ let fixture: VerificationServer;let server: ChildProcess;const stubCalls: string[] = [];const geminiModelKeys: string[] = [];+const deepseekCalls: Array<{ url: string; authorization?: string; body: Buffer }> = [];++function pcmWav(seconds: number, rate = 16_000): Buffer {+ const data = Math.round(seconds * rate) * 2;+ const wav = Buffer.alloc(44 + data);+ wav.write("RIFF"); wav.writeUInt32LE(36 + data, 4); wav.write("WAVEfmt ", 8);+ wav.writeUInt32LE(16, 16); wav.writeUInt16LE(1, 20); wav.writeUInt16LE(1, 22);+ wav.writeUInt32LE(rate, 24); wav.writeUInt32LE(rate * 2, 28); wav.writeUInt16LE(2, 32);+ wav.writeUInt16LE(16, 34); wav.write("data", 36); wav.writeUInt32LE(data, 40);+ return wav;+}async function call(method: string, path: string, body?: unknown) {const response = await fetch(`${fixture.info.url}${path}`, {@@ -49,9 +60,10 @@ async function call(method: string, path: string, body?: unknown) {beforeAll(async () => {stub = createServer(async (req, res) => {const url = req.url ?? "";- let raw = "";- req.setEncoding("utf8");- for await (const chunk of req) raw += chunk;+ const chunks: Buffer[] = [];+ for await (const chunk of req) chunks.push(chunk as Buffer);+ const bytes = Buffer.concat(chunks);+ const raw = bytes.toString("utf8");stubCalls.push(`${req.method} ${url.split("?")[0]}`);const reply = (status: number, body: unknown) => { res.writeHead(status, { "content-type": "application/json" }); res.end(JSON.stringify(body)); };if (url === "/postiz/mcp") {@@ -79,6 +91,18 @@ beforeAll(async () => {geminiModelKeys.push(String(req.headers["x-goog-api-key"]));return reply(200, { models: [] });}+ if (url.startsWith("/deepseek/tools/")) {+ deepseekCalls.push({ url, authorization: req.headers.authorization, body: bytes });+ if (req.headers.authorization !== "Bearer fixture-deepseek-secret") return reply(401, { error: "fixture-deepseek-secret leaked text" });+ if (url === "/deepseek/tools/tts") {+ const input = JSON.parse(raw) as { text: string };+ if (input.text.includes("refuse")) return reply(429, { error: input.text });+ res.writeHead(200, { "content-type": "audio/wav" });+ res.end(pcmWav(0.25, 24_000));+ return;+ }+ return reply(200, { text: "hello from deepseek", request_id: "fixture", duration_ms: 1000 });+ }if (url.startsWith("/eleven/voices")) return reply(200, { voices: [] });if (url.startsWith("/fish/model")) return reply(200, { items: [], total: 0 });return reply(404, { error: "not in the stand-in" });@@ -94,7 +118,7 @@ beforeAll(async () => {const env = {...verificationServerEnvironment({}, fixture.info.dataDir, Number(new URL(fixture.info.url).port)),OMB_BOAT_API: origin, OMB_COMPOSIO_API: `${origin}/composio`, OMB_COMPOSIO_TOOLKITS_API: `${origin}/composio`,- OMB_GEMINI_TTS_API: `${origin}/gemini`,+ OMB_GEMINI_TTS_API: `${origin}/gemini`, OMB_DEEPSEEK_SPEECH_API: `${origin}/deepseek`,OMB_ELEVENLABS_API: `${origin}/eleven`, OMB_FISH_AUDIO_API: `${origin}/fish`, OMB_POSTIZ_CLOUD_URL: `${origin}/postiz`,};const log = openSync(fixture.info.logPath, "a", 0o600);@@ -174,3 +198,48 @@ it("configures Gemini speech and synthesizes WAV through the isolated server", aexpect((await call("PUT", "/api/config", { tts: { provider: "gemini" } })).body.tts).toMatchObject({ voice: "", model: "gemini-3.8-flash-lite-tts" });console.log(JSON.stringify({ geminiSpeech: "passed", fixture: fixture.info }));});++it("speaks and hears through DeepSeek with the existing DeepSeek key on the isolated server", async () => {+ const speak = (body: unknown) => fetch(`${fixture.info.url}/api/tts/speak`, { method: "POST", headers: { "content-type": "application/json", origin: fixture.info.url }, body: JSON.stringify(body) });+ const hear = (audio: Buffer) => fetch(`${fixture.info.url}/api/tts/transcribe`, { method: "POST", headers: { "content-type": "audio/wav", origin: fixture.info.url }, body: audio });+ deepseekCalls.length = 0;+ expect((await call("PUT", "/api/config", { tts: { provider: "elevenlabs" }, deepseek: { key: "fixture-deepseek-secret" } })).status).toBe(200);+ const chosen = (await call("PUT", "/api/config", { tts: { provider: "deepseek", fishKey: "" } })).body;+ expect(chosen.tts).toMatchObject({ provider: "deepseek", configured: true, ready: true, voice: "stella" });+ expect(JSON.stringify(chosen)).not.toContain("fixture-deepseek-secret");+ expect((await call("GET", "/api/tts/voices")).body.voices).toEqual([{ id: "stella", label: "Stella (female)" }, { id: "tide", label: "Tide (male)" }]);+ expect((await call("PUT", "/api/config", { tts: { voice: "tide" } })).body.tts).toMatchObject({ voice: "tide", ready: true });+ expect((await call("GET", "/api/config")).body.tts).toMatchObject({ provider: "deepseek", voice: "tide" });++ const sample = await speak({ text: "Hello from the fixture", voiceId: "stella" });+ expect(sample.status).toBe(200);+ expect(sample.headers.get("content-type")).toBe("audio/wav");+ expect(Buffer.from(await sample.arrayBuffer()).equals(pcmWav(0.25, 24_000))).toBe(true);+ expect(JSON.parse(deepseekCalls.at(-1)!.body.toString())).toEqual({ text: "Hello from the fixture", voice_id: "stella", format: "wav", filter_markdown: true });+ expect((await speak({ text: "Fallback", voiceId: "elevenlabs-voice" })).status).toBe(200);+ expect(JSON.parse(deepseekCalls.at(-1)!.body.toString()).voice_id).toBe("tide");+ const refused = await speak({ text: "please refuse this" });+ expect(refused.status).toBe(502);+ expect(JSON.stringify(await refused.json())).not.toContain("please refuse");++ const heard = await hear(pcmWav(2));+ expect(heard.status).toBe(200);+ expect(await heard.json()).toEqual({ text: "hello from deepseek" });+ expect(deepseekCalls.at(-1)!.url).toBe("/deepseek/tools/asr");+ expect(deepseekCalls.at(-1)!.body.toString("latin1")).toContain('name="file"; filename="speech.wav"');+ const callsBefore = deepseekCalls.length;+ expect((await hear(pcmWav(121))).status).toBe(413);+ expect((await hear(Buffer.from("not audio"))).status).toBe(400);+ expect(deepseekCalls.length).toBe(callsBefore);++ expect((await call("PUT", "/api/config", { deepseek: { key: "" } })).body.tts).toMatchObject({ provider: "deepseek", configured: false });+ const missing = await hear(pcmWav(1));+ expect(missing.status).toBe(409);+ expect(await missing.json()).toMatchObject({ errorKey: "serverError.voice.deepseekKeyRequired" });+ expect((await call("PUT", "/api/config", { deepseek: { key: "fixture-deepseek-secret" } })).body.tts).toMatchObject({ configured: true, ready: true });+ expect((await hear(pcmWav(1))).status).toBe(200);+ expect((await call("PUT", "/api/config", { tts: { provider: "fish" } })).body.tts).toMatchObject({ provider: "fish", voice: "" });+ expect(await (await hear(pcmWav(1))).json()).toMatchObject({ errorKey: "serverError.voice.fishKeyRequired" });+ expect(readFileSync(fixture.info.logPath, "utf8")).not.toContain("fixture-deepseek-secret");+ console.log(JSON.stringify({ deepseekSpeech: "passed", fixture: fixture.info }));+});diff --git a/server/config.ts b/server/config.tsindex 3a67828464..9ed09b116e 100644--- a/server/config.ts+++ b/server/config.ts@@ -366,13 +366,13 @@ const appConfigSchema = z.object({vps: vpsConfigSchema.optional(),/** OpenCode key, plus `providerKeys` for its other providers by the env name OpenCode reads; both write-only and only for its child. */opencodeGo: z.object({ apiKey: optionalText, providerKeys: z.record(z.string(), z.string()).optional() }).optional(),- /** `provider`: "elevenlabs" (default, `key`), "fish" (`fishKey`, `fishModel`), "system", "xai" (`xai.key`), "gemini" (`geminiKey`, `model`), "openai" (`openai.key`) or "chatterbox" (local; `baseUrl`, `model`). */+ /** `provider`: "elevenlabs" (default, `key`), "fish" (`fishKey`, `fishModel`), "system", "xai" (`xai.key`), "gemini" (`geminiKey`, `model`), "openai" (`openai.key`), "deepseek" (`deepseek.key`; it also hears dictation) or "chatterbox" (local; `baseUrl`, `model`). */tts: z.object({key: optionalText,fishKey: optionalText,geminiKey: optionalText,voice: optionalText,- provider: z.enum(["elevenlabs", "fish", "system", "chatterbox", "xai", "gemini", "openai"]).optional(),+ provider: z.enum(["elevenlabs", "fish", "system", "chatterbox", "xai", "gemini", "openai", "deepseek"]).optional(),baseUrl: z.string().trim()@@ -473,7 +473,7 @@ export interface AppConfig extends HelperConfig {/** A named host from the user's SSH config. Authentication stays with SSH. */vps?: { sshAlias?: string };opencodeGo?: { apiKey?: string; providerKeys?: Record<string, string> };- tts?: { key?: string; fishKey?: string; geminiKey?: string; voice?: string; provider?: "elevenlabs" | "fish" | "system" | "chatterbox" | "xai" | "gemini" | "openai"; baseUrl?: string; model?: string; fishModel?: FishTtsModel; everyReply?: boolean };+ tts?: { key?: string; fishKey?: string; geminiKey?: string; voice?: string; provider?: "elevenlabs" | "fish" | "system" | "chatterbox" | "xai" | "gemini" | "openai" | "deepseek"; baseUrl?: string; model?: string; fishModel?: FishTtsModel; everyReply?: boolean };decider?: DeciderConfig;imageGen?: ImageGenerationConfig;live?: LiveConfig;diff --git a/server/routes/config.ts b/server/routes/config.tsindex 57e2a906db..449798f1c7 100644--- a/server/routes/config.ts+++ b/server/routes/config.ts@@ -41,6 +41,7 @@ import type { SharedComputers } from "../shared-computers.ts";import { parseSkillMd } from "../skills.ts";import type { Store } from "../store.ts";import * as tts from "../tts/index.ts";+import { DEFAULT_DEEPSEEK_VOICE } from "../../shared/deepseek-voice.ts";import * as vps from "../vps-computer.ts";import { refusalBody, userError, userErrorFields } from "../user-errors.ts";import type { ServerErrorBody } from "../../shared/server-text.ts";@@ -194,7 +195,7 @@ export function createConfigRoutes(deps: ConfigRouteDeps): RouteHandler {&& patch.tts.provider !== tts.voiceProvider(cfg);if (changingVoiceProvider && patch.tts?.voice === undefined) {// Voice ids are provider-owned: never carry one from one catalog into another.- patch.tts = { ...patch.tts, voice: "" };+ patch.tts = { ...patch.tts, voice: patch.tts?.provider === "deepseek" ? DEFAULT_DEEPSEEK_VOICE : "" };}if (changingVoiceProvider && patch.tts?.model === undefined) patch.tts = { ...patch.tts, model: "" };if (providerConfigBusy.get()) return json(res, 409, { error: "provider settings are already being updated" });diff --git a/server/routes/tts.test.ts b/server/routes/tts.test.tsindex e1a52908f5..729f5b6548 100644--- a/server/routes/tts.test.ts+++ b/server/routes/tts.test.ts@@ -10,7 +10,7 @@ import { createTtsRoutes, TRANSCRIBE_MAX_BYTES } from "./tts.ts";async function call(method: string, path: string, body: unknown = {}, cfg = {} as AppConfig, req = {} as never) {const answers: Array<[number, unknown]> = [];const out = await createTtsRoutes({ config: () => cfg })({- req, res: {} as never, url: new URL(`http://x${path}`), path: new URL(`http://x${path}`).pathname, method,+ req, res: { on() {}, off() {}, writableEnded: false } as never, url: new URL(`http://x${path}`), path: new URL(`http://x${path}`).pathname, method,auth: { kind: "loopback", scopes: ["admin", "client"] },json: ((_res: unknown, status: number, value: unknown) => { answers.push([status, value]); }) as never, readBody: (async () => body) as never,});@@ -105,6 +105,37 @@ describe("transcribe route", () => {expect((answers[0]![1] as { error: string }).error).toContain("Speech to Text permissions");});+ it("hears through DeepSeek alone while DeepSeek is the voice, even with a Fish key saved", async () => {+ const recording = Buffer.alloc(44 + 32_000);+ recording.write("RIFF", 0); recording.writeUInt32LE(36 + 32_000, 4); recording.write("WAVEfmt ", 8);+ recording.writeUInt32LE(16, 16); recording.writeUInt16LE(1, 20); recording.writeUInt16LE(1, 22);+ recording.writeUInt32LE(16_000, 24); recording.writeUInt32LE(32_000, 28); recording.writeUInt16LE(2, 32); recording.writeUInt16LE(16, 34);+ recording.write("data", 36); recording.writeUInt32LE(32_000, 40);+ const fetchMock = vi.fn(async (_url: string, _init: RequestInit) => new Response(JSON.stringify({ text: "from deepseek" }), { status: 200 }));+ vi.stubGlobal("fetch", fetchMock);+ const cfg = { deepseek: { key: "ds-key" }, tts: { provider: "deepseek", fishKey: "fish-key" } } as AppConfig;+ const { answers } = await call("POST", "/api/tts/transcribe", {}, cfg, upload(recording));+ expect(answers).toEqual([[200, { text: "from deepseek" }]]);+ expect(fetchMock).toHaveBeenCalledTimes(1);+ expect(String(fetchMock.mock.calls[0]![0])).toMatch(/\/v1\/tools\/asr$/);+ expect(new Headers(fetchMock.mock.calls[0]![1].headers).get("authorization")).toBe("Bearer ds-key");+ });++ it("asks for a DeepSeek key, and tries no other provider, while DeepSeek is the voice without one", async () => {+ const fetchMock = vi.fn();+ vi.stubGlobal("fetch", fetchMock);+ const cfg = { tts: { provider: "deepseek", fishKey: "fish-key" } } as AppConfig;+ const { answers } = await call("POST", "/api/tts/transcribe", {}, cfg, upload(Buffer.from("RIFF")));+ expect(answers).toEqual([[409, { error: expect.stringContaining("DeepSeek API key"), errorKey: "serverError.voice.deepseekKeyRequired" }]]);+ expect(fetchMock).not.toHaveBeenCalled();+ });++ it("refuses DeepSeek audio over its 8 MiB limit", async () => {+ const cfg = { deepseek: { key: "ds-key" }, tts: { provider: "deepseek" } } as AppConfig;+ const { answers } = await call("POST", "/api/tts/transcribe", {}, cfg, upload(Buffer.alloc(8 * 1024 * 1024 + 1)));+ expect(answers[0]![0]).toBe(413);+ });+it("refuses audio over the cap", async () => {const { answers } = await call("POST", "/api/tts/transcribe", {}, withKey, upload(Buffer.alloc(TRANSCRIBE_MAX_BYTES + 1)));expect(answers[0]![0]).toBe(413);diff --git a/server/routes/tts.ts b/server/routes/tts.tsindex 6b934c1199..6e2a5dfe80 100644--- a/server/routes/tts.ts+++ b/server/routes/tts.ts@@ -4,6 +4,7 @@ import type { AppConfig } from "../config.ts";import { voiceCredential } from "../included-services.ts";import { redactSecretsInText } from "../redact.ts";import * as elevenlabs from "../tts/elevenlabs.ts";+import * as deepseek from "../tts/deepseek.ts";import * as fish from "../tts/fish.ts";import { voiceFailure } from "../tts/errors.ts";import * as tts from "../tts/index.ts";@@ -91,18 +92,25 @@ export function createTtsRoutes(deps: TtsRouteDeps): RouteHandler {req.resume();return json(res, 400, { error: "content-type must be audio/wav" });}- // Fish Audio first, as before; without it the person's own ElevenLabs key (never the plan's included voice).- const key = cfg.tts?.fishKey;- const own = key ? null : voiceCredential(cfg.tts?.key);+ // DeepSeek voice hears with DeepSeek alone; otherwise Fish Audio first, then the person's own ElevenLabs key+ // (never the plan's included voice).+ const deepseekKey = tts.voiceProvider(cfg) === "deepseek" ? (cfg.deepseek?.key ?? "") : null;+ const key = deepseekKey === null ? cfg.tts?.fishKey : undefined;+ const own = key || deepseekKey !== null ? null : voiceCredential(cfg.tts?.key);const eleven = own?.included ? null : own;- if (!key && !eleven) {+ if (deepseekKey === "") {+ req.resume();+ return json(res, 409, userError("serverError.voice.deepseekKeyRequired"));+ }+ if (deepseekKey === null && !key && !eleven) {req.resume();return json(res, 409, userError("serverError.voice.fishKeyRequired"));}+ const maxBytes = deepseekKey ? deepseek.ASR_MAX_BYTES : TRANSCRIBE_MAX_BYTES;const declared = Number(req.headers["content-length"] ?? 0);- if (declared > TRANSCRIBE_MAX_BYTES) {+ if (declared > maxBytes) {req.resume();- return json(res, 413, { error: `audio exceeds ${TRANSCRIBE_MAX_BYTES} bytes` });+ return json(res, 413, { error: `audio exceeds ${maxBytes} bytes` });}const audio = await new Promise<Buffer | null>((resolve, reject) => {const chunks: Buffer[] = [];@@ -110,17 +118,28 @@ export function createTtsRoutes(deps: TtsRouteDeps): RouteHandler {// Answering before the upload is read to its end resets the connection on Windows instead of delivering the 413.req.on("data", (chunk: Buffer) => {received += chunk.byteLength;- if (received <= TRANSCRIBE_MAX_BYTES) chunks.push(chunk);+ if (received <= maxBytes) chunks.push(chunk);});- req.on("end", () => resolve(received > TRANSCRIBE_MAX_BYTES ? null : Buffer.concat(chunks)));+ req.on("end", () => resolve(received > maxBytes ? null : Buffer.concat(chunks)));req.on("error", reject);});- if (!audio) return json(res, 413, { error: `audio exceeds ${TRANSCRIBE_MAX_BYTES} bytes` });+ if (!audio) return json(res, 413, { error: `audio exceeds ${maxBytes} bytes` });+ const controller = new AbortController();+ const cancel = () => { if (!res.writableEnded) controller.abort(); };+ res.on("close", cancel);try {- const text = key ? await fish.transcribe(audio, mime, key) : await elevenlabs.transcribe(audio, mime, eleven!.token, eleven!.api);+ const text = deepseekKey+ ? await deepseek.transcribe(audio, deepseekKey, controller.signal)+ : key ? await fish.transcribe(audio, mime, key) : await elevenlabs.transcribe(audio, mime, eleven!.token, eleven!.api);+ if (controller.signal.aborted) return;return json(res, 200, { text });} catch (e) {+ if (controller.signal.aborted) return;+ const failure = voiceFailure(e);+ if (failure) return json(res, failure.status, failure.body);return json(res, 502, { error: e instanceof Error ? e.message : String(e), ...userErrorFields(e) });+ } finally {+ res.off("close", cancel);}}return PASS;diff --git a/server/tts/deepseek.test.ts b/server/tts/deepseek.test.tsnew file mode 100644index 0000000000..d52ce6adfd--- /dev/null+++ b/server/tts/deepseek.test.ts@@ -0,0 +1,172 @@+import { createServer, type Server } from "node:http";+import { afterAll, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";+import type { AppConfig } from "../config.ts";++const KEY = "fixture-deepseek-key";++function wav(seconds: number, rate = 16_000, bits = 16): Buffer {+ const data = Math.round(seconds * rate) * (bits / 8);+ const out = Buffer.alloc(44 + data);+ out.write("RIFF", 0);+ out.writeUInt32LE(36 + data, 4);+ out.write("WAVEfmt ", 8);+ out.writeUInt32LE(16, 16);+ out.writeUInt16LE(1, 20);+ out.writeUInt16LE(1, 22);+ out.writeUInt32LE(rate, 24);+ out.writeUInt32LE(rate * (bits / 8), 28);+ out.writeUInt16LE(bits / 8, 32);+ out.writeUInt16LE(bits, 34);+ out.write("data", 36);+ out.writeUInt32LE(data, 40);+ return out;+}++let server: Server;+let status = 200;+let contentType = "audio/wav";+let reply: Buffer = wav(0.5, 24_000);+let hang = false;+const seen: Array<{ url: string; method?: string; authorization?: string; type?: string; body: Buffer }> = [];+const deepseek = () => import("./deepseek.ts");+const voice = () => import("./index.ts");++beforeAll(async () => {+ server = createServer((req, res) => {+ const chunks: Buffer[] = [];+ req.on("data", (chunk: Buffer) => chunks.push(chunk));+ req.on("end", () => {+ seen.push({ url: req.url ?? "", method: req.method, authorization: req.headers.authorization, type: req.headers["content-type"], body: Buffer.concat(chunks) });+ if (hang) return;+ if (status !== 200) {+ res.writeHead(status, { "content-type": "application/json" });+ res.end(JSON.stringify({ error: { message: `${KEY} private spoken text` } }));+ return;+ }+ res.writeHead(200, { "content-type": contentType });+ res.end(reply);+ });+ });+ await new Promise<void>((resolve) => server.listen(0, "127.0.0.1", resolve));+ const address = server.address();+ if (!address || typeof address === "string") throw new Error("Expected TCP fixture");+ vi.stubEnv("OMB_DEEPSEEK_SPEECH_API", `http://127.0.0.1:${address.port}/v1`);+});+afterAll(async () => {+ server.closeAllConnections();+ await new Promise<void>((resolve) => server.close(() => resolve()));+ vi.unstubAllEnvs();+});+beforeEach(() => {+ status = 200;+ contentType = "audio/wav";+ reply = wav(0.5, 24_000);+ hang = false;+ seen.length = 0;+});++describe("DeepSeek speech", () => {+ it("offers exactly Stella and Tide without asking the network", async () => {+ expect((await deepseek()).listVoices()).toEqual([+ { id: "stella", label: "Stella (female)" },+ { id: "tide", label: "Tide (male)" },+ ]);+ expect(seen).toEqual([]);+ });++ it("synthesizes WAV with only the documented fields and the bearer key", async () => {+ const audio = await (await deepseek()).synthesize("Hello there", "tide", KEY);+ expect(audio.mime).toBe("audio/wav");+ expect(Buffer.from(audio.bytes).equals(reply)).toBe(true);+ expect(seen).toHaveLength(1);+ expect(seen[0]).toMatchObject({ url: "/v1/tools/tts", method: "POST", authorization: `Bearer ${KEY}` });+ expect(JSON.parse(seen[0]!.body.toString())).toEqual({ text: "Hello there", voice_id: "tide", format: "wav", filter_markdown: true });+ });++ it("refuses bad input before any request", async () => {+ const { synthesize, transcribe, TTS_MAX_CHARS } = await deepseek();+ await expect(synthesize("hi", "alloy", KEY)).rejects.toThrow("Stella or Tide");+ await expect(synthesize(" ", "stella", KEY)).rejects.toThrow("no text");+ await expect(synthesize("a".repeat(TTS_MAX_CHARS + 1), "stella", KEY)).rejects.toMatchObject({ status: 413 });+ await expect(synthesize("hi", "stella", "")).rejects.toMatchObject({ status: 409 });+ await expect(transcribe(Buffer.from("not a wav"), KEY)).rejects.toThrow("16-bit PCM WAV");+ await expect(transcribe(wav(1, 16_000, 8), KEY)).rejects.toThrow("16-bit PCM WAV");+ await expect(transcribe(wav(121), KEY)).rejects.toMatchObject({ status: 413 });+ await expect(transcribe(Buffer.alloc(8 * 1024 * 1024 + 1), KEY)).rejects.toMatchObject({ status: 413 });+ expect(seen).toEqual([]);+ });++ it("rejects unexpected, empty and truncated audio", async () => {+ const { synthesize } = await deepseek();+ contentType = "audio/mpeg";+ await expect(synthesize("hi", "stella", KEY)).rejects.toThrow("unexpected audio format");+ contentType = "audio/wav";+ reply = Buffer.alloc(0);+ await expect(synthesize("hi", "stella", KEY)).rejects.toThrow("empty audio");+ reply = wav(0.5, 24_000).subarray(0, 1000);+ await expect(synthesize("hi", "stella", KEY)).rejects.toThrow("incomplete audio");+ });++ it("never repeats a provider's error body, key or text", async () => {+ const { synthesize, transcribe } = await deepseek();+ for (const [code, expected] of [[401, 409], [402, 502], [429, 502], [400, 400], [503, 502]] as const) {+ status = code;+ const error = (await synthesize("private spoken text", "stella", KEY).then(() => null, (e: unknown) => e)) as Error & { status: number };+ expect(error.status).toBe(expected);+ expect(error.message).not.toContain(KEY);+ expect(error.message).not.toContain("private spoken text");+ const heard = (await transcribe(wav(1), KEY).then(() => null, (e: unknown) => e)) as Error;+ expect(heard.message).not.toContain(KEY);+ }+ });++ it("stops when the caller cancels", async () => {+ hang = true;+ const controller = new AbortController();+ const pending = (await deepseek()).synthesize("hi", "stella", KEY, controller.signal);+ await vi.waitFor(() => expect(seen).toHaveLength(1));+ controller.abort();+ await expect(pending).rejects.toMatchObject({ status: 499 });+ });++ it("sends the recording as the multipart file and returns the transcript", async () => {+ contentType = "application/json";+ reply = Buffer.from(JSON.stringify({ text: " hello world ", request_id: "r1", duration_ms: 1000 }));+ const recording = wav(1);+ expect(await (await deepseek()).transcribe(recording, KEY)).toBe("hello world");+ expect(seen[0]).toMatchObject({ url: "/v1/tools/asr", method: "POST", authorization: `Bearer ${KEY}` });+ expect(seen[0]!.type).toMatch(/^multipart\/form-data/);+ const body = seen[0]!.body.toString("latin1");+ expect(body).toContain('name="file"; filename="speech.wav"');+ expect(body).not.toContain('name="language"');+ expect(body).not.toContain('name="model"');+ });++ it("rejects a malformed transcript", async () => {+ contentType = "application/json";+ reply = Buffer.from(JSON.stringify({ transcript: "no" }));+ await expect((await deepseek()).transcribe(wav(1), KEY)).rejects.toThrow("unexpected transcription");+ reply = Buffer.from("{");+ await expect((await deepseek()).transcribe(wav(1), KEY)).rejects.toThrow("unexpected transcription");+ });+});++describe("DeepSeek as the voice provider", () => {+ const cfg: AppConfig = { deepseek: { key: KEY }, tts: { provider: "deepseek", voice: "stella" } };++ it("is ready with the saved DeepSeek key and never shows it", async () => {+ const tts = await voice();+ expect(tts.describeVoice(cfg)).toMatchObject({ provider: "deepseek", configured: true, ready: true, voice: "stella" });+ expect(JSON.stringify(tts.describeVoice(cfg))).not.toContain(KEY);+ expect(tts.providerConfigured({ tts: { provider: "deepseek" } })).toBe(false);+ expect(tts.voiceConfigured({ ...cfg, tts: { provider: "deepseek", voice: "alloy" } })).toBe(false);+ });++ it("speaks in the bot's DeepSeek voice, or the workspace's for a voice from another catalog", async () => {+ const tts = await voice();+ await tts.speak(cfg, "one", "tide");+ await tts.speak(cfg, "two", "21m00Tcm4TlvDq8ikWAM");+ expect(seen.map((request) => JSON.parse(request.body.toString()).voice_id)).toEqual(["tide", "stella"]);+ expect(tts.voiceReady(cfg, "21m00Tcm4TlvDq8ikWAM")).toBe(true);+ });+});diff --git a/server/tts/deepseek.ts b/server/tts/deepseek.tsnew file mode 100644index 0000000000..1737a2818e--- /dev/null+++ b/server/tts/deepseek.ts@@ -0,0 +1,173 @@+// DeepSeek speech, per https://api-docs.deepseek.com/guides/tts/ and https://api-docs.deepseek.com/guides/asr/.+import { z } from "zod";+import { DEEPSEEK_VOICES, type DeepSeekVoice } from "../../shared/deepseek-voice.ts";+import type { Audio, Voice } from "./elevenlabs.ts";++const API = (process.env.OMB_DEEPSEEK_SPEECH_API || "https://api.deepseek.com/v1").replace(/\/+$/, "");+/** DeepSeek TTS takes at most 10,000 characters; at four UTF-8 bytes each that stays under its 64 KiB body limit. */+export const TTS_MAX_CHARS = 10_000;+/** DeepSeek ASR takes at most 8 MiB and 120 seconds of audio. */+export const ASR_MAX_BYTES = 8 * 1024 * 1024;+export const ASR_MAX_SECONDS = 120;+const MAX_AUDIO_BYTES = 32 * 1024 * 1024;+const MAX_JSON_BYTES = 256 * 1024;+const TIMEOUT_MS = 60_000;++const LABELS: Record<DeepSeekVoice, string> = { stella: "Stella (female)", tide: "Tide (male)" };+const transcriptSchema = z.object({ text: z.string(), request_id: z.string().optional(), duration_ms: z.number().optional() });++export class DeepSeekSpeechError extends Error {+ readonly status: number;+ constructor(message: string, status = 502) {+ super(message);+ this.status = status;+ }+}++export function listVoices(): Voice[] {+ return DEEPSEEK_VOICES.map((id) => ({ id, label: LABELS[id] }));+}++export const isDeepSeekVoice = (voice: unknown): voice is DeepSeekVoice => DEEPSEEK_VOICES.some((id) => id === voice);++function refusal(status: number, action: "speech" | "transcription"): DeepSeekSpeechError {+ if (status === 401 || status === 403) return new DeepSeekSpeechError("DeepSeek rejected the API key. Check the DeepSeek key in Settings → API keys.", 409);+ if (status === 402) return new DeepSeekSpeechError("The DeepSeek account has insufficient balance for speech.");+ if (status === 429) return new DeepSeekSpeechError("DeepSeek is rate-limiting speech. Wait a moment and try again.");+ if (status === 400 || status === 413 || status === 422) {+ return new DeepSeekSpeechError(action === "speech" ? "DeepSeek could not read that text aloud." : "DeepSeek could not hear that recording.", 400);+ }+ if (status >= 500) return new DeepSeekSpeechError("DeepSeek speech is unavailable right now. Try again later.");+ return new DeepSeekSpeechError(`DeepSeek ${action} failed (HTTP ${status}).`);+}++async function request(path: string, init: RequestInit, action: "speech" | "transcription", signal?: AbortSignal): Promise<Response> {+ const timeout = AbortSignal.timeout(TIMEOUT_MS);+ let response: Response;+ try {+ response = await fetch(`${API}${path}`, { ...init, redirect: "error", signal: signal ? AbortSignal.any([signal, timeout]) : timeout });+ } catch {+ if (signal?.aborted) throw new DeepSeekSpeechError(`DeepSeek ${action} was cancelled.`, 499);+ if (timeout.aborted) throw new DeepSeekSpeechError(`DeepSeek ${action} timed out. Try again.`, 504);+ throw new DeepSeekSpeechError("Could not reach DeepSeek. Check your connection.");+ }+ if (!response.ok) {+ await response.body?.cancel().catch(() => {});+ // Remote error bodies can echo credentials or the spoken text.+ throw refusal(response.status, action);+ }+ return response;+}++async function readBounded(response: Response, max: number, action: "speech" | "transcription"): Promise<Uint8Array> {+ const declared = Number(response.headers.get("content-length") ?? 0);+ if (declared > max) {+ await response.body?.cancel().catch(() => {});+ throw new DeepSeekSpeechError(`DeepSeek returned too large a ${action} response.`);+ }+ const reader = response.body?.getReader();+ if (!reader) return new Uint8Array();+ const chunks: Uint8Array[] = [];+ let size = 0;+ try {+ for (;;) {+ const { done, value } = await reader.read();+ if (done) break;+ size += value.byteLength;+ if (size > max) {+ await reader.cancel().catch(() => {});+ throw new DeepSeekSpeechError(`DeepSeek returned too large a ${action} response.`);+ }+ chunks.push(value);+ }+ } catch (error) {+ if (error instanceof DeepSeekSpeechError) throw error;+ throw new DeepSeekSpeechError(`DeepSeek ${action} was interrupted. Try again.`);+ }+ if (declared && size !== declared) throw new DeepSeekSpeechError(`DeepSeek ${action} was interrupted. Try again.`);+ return Buffer.concat(chunks, size);+}++export interface WavInfo {+ format: number;+ channels: number;+ sampleRate: number;+ bitsPerSample: number;+ seconds: number;+}++/** A complete RIFF/WAVE file: a fmt chunk and a data chunk that fits in the bytes; otherwise undefined. */+export function readWav(bytes: Uint8Array): WavInfo | undefined {+ const view = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);+ const tag = (at: number) => String.fromCharCode(...bytes.subarray(at, at + 4));+ if (bytes.byteLength < 12 || tag(0) !== "RIFF" || tag(8) !== "WAVE") return undefined;+ let fmt: Omit<WavInfo, "seconds"> | undefined;+ for (let at = 12; at + 8 <= bytes.byteLength;) {+ const size = view.getUint32(at + 4, true);+ const body = at + 8;+ if (body + size > bytes.byteLength) return undefined;+ if (tag(at) === "fmt " && size >= 16) {+ fmt = {+ format: view.getUint16(body, true),+ channels: view.getUint16(body + 2, true),+ sampleRate: view.getUint32(body + 4, true),+ bitsPerSample: view.getUint16(body + 14, true),+ };+ } else if (tag(at) === "data") {+ if (!fmt || !fmt.channels || !fmt.sampleRate || !fmt.bitsPerSample || !size) return undefined;+ const frame = fmt.channels * Math.ceil(fmt.bitsPerSample / 8);+ if (size % frame) return undefined;+ return { ...fmt, seconds: size / frame / fmt.sampleRate };+ }+ at = body + size + (size % 2);+ }+ return undefined;+}++export async function synthesize(text: string, voiceId: string, key: string, signal?: AbortSignal): Promise<Audio> {+ if (!key) throw new DeepSeekSpeechError("Add a DeepSeek API key in Settings → API keys to use DeepSeek voice.", 409);+ if (!isDeepSeekVoice(voiceId)) throw new DeepSeekSpeechError("Choose Stella or Tide as the DeepSeek voice.", 409);+ const spoken = text.trim();+ if (!spoken) throw new DeepSeekSpeechError("There is no text to read aloud.", 400);+ if ([...spoken].length > TTS_MAX_CHARS) throw new DeepSeekSpeechError(`DeepSeek reads at most ${TTS_MAX_CHARS} characters at once.`, 413);+ const body = JSON.stringify({ text: spoken, voice_id: voiceId, format: "wav", filter_markdown: true });+ const response = await request("/tools/tts", {+ method: "POST",+ headers: { authorization: `Bearer ${key}`, "content-type": "application/json", accept: "audio/wav" },+ body,+ }, "speech", signal);+ const mime = (response.headers.get("content-type") ?? "").split(";")[0]!.trim().toLowerCase();+ if (mime !== "audio/wav" && mime !== "audio/x-wav" && mime !== "audio/wave") {+ await response.body?.cancel().catch(() => {});+ throw new DeepSeekSpeechError("DeepSeek returned an unexpected audio format. Try again later.");+ }+ const bytes = await readBounded(response, MAX_AUDIO_BYTES, "speech");+ if (!bytes.byteLength) throw new DeepSeekSpeechError("DeepSeek returned empty audio. Try again.");+ if (!readWav(bytes)) throw new DeepSeekSpeechError("DeepSeek returned incomplete audio. Try again.");+ return { bytes, mime: "audio/wav" };+}++export async function transcribe(audio: Uint8Array, key: string, signal?: AbortSignal): Promise<string> {+ if (!key) throw new DeepSeekSpeechError("Add a DeepSeek API key in Settings → API keys to dictate with DeepSeek.", 409);+ if (audio.byteLength > ASR_MAX_BYTES) throw new DeepSeekSpeechError("DeepSeek hears at most 8 MiB of audio at once.", 413);+ const wav = readWav(audio);+ if (!wav || wav.format !== 1 || wav.bitsPerSample !== 16) throw new DeepSeekSpeechError("DeepSeek needs a 16-bit PCM WAV recording.", 400);+ if (wav.seconds > ASR_MAX_SECONDS) throw new DeepSeekSpeechError(`DeepSeek hears at most ${ASR_MAX_SECONDS} seconds at once.`, 413);+ const form = new FormData();+ form.append("file", new Blob([audio as Uint8Array<ArrayBuffer>], { type: "audio/wav" }), "speech.wav");+ const response = await request("/tools/asr", {+ method: "POST",+ headers: { authorization: `Bearer ${key}`, accept: "application/json" },+ body: form,+ }, "transcription", signal);+ const raw = await readBounded(response, MAX_JSON_BYTES, "transcription");+ let json: unknown;+ try {+ json = JSON.parse(Buffer.from(raw).toString("utf8"));+ } catch {+ json = undefined;+ }+ const parsed = transcriptSchema.safeParse(json);+ if (!parsed.success) throw new DeepSeekSpeechError("DeepSeek returned an unexpected transcription. Try again later.");+ return parsed.data.text.trim();+}diff --git a/server/tts/errors.ts b/server/tts/errors.tsindex 29d142b985..ea1c793a43 100644--- a/server/tts/errors.ts+++ b/server/tts/errors.ts@@ -1,10 +1,12 @@import { NoVoiceConfigured } from "./index.ts";+import { DeepSeekSpeechError } from "./deepseek.ts";import { OpenAiVoiceError } from "./openai.ts";export function voiceFailure(error: unknown) {if (error instanceof OpenAiVoiceError) {return { status: error.errorKey === "voice.openai.error.key" ? 409 : 502, body: { error: error.message, errorKey: error.errorKey } };}+ if (error instanceof DeepSeekSpeechError) return { status: error.status === 499 ? 502 : error.status, body: { error: error.message } };if (error instanceof NoVoiceConfigured) return { status: 409, body: { error: error.message } };return undefined;}diff --git a/server/tts/index.ts b/server/tts/index.tsindex 9e90c82ed5..20665dbd7d 100644--- a/server/tts/index.ts+++ b/server/tts/index.ts@@ -6,9 +6,10 @@ import * as openai from "./openai.ts";import * as grok from "./grok.ts";import * as fish from "./fish.ts";import * as gemini from "./gemini.ts";+import * as deepseek from "./deepseek.ts";import * as systemVoices from "./system-voices.ts";-export type VoiceProvider = "elevenlabs" | "fish" | "system" | "chatterbox" | "xai" | "gemini" | "openai";+export type VoiceProvider = "elevenlabs" | "fish" | "system" | "chatterbox" | "xai" | "gemini" | "openai" | "deepseek";export class NoVoiceConfigured extends Error {// Not a parameter property: the harness runs under strip-only `node --experimental-strip-types`, which rejects one at load.@@ -26,6 +27,8 @@ export class NoVoiceConfigured extends Error {}const elevenLabs = (cfg: AppConfig) => voiceCredential(cfg.tts?.key);+/** A bot's voice from another provider's catalog speaks in the workspace's DeepSeek voice. */+const deepseekVoice = (cfg: AppConfig, voiceId?: string) => (deepseek.isDeepSeekVoice(voiceId) ? voiceId : cfg.tts?.voice ?? "");/*** Resolves the active voice synthesis provider from configuration.@@ -34,7 +37,7 @@ const elevenLabs = (cfg: AppConfig) => voiceCredential(cfg.tts?.key);*/export function voiceProvider(cfg: AppConfig): VoiceProvider {const provider = cfg.tts?.provider;- return provider === "gemini" || provider === "openai" || provider === "xai" || provider === "fish" || provider === "system" || provider === "chatterbox" ? provider : "elevenlabs";+ return provider === "deepseek" || provider === "gemini" || provider === "openai" || provider === "xai" || provider === "fish" || provider === "system" || provider === "chatterbox" ? provider : "elevenlabs";}/**@@ -46,6 +49,7 @@ export function providerConfigured(cfg: AppConfig): boolean {const provider = voiceProvider(cfg);if (provider === "gemini") return Boolean(cfg.tts?.geminiKey);if (provider === "openai") return Boolean(cfg.openai?.key);+ if (provider === "deepseek") return Boolean(cfg.deepseek?.key);if (provider === "xai") return Boolean(cfg.xai?.key);if (provider === "system") return systemVoices.systemVoicesAvailable();if (provider === "chatterbox") return Boolean(cfg.tts?.baseUrl?.trim());@@ -62,6 +66,7 @@ export function voiceConfigured(cfg: AppConfig): boolean {const provider = voiceProvider(cfg);if (provider === "gemini") return Boolean(cfg.tts?.geminiKey && gemini.isSupportedVoice(cfg.tts?.voice));if (provider === "openai") return Boolean(cfg.openai?.key && cfg.tts?.voice);+ if (provider === "deepseek") return Boolean(cfg.deepseek?.key && deepseek.isDeepSeekVoice(cfg.tts?.voice));if (provider === "xai") return Boolean(cfg.xai?.key && cfg.tts?.voice);if (provider === "system") {return systemVoices.systemVoicesAvailable() && Boolean(cfg.tts?.voice);@@ -81,6 +86,7 @@ export function voiceReady(cfg: AppConfig, voiceId?: string): boolean {const provider = voiceProvider(cfg);if (provider === "gemini") return Boolean(cfg.tts?.geminiKey && gemini.isSupportedVoice(voiceId || cfg.tts?.voice));if (provider === "openai") return Boolean(cfg.openai?.key && (voiceId || cfg.tts?.voice));+ if (provider === "deepseek") return Boolean(cfg.deepseek?.key && deepseek.isDeepSeekVoice(deepseekVoice(cfg, voiceId)));if (provider === "xai") return Boolean(cfg.xai?.key && (voiceId || cfg.tts?.voice));if (provider === "system") {return systemVoices.systemVoicesAvailable() && Boolean(voiceId || cfg.tts?.voice);@@ -138,6 +144,7 @@ export async function listVoices(const provider = voiceProvider(cfg);if (provider === "gemini") return cfg.tts?.geminiKey ? gemini.listVoices() : [];if (provider === "openai") return cfg.openai?.key ? openai.listVoices() : [];+ if (provider === "deepseek") return cfg.deepseek?.key ? deepseek.listVoices() : [];if (provider === "xai") return cfg.xai?.key ? grok.listVoices(cfg.xai.key) : [];if (provider === "system") return systemVoices.listSystemVoices(run);if (provider === "chatterbox") {@@ -185,6 +192,7 @@ export function speak(cfg: AppConfig, text: string, voiceId?: string, run?: systreturn gemini.synthesize(text, voice, key, cfg.tts?.model);}if (provider === "openai") return openai.synthesize(text, voiceId || cfg.tts?.voice || "", cfg.openai?.key || "", signal);+ if (provider === "deepseek") return deepseek.synthesize(text, deepseekVoice(cfg, voiceId), cfg.deepseek?.key || "", signal);if (provider === "xai") {const key = cfg.xai?.key;if (!key) throw new NoVoiceConfigured("key", "Add an xAI key in Settings to use Grok voice.");diff --git a/server/user-errors.ts b/server/user-errors.tsindex 94a0aaa9f8..917c7ddf52 100644--- a/server/user-errors.ts+++ b/server/user-errors.ts@@ -219,6 +219,7 @@ export const USER_ERROR = {"serverError.mailbox.adminOnly": "Only the owner or an admin can manage the mailboxes.","serverError.mailbox.addressAndPassword": "Enter your email address and password.","serverError.mailbox.outgoingFields": "Check the outgoing server: a name like mail.example.com, a port from 1 to 65535, and SSL/TLS or STARTTLS.",+ "serverError.voice.deepseekKeyRequired": "Add a DeepSeek API key in Settings → API keys to talk to your bots with DeepSeek voice.","serverError.voice.fishKeyRequired": "Add a Fish Audio or ElevenLabs key in Settings → API keys to talk to your bots here.","serverError.voice.fishTranscribeConnection": "Couldn't reach Fish Audio to hear you — check your connection.","serverError.voice.elevenLabsTranscribeConnection": "Couldn't reach ElevenLabs to hear you — check your connection.",diff --git a/shared/deepseek-voice.ts b/shared/deepseek-voice.tsnew file mode 100644index 0000000000..6a64294c11--- /dev/null+++ b/shared/deepseek-voice.ts@@ -0,0 +1,6 @@+/** DeepSeek TTS voice ids: Stella (female) and Tide (male). */+export const DEEPSEEK_VOICES = ["stella", "tide"] as const;+export type DeepSeekVoice = (typeof DEEPSEEK_VOICES)[number];+export const DEFAULT_DEEPSEEK_VOICE: DeepSeekVoice = "stella";+/** The page recorder's cap for one DeepSeek clip: under ASR's 120-second limit with room for a 64 ms frame. */+export const DEEPSEEK_RECORDING_MAX_MS = 115_000;diff --git a/src/components/CallView.availability.test.ts b/src/components/CallView.availability.test.tsindex 3afc4d9d5b..c2e60af3f8 100644--- a/src/components/CallView.availability.test.ts+++ b/src/components/CallView.availability.test.ts@@ -31,7 +31,7 @@ describe("call capability guidance", () => {available: true,engine: "apple-speech",onDevice: true,- }), true, false)).toBeNull();+ }), true, null)).toBeNull();});it("says where taking turns works on a server's page in the Mac app, with no trip there", () => {@@ -40,7 +40,7 @@ describe("call capability guidance", () => {engine: "none",onDevice: false,reasonCode: "remote-server",- }), false, false);+ }), false, null);expect(help).toEqual({label: "Calls where you take turns work with bots on this Mac",reason: "They listen with your Mac's own speech recognition, which only bots on this Mac can use.",@@ -54,7 +54,7 @@ describe("call capability guidance", () => {engine: "none",onDevice: false,reasonCode: "remote-server",- }, platform), false, false);+ }, platform), false, null);expect(help).toEqual({label: "Calls where you take turns work with bots on this computer",reason: "They listen from this computer's own window, so only bots on this computer can use them.",@@ -67,7 +67,7 @@ describe("call capability guidance", () => {engine: "none",onDevice: false,reasonCode: "desktop-app-required",- }, "other"), false, false);+ }, "other"), false, null);expect(help).toEqual({label: "Calls where you take turns need the desktop app",reason: "They listen from this computer, so they need MausBot on a Mac, Windows or Linux computer.",@@ -80,18 +80,18 @@ describe("call capability guidance", () => {engine: "none",onDevice: false,reasonCode: "unsupported-platform",- }, "win32"), false, false);+ }, "win32"), false, null);expect(help?.label).toBe("Calls where you take turns need the desktop app");expect(help).not.toHaveProperty("action");});it("keeps Take turns off on Windows until a Fish Audio key is saved, and says where to add one", () => {const fish = capabilities({ available: true, engine: "fish-audio", onDevice: false }, "win32");- expect(callCapabilityHelp(fish, true, false)).toEqual({+ expect(callCapabilityHelp(fish, true, "fish")).toEqual({label: "Add a Fish Audio or ElevenLabs key to take turns on calls",reason: "On this computer, Take turns hears you through Fish Audio or ElevenLabs speech-to-text. Add either key in Settings → API keys.",});- expect(callCapabilityHelp(fish, true, true)).toBeNull();+ expect(callCapabilityHelp(fish, true, null)).toBeNull();});it("distinguishes a broken local speech service from an unsupported device", () => {@@ -99,7 +99,7 @@ describe("call capability guidance", () => {available: true,engine: "apple-speech",onDevice: true,- }), false, false)).toEqual({+ }), false, null)).toEqual({label: "Calls aren't available right now",reason: "The speech service is unavailable in this app build. Restart or update MausBot.",});diff --git a/src/components/CallView.tsx b/src/components/CallView.tsxindex 3449f71afc..6c8825aba4 100644--- a/src/components/CallView.tsx+++ b/src/components/CallView.tsx@@ -27,7 +27,7 @@ import { callStarted } from "@/lib/product-events";import { useDesktopCapabilities } from "./DesktopCapabilities";import { callCapabilityHelp, type CallCapabilityHelp } from "@/lib/call-capability";import { onCallStartRequest } from "@/lib/call-start-request";-import { CALL_ENDPOINT_MS, fishListeningReady, listensHere, speechBridge } from "@/lib/speech";+import { CALL_ENDPOINT_MS, listensHere, missingListenKey, speechBridge } from "@/lib/speech";import { VoiceSetupDialog } from "./VoiceSetupDialog";import { openBotSettings } from "./bot-panel/panel-link";import { MENU_SHEET } from "./menu-recipe";@@ -102,7 +102,7 @@ export function CallTargetButton({const active = onCall || onLiveCall;const remoteClient = globalThis.window?.ogb?.remoteClient?.active === true;const capabilityHelp = capabilitiesReady- ? callCapabilityHelp(capabilities, Boolean(speechBridge()?.speechStart), fishListeningReady(state.config))+ ? callCapabilityHelp(capabilities, Boolean(speechBridge(state.config)?.speechStart), missingListenKey(capabilities, state.config)): null;const supported = capabilitiesReady && !capabilityHelp;const localVoice = localSystemVoiceActive();@@ -467,13 +467,15 @@ export function CallOverlay({ bot }: { bot: Bot }) {}function Call({ bot }: { bot: Bot }) {- const { dispatch } = useStore();+ const { state, dispatch } = useStore();+ // One bridge for the whole call: a voice change mid-call must not stop or hear through another.+ const [bridge] = useState(() => speechBridge(state.config));const speech = useSpeech();const initialPhase: Phase = bot.busy ? "working" : "listening";const [phase, setPhase] = useState<Phase>(initialPhase);const [heard, setHeard] = useState("");const [note, setNote] = useState<string | null>(null);- const pushToTalk = usePushToTalk(bot.id, phase === "listening", () => {+ const pushToTalk = usePushToTalk(bot.id, bridge, phase === "listening", () => {setNote(t("call.turns.pushToTalkFailed"));});@@ -513,20 +515,20 @@ function Call({ bot }: { bot: Bot }) {}, []);const hush = useCallback(() => {- void speechBridge()?.speechStop();- }, []);+ void bridge?.speechStop();+ }, [bridge]);const listen = useCallback(() => {if (!alive.current || currentCall() !== bot.id) return;move("listening");setHeard("");setNote(null);- void speechBridge()?.speechStart({ endpointMs: CALL_ENDPOINT_MS }).catch(() => {+ void bridge?.speechStart({ endpointMs: CALL_ENDPOINT_MS }).catch(() => {if (alive.current && currentCall() === bot.id) {setNote(t("call.turns.micFailed"));}});- }, [bot.id, move]);+ }, [bridge, bot.id, move]);const say = useCallback(async (text: string) => {@@ -561,7 +563,6 @@ function Call({ bot }: { bot: Bot }) {}, [bot.id]);useEffect(() => {- const bridge = speechBridge();if (!bridge) return;const offTranscript = bridge.onSpeechTranscript((line) => {if (!alive.current || currentCall() !== bot.id || phaseRef.current !== "listening") return;@@ -659,10 +660,10 @@ function Call({ bot }: { bot: Bot }) {return () => {offTranscript();offEnd();- void speechBridge()?.speechStop();+ void bridge.speechStop();};// eslint-disable-next-line react-hooks/exhaustive-deps- }, [bot.id, bot.threadId, dispatch, hush, listen, move, sayThenListen]);+ }, [bot.id, bot.threadId, bridge, dispatch, hush, listen, move, sayThenListen]);useEffect(() => {// The card may be resolved elsewhere (the approval UI, another client) while this call is open.diff --git a/src/components/ComposerPlusMenu.tsx b/src/components/ComposerPlusMenu.tsxindex 90ca42cddf..f5037219cd 100644--- a/src/components/ComposerPlusMenu.tsx+++ b/src/components/ComposerPlusMenu.tsx@@ -11,7 +11,7 @@ import {import { useAdvancedMode } from "@/lib/interface-mode";import { CALL_MODES, effectiveCallMode, useCallMode } from "@/lib/call-mode";import { callCapabilityHelp } from "@/lib/call-capability";-import { fishListeningReady, listensHere, speechBridge } from "@/lib/speech";+import { listensHere, missingListenKey, speechBridge } from "@/lib/speech";import { requestCallStart } from "@/lib/call-start-request";import { useOnCall } from "@/lib/call";import { isLiveCallRunning, useLiveMedia } from "@/lib/live-call-media";@@ -188,7 +188,7 @@ export function ComposerPlusMenu({ onAttach, goal, teach, approval, callBotId, econst media = useLiveMedia();const turnsHere = !ready || listensHere(capabilities, state.config);const callMode = effectiveCallMode(storedMode, { turnsHere, canLive: true });- const turnsHelp = turnsHere ? null : callCapabilityHelp(capabilities, Boolean(speechBridge()?.speechStart), fishListeningReady(state.config));+ const turnsHelp = turnsHere ? null : callCapabilityHelp(capabilities, Boolean(speechBridge(state.config)?.speechStart), missingListenKey(capabilities, state.config));// As the call button, which hides while Live is the mode and its line is held on another device.const lineHeldElsewhere = callMode === "live" && liveLineHeldElsewhere(media, state.liveCall);const calling = callBotId !== undefined && (onCall === callBotId || isLiveCallRunning(media.phase) || lineHeldElsewhere);diff --git a/src/components/GroupCallView.tsx b/src/components/GroupCallView.tsxindex ad13d163ec..000dda7eba 100644--- a/src/components/GroupCallView.tsx+++ b/src/components/GroupCallView.tsx@@ -70,14 +70,16 @@ function questionIn(messages: Message[]): Message | undefined {}function GroupCall({ group, members }: { group: Group; members: Bot[] }) {- const { dispatch } = useStore();+ const { state, dispatch } = useStore();+ // One bridge for the whole call: a voice change mid-call must not stop or hear through another.+ const [bridge] = useState(() => speechBridge(state.config));const speech = useSpeech();const initialPhase: Phase = group.working || group.busyBotId ? "working" : "listening";const [phase, setPhase] = useState<Phase>(initialPhase);const [heard, setHeard] = useState("");const [note, setNote] = useState<string | null>(null);const [speakingMemberId, setSpeakingMemberId] = useState<string | null>(null);- const pushToTalk = usePushToTalk(group.id, phase === "listening", () => {+ const pushToTalk = usePushToTalk(group.id, bridge, phase === "listening", () => {setNote(t("call.turns.pushToTalkFailed"));});@@ -123,8 +125,8 @@ function GroupCall({ group, members }: { group: Group; members: Bot[] }) {}, []);const hush = useCallback(() => {- void speechBridge()?.speechStop();- }, []);+ void bridge?.speechStop();+ }, [bridge]);const listen = useCallback(() => {if (!alive.current || currentCall() !== group.id) return;@@ -132,12 +134,12 @@ function GroupCall({ group, members }: { group: Group; members: Bot[] }) {setSpeakingMemberId(null);setHeard("");setNote(null);- void speechBridge()?.speechStart({ endpointMs: CALL_ENDPOINT_MS }).catch(() => {+ void bridge?.speechStart({ endpointMs: CALL_ENDPOINT_MS }).catch(() => {if (alive.current && currentCall() === group.id) {setNote(t("call.turns.micFailed"));}});- }, [group.id, move]);+ }, [bridge, group.id, move]);const scheduleListen = useCallback((force = false, delay = 140) => {@@ -215,7 +217,6 @@ function GroupCall({ group, members }: { group: Group; members: Bot[] }) {}, [group.id]);useEffect(() => {- const bridge = speechBridge();if (!bridge) return;const offTranscript = bridge.onSpeechTranscript((line) => {if (!alive.current || currentCall() !== group.id || phaseRef.current !== "listening") return;@@ -337,10 +338,10 @@ function GroupCall({ group, members }: { group: Group; members: Bot[] }) {return () => {offTranscript();offEnd();- void speechBridge()?.speechStop();+ void bridge.speechStop();};// eslint-disable-next-line react-hooks/exhaustive-deps- }, [dispatch, enqueueSpeech, group.id, group.threadId, hush, listen, move, scheduleListen]);+ }, [bridge, dispatch, enqueueSpeech, group.id, group.threadId, hush, listen, move, scheduleListen]);useEffect(() => {let resumeAfterRoutine = false;diff --git a/src/components/VoiceSettings.test.ts b/src/components/VoiceSettings.test.tsindex 003d2010a9..f56c3c908c 100644--- a/src/components/VoiceSettings.test.ts+++ b/src/components/VoiceSettings.test.ts@@ -83,13 +83,13 @@ describe("VoiceSettings", () => {expect(onPatch).not.toHaveBeenCalled();});- it("lays the seven voice services out four to a row, OpenAI beside the other online services", async () => {+ it("lays the eight voice services out four to a row, OpenAI beside the other online services", async () => {fixture.api.mockResolvedValue({ voices: [] });await render(bot("pepper"), vi.fn());const radios = [...host.querySelectorAll<HTMLElement>('[role="radiogroup"] [role="radio"]')];- expect(radios.map((radio) => radio.textContent)).toEqual(["ElevenLabs", "Fish Audio", "OpenAI", "Grok (xAI)", "Gemini", "Built-in Mac voices", "Chatterbox (local)"]);+ expect(radios.map((radio) => radio.textContent)).toEqual(["ElevenLabs", "Fish Audio", "OpenAI", "Grok (xAI)", "Gemini", "Built-in Mac voices", "Chatterbox (local)", "DeepSeek"]);expect(radios.map((radio) => radio.className.match(/col-span-\d/)?.[0])).toEqual([- "col-span-1", "col-span-1", "col-span-1", "col-span-1", "col-span-1", "col-span-1", "col-span-1",+ "col-span-1", "col-span-1", "col-span-1", "col-span-1", "col-span-1", "col-span-1", "col-span-1", "col-span-1",]);});});@@ -137,6 +137,51 @@ describe("OpenAI voice settings", () => {});+describe("DeepSeek voice settings", () => {+ const deepseekRadio = () => [...host.querySelectorAll<HTMLButtonElement>('[role="radio"]')].find((radio) => radio.textContent === "DeepSeek")!;+ const STELLA_TIDE = { voices: [{ id: "stella", label: "Stella (female)" }, { id: "tide", label: "Tide (male)" }] };++ it("chooses Stella for a bot whose voice belongs to another service", async () => {+ fixture.api.mockResolvedValue({ tts: { provider: "deepseek", configured: true }, voices: [] });+ const onPatch = vi.fn();+ await render({ ...bot("pepper"), voice: "elevenlabs-voice" }, onPatch);+ await act(async () => deepseekRadio().click());+ expect(fixture.api).toHaveBeenCalledWith("/api/config", { method: "PUT", body: JSON.stringify({ tts: { provider: "deepseek" } }) });+ expect(onPatch).toHaveBeenCalledExactlyOnceWith({ voice: "stella" });+ });++ it("keeps a saved Tide choice", async () => {+ fixture.api.mockResolvedValue({ voices: [] });+ const onPatch = vi.fn();+ await render({ ...bot("pepper"), voice: "tide" }, onPatch);+ await act(async () => deepseekRadio().click());+ expect(onPatch).not.toHaveBeenCalled();+ });++ it("offers Stella and Tide and saves the pick", async () => {+ fixture.config = { tts: { provider: "deepseek", configured: true, ready: true, voice: "stella" } };+ fixture.api.mockResolvedValue(STELLA_TIDE);+ const onPatch = vi.fn();+ await render({ ...bot("pepper"), voice: "stella" }, onPatch);+ const picker = host.querySelector<HTMLSelectElement>("select[data-voice-picker]")!;+ expect([...picker.options].map((option) => option.textContent)).toEqual(expect.arrayContaining(["Stella (female)", "Tide (male)"]));+ expect(picker.value).toBe("stella");+ await act(async () => { picker.value = "tide"; picker.dispatchEvent(new Event("change", { bubbles: true })); });+ expect(onPatch).toHaveBeenCalledWith({ voice: "tide" });+ });++ it("points a missing key at the existing DeepSeek key, says it also listens, and asks for no second key", async () => {+ fixture.config = { tts: { provider: "deepseek", configured: false } };+ fixture.api.mockResolvedValue({ voices: [] });+ await render(bot("pepper"), vi.fn());+ expect(host.textContent).toContain("Add a DeepSeek API key");+ expect(host.textContent).toContain("speech-to-text");+ expect(host.querySelector("[data-keys-link=\"deepseek\"]")).not.toBeNull();+ expect(host.querySelector('input[type="password"]')).toBeNull();+ });+});++it("sets the default voice even when the provider broadcast arrives before the save response", async () => {let resolve!: (v: unknown) => void;fixture.api.mockImplementation((path) => path === "/api/config" ? new Promise((done) => { resolve = done; }) : Promise.resolve({ voices: [] }));diff --git a/src/components/VoiceSettings.tsx b/src/components/VoiceSettings.tsxindex 82adc81253..48f5ebf3af 100644--- a/src/components/VoiceSettings.tsx+++ b/src/components/VoiceSettings.tsx@@ -1,5 +1,6 @@// Security: the harness holds the cloud provider keys; the renderer never talks to ElevenLabs or Fish Audio itself.import { DEFAULT_OPENAI_VOICE, OPENAI_VOICES } from "../../shared/openai-voice";+import { DEFAULT_DEEPSEEK_VOICE, DEEPSEEK_VOICES } from "../../shared/deepseek-voice";import { useEffect, useRef, useState } from "react";import { Check, Loader2, Volume2 } from "lucide-react";@@ -100,6 +101,7 @@ export function VoiceSettings({: provider === "chatterbox"? t("voice.hostLabel", { provider: t("voice.chatterboxLabel") }): provider === "openai" ? t("voice.hostLabel", { provider: "OpenAI" })+ : provider === "deepseek" ? t("voice.hostLabel", { provider: "DeepSeek" }): provider === "xai" ? t("voice.grok.host") : t("voice.host");const systemVoicesAvailable = capabilities.host.platform === "darwin";const hostConfigured = Boolean(tts?.configured);@@ -206,7 +208,7 @@ export function VoiceSettings({.finally(() => current() && setAddingVoice(null));};- const setProvider = (next: "elevenlabs" | "fish" | "system" | "chatterbox" | "xai" | "gemini" | "openai") => {+ const setProvider = (next: NonNullable<NonNullable<ConfigStatus["tts"]>["provider"]>) => {if (next === provider || switching || (next === "system" && !systemVoicesAvailable)) return;setSwitching(true);setKeyDraft({ provider: null, value: "" });@@ -216,6 +218,9 @@ export function VoiceSettings({if (next === "openai" && currentBot.current.id === bot.id && !OPENAI_VOICES.some((voice) => voice === currentBot.current.voice)) {onPatch({ voice: DEFAULT_OPENAI_VOICE });}+ if (next === "deepseek" && currentBot.current.id === bot.id && !DEEPSEEK_VOICES.some((voice) => voice === currentBot.current.voice)) {+ onPatch({ voice: DEFAULT_DEEPSEEK_VOICE });+ }dispatch({ type: "configStatus", config: status });}).catch((e: Error) => setError(e.message))@@ -272,7 +277,7 @@ export function VoiceSettings({const selectedVoice = usesLocalSystem ? deviceVoice : (bot.voice ?? "");const ready = usesLocalSystem || (hostConfigured && Boolean(selectedVoice || tts.voice));const selectedDescription = voices.find((voice) => voice.id === selectedVoice)?.description;- const providerName = cloudProvider?.name ?? (provider === "xai" ? "Grok" : provider === "chatterbox" ? "Chatterbox" : t("voice.macBuiltIn"));+ const providerName = cloudProvider?.name ?? (provider === "xai" ? "Grok" : provider === "chatterbox" ? "Chatterbox" : provider === "deepseek" ? "DeepSeek" : t("voice.macBuiltIn"));const everyReply = bot.voiceNoteEveryReply ?? tts?.everyReply === true;return (@@ -290,6 +295,8 @@ export function VoiceSettings({: ` ${t("voice.macUnavailable")}`: provider === "xai"? ` ${t("voice.grok.sharedKey")}`+ : provider === "deepseek"+ ? ` ${t("voice.deepseek.sharedKey")}`: provider === "chatterbox"? ` ${t("voice.chatterboxShared")}`: ` ${t("voice.providerShared", { provider: cloudProvider?.name ?? t("voice.provider") })}`}</>}@@ -335,6 +342,7 @@ export function VoiceSettings({{ value: "gemini", label: "Gemini", available: true, span: "col-span-1" },{ value: "system", label: t("voice.macBuiltIn"), available: systemVoicesAvailable, span: "col-span-1" },{ value: "chatterbox", label: t("voice.chatterboxLocal"), available: true, span: "col-span-1" },+ { value: "deepseek", label: "DeepSeek", available: true, span: "col-span-1" },] as const).map((option) => (<buttonkey={option.value}@@ -423,6 +431,13 @@ export function VoiceSettings({</div>)}+ {provider === "deepseek" && (+ <div className="mt-4 space-y-1.5 text-[13px] leading-relaxed text-ink-secondary">+ <p>{t("voice.deepseek.description")}</p>+ {!hostConfigured && <p>{t("voice.deepseek.missingKey")} <KeysLink id="deepseek" /></p>}+ </div>+ )}+{provider === "xai" && (<p className="mt-4 text-[13px] text-ink-secondary">{hostConfigured ? t("voice.grok.ready") : <>{t("voice.grok.missingKey")} <KeysLink id="xai" /></>}@@ -534,7 +549,7 @@ export function VoiceSettings({)}{voices.map((v) => (<option key={v.id} value={v.id}>- {v.label}+ {provider !== "deepseek" ? v.label : v.id === "stella" ? t("voice.deepseek.stella") : v.id === "tide" ? t("voice.deepseek.tide") : v.label}</option>))}</Select>diff --git a/src/components/bot-panel/SettingsPage.tsx b/src/components/bot-panel/SettingsPage.tsxindex 445f6cca81..c336adf801 100644--- a/src/components/bot-panel/SettingsPage.tsx+++ b/src/components/bot-panel/SettingsPage.tsx@@ -6,7 +6,7 @@ import { t } from "@/lib/i18n";import { mcpServersForBot, useMcpServers } from "@/lib/mcp-servers";import { CALL_MODES, callModeHint, effectiveCallMode, setCallMode, useCallMode, type CallMode } from "@/lib/call-mode";import { callCapabilityHelp } from "@/lib/call-capability";-import { fishListeningReady, listensHere, speechBridge } from "@/lib/speech";+import { listensHere, missingListenKey, speechBridge } from "@/lib/speech";import { requestNotificationPermission } from "@/lib/notify";import { firstSentence } from "@/lib/soul";import { currentTaskBot, useStore, type Bot } from "@/state/store";@@ -82,7 +82,7 @@ export function SettingsPage({ bot, derived, onOpen, editingInstructions = false// As the call button: where this device cannot listen in turns, a call is always Live.const turnsHere = !ready || listensHere(capabilities, state.config);const callMode = effectiveCallMode(storedCallMode, { turnsHere, canLive: true });- const turnsHelp = turnsHere ? null : callCapabilityHelp(capabilities, Boolean(speechBridge()?.speechStart), fishListeningReady(state.config));+ const turnsHelp = turnsHere ? null : callCapabilityHelp(capabilities, Boolean(speechBridge(state.config)?.speechStart), missingListenKey(capabilities, state.config));const callOptions: SegmentOption<CallMode>[] = CALL_MODES.map((entry) => ({value: entry.id,label: t(entry.label),diff --git a/src/components/keys/key-catalog.ts b/src/components/keys/key-catalog.tsindex 448a2a5374..ae8968f0bf 100644--- a/src/components/keys/key-catalog.ts+++ b/src/components/keys/key-catalog.ts@@ -116,7 +116,7 @@ export const KEY_CATALOG: readonly KeyEntry[] = [words: ["meta", "muse", "llama"], mark: provider("meta", "meta"), kind: "key",target: providerKey("meta", { slot: "metaApiKey", placeholder: "LLM|…", href: "https://dev.meta.ai/docs/authentication", test: "meta", analytics: "meta", shape: /^LLM\|/ }) },{ id: "deepseek", section: "ai", labelKey: "keys.deepseek.label", purposeKey: "keys.purpose.deepseek", name: "DeepSeek", env: ["OMB_DEEPSEEK_API_KEY"],- words: ["deepseek", "dsh", "harness"], mark: provider("deepseekAgent", "deepseek"), kind: "key",+ words: ["deepseek", "dsh", "harness", "voice", "speech", "dictation"], mark: provider("deepseekAgent", "deepseek"), kind: "key",target: providerKey("deepseek", { slot: "deepseekApiKey", placeholder: "sk-…", href: "https://platform.deepseek.com/api_keys", analytics: "deepseek" }) },{ id: "opencodeGo", section: "ai", labelKey: "keys.opencode.label", purposeKey: "keys.purpose.opencodeGo", name: "OpenCode", env: ["OPENCODE_API_KEY"],words: ["opencode", "zen", "go"], mark: provider("opencodeGo"), kind: "key",diff --git a/src/lib/analytics-allowlist.ts b/src/lib/analytics-allowlist.tsindex 1874563558..45e2b364d0 100644--- a/src/lib/analytics-allowlist.ts+++ b/src/lib/analytics-allowlist.ts@@ -78,7 +78,7 @@ export type ConnectorResult = (typeof CONNECTOR_RESULT)[number];export const CALL_MODE = ["turns", "live"] as const;export const ROOM_MODE = ["chat", "goal"] as const;export const CLOUD_COMPUTER_SOURCE = ["own_key", "included", "none"] as const;-export const VOICE = ["elevenlabs", "fish", "system", "chatterbox", "xai", "gemini", "openai", "none"] as const;+export const VOICE = ["elevenlabs", "fish", "system", "chatterbox", "xai", "gemini", "openai", "deepseek", "none"] as const;export const DECIDER = ["jev", "openrouter", "off"] as const;export const CONNECTORS_MODE = ["managed", "self_hosted", "unavailable"] as const;export const LOCAL_VM_MODE = ["shared", "per_bot", "pool"] as const;diff --git a/src/lib/call-capability.ts b/src/lib/call-capability.tsindex 11632f4017..0ed10d5ffc 100644--- a/src/lib/call-capability.ts+++ b/src/lib/call-capability.ts@@ -15,6 +15,11 @@ const turnsNeedFishKey = (): CallCapabilityHelp => ({reason: t("call.capability.turnsNeedFishKeyReason"),});+const turnsNeedDeepSeekKey = (): CallCapabilityHelp => ({+ label: t("call.capability.turnsNeedDeepSeekKey"),+ reason: t("call.capability.turnsNeedDeepSeekKeyReason"),+});+const turnsOnThisComputerAnyOs = (): CallCapabilityHelp => ({label: t("call.capability.turnsOnThisComputerAnyOs"),reason: t("call.capability.turnsOnThisComputerAnyOsReason"),@@ -28,7 +33,7 @@ const turnsOnThisComputer = (): CallCapabilityHelp => ({export function callCapabilityHelp(capabilities: DesktopCapabilities,speechServiceAvailable: boolean,- fishKeySaved: boolean,+ missingKey: "fish" | "deepseek" | null,): CallCapabilityHelp | null {if (!capabilities.dictation.available) {switch (capabilities.dictation.reasonCode) {@@ -44,7 +49,8 @@ export function callCapabilityHelp(};}}- if (capabilities.dictation.engine === "fish-audio" && !fishKeySaved) return turnsNeedFishKey();+ if (missingKey === "fish") return turnsNeedFishKey();+ if (missingKey === "deepseek") return turnsNeedDeepSeekKey();if (!speechServiceAvailable) {return {label: t("call.capability.serviceUnavailable"),diff --git a/src/lib/call.ts b/src/lib/call.tsindex 4ba61eedad..fb42284ee2 100644--- a/src/lib/call.ts+++ b/src/lib/call.ts@@ -1,7 +1,7 @@// Read by the SSE fold too: auto-speak stands down for the bot on a call, or the two deadlock over the speaker.import { useSyncExternalStore } from "react";-import { speechBridge } from "./speech";+import { stopListening } from "./speech";import { speaker } from "./tts";let current: string | null = null;@@ -19,7 +19,7 @@ export function startCall(targetId: string) {if (current === targetId) return;// Silence both halves before ownership changes: the old overlay may not unmount until React's next render.speaker.stop();- void speechBridge()?.speechStop?.();+ stopListening();current = targetId;notify();}@@ -30,7 +30,7 @@ export function endCall(targetId?: string): boolean {if (current === null) return false;current = null;speaker.stop();- void speechBridge()?.speechStop?.();+ stopListening();notify();return true;}diff --git a/src/lib/fish-speech.ts b/src/lib/fish-speech.tsindex 06980b26e1..a28a097858 100644--- a/src/lib/fish-speech.ts+++ b/src/lib/fish-speech.ts@@ -3,9 +3,11 @@import { api, ApiError } from "@/state/api";import { t } from "./i18n";+/** `maxMs`: the longest one manual recording runs before it is heard; call turns keep their own cap. */+type StartOptions = { endpointMs?: number; maxMs?: number };export type SpeechBridge = Required<- Pick<NonNullable<Window["ogb"]>, "speechStart" | "speechStop" | "speechFinish" | "onSpeechTranscript" | "onSpeechEnd">->;+ Pick<NonNullable<Window["ogb"]>, "speechStop" | "speechFinish" | "onSpeechTranscript" | "onSpeechEnd">+> & { speechStart(options?: StartOptions): Promise<void> };type Line = Parameters<Parameters<SpeechBridge["onSpeechTranscript"]>[0]>[0];type End = Parameters<Parameters<SpeechBridge["onSpeechEnd"]>[0]>[0];@@ -29,8 +31,8 @@ export function rms(frame: Float32Array): number {export type Heard = "waiting" | "speaking" | "done";/** `endpointMs` set: quiet that long after speech ends the turn. Unset: only the cap ends it. */-export function createEndpointer(endpointMs: number | undefined, frameMs = FRAME_MS) {- const cap = endpointMs === undefined ? MANUAL_MAX_MS : CALL_TURN_MAX_MS;+export function createEndpointer(endpointMs: number | undefined, frameMs = FRAME_MS, manualMaxMs = MANUAL_MAX_MS) {+ const cap = endpointMs === undefined ? manualMaxMs : CALL_TURN_MAX_MS;let loud = 0;let quiet = 0;let elapsed = 0;@@ -192,7 +194,7 @@ export const fishSpeech: SpeechBridge = {}if (gen !== generation) return release(mic);const endpointed = options?.endpointMs !== undefined;- const hear = createEndpointer(options?.endpointMs);+ const hear = createEndpointer(options?.endpointMs, FRAME_MS, options?.maxMs);const clip = createClip();let announced = false;mic.processor.onaudioprocess = (event) => {diff --git a/src/lib/push-to-talk.ts b/src/lib/push-to-talk.tsindex f04aeeeac9..c0603d4a7f 100644--- a/src/lib/push-to-talk.ts+++ b/src/lib/push-to-talk.ts@@ -2,7 +2,7 @@ import { useEffect, useRef, useState } from "react";import { currentCall } from "./call";import { isMacPlatform } from "./keyboard-shortcuts";-import { speechBridge } from "./speech";+import type { speechBridge } from "./speech";type ModifierEvent = Pick<KeyboardEvent, "altKey" | "ctrlKey" | "code" | "repeat">;@@ -17,7 +17,7 @@ export function isPushToTalkPress(event: ModifierEvent): boolean {return modifier && event.altKey && event.ctrlKey && !event.repeat;}-export function usePushToTalk(targetId: string, enabled: boolean, onError: () => void): boolean {+export function usePushToTalk(targetId: string, bridge: ReturnType<typeof speechBridge>, enabled: boolean, onError: () => void): boolean {const [active, setActive] = useState(false);const held = useRef(false);const enabledRef = useRef(enabled);@@ -32,7 +32,6 @@ export function usePushToTalk(targetId: string, enabled: boolean, onError: () =>}, [enabled]);useEffect(() => {- const bridge = speechBridge();if (!bridge?.speechFinish) return;const finish = () => {@@ -75,7 +74,7 @@ export function usePushToTalk(targetId: string, enabled: boolean, onError: () =>window.removeEventListener("blur", onBlur);held.current = false;};- }, [targetId]);+ }, [bridge, targetId]);return active;}diff --git a/src/lib/speech.test.ts b/src/lib/speech.test.tsindex 8e6fa887d4..69d3c40a62 100644--- a/src/lib/speech.test.ts+++ b/src/lib/speech.test.ts@@ -1,8 +1,9 @@import { afterEach, describe, expect, it, vi } from "vitest";+import { DEEPSEEK_RECORDING_MAX_MS } from "../../shared/deepseek-voice";import type { ConfigStatus } from "@/state/store";import { cacheDesktopCapabilities, initialDesktopCapabilities } from "./desktop";import { createEndpointer, fishSpeech } from "./fish-speech";-import { CALL_ENDPOINT_MS, fishListeningReady, listensHere, speechBridge } from "./speech";+import { CALL_ENDPOINT_MS, fishListeningReady, listensHere, missingListenKey, recordsClips, speechBridge } from "./speech";const withDictation = (dictation: DesktopCapabilities["dictation"]): DesktopCapabilities =>({ ...initialDesktopCapabilities(), dictation });@@ -19,19 +20,61 @@ describe("speechBridge", () => {it("is the page's own Fish Audio listener where the engine is fish-audio", () => {vi.stubGlobal("window", { ogb: { speechStart: vi.fn() } });cacheDesktopCapabilities(withDictation(FISH));- expect(speechBridge()).toBe(fishSpeech);+ expect(speechBridge(null)).toBe(fishSpeech);});it("is the desktop app's helper everywhere else", () => {const ogb = { speechStart: vi.fn() };vi.stubGlobal("window", { ogb });cacheDesktopCapabilities(withDictation(APPLE));- expect(speechBridge()).toBe(ogb);+ expect(speechBridge(null)).toBe(ogb);});it("is nothing in a browser", () => {vi.stubGlobal("window", {});- expect(speechBridge()).toBeUndefined();+ expect(speechBridge(null)).toBeUndefined();+ });+});++describe("DeepSeek listening", () => {+ const deepseek = { tts: { provider: "deepseek" }, savedKeys: { fishAudioKey: { configured: true } } } as unknown as ConfigStatus;+ const deepseekSaved = { ...deepseek, deepseek: { configured: true } } as unknown as ConfigStatus;++ it("records in the page on the Mac too, instead of the native recognizer, while DeepSeek is the voice", () => {+ const ogb = { speechStart: vi.fn() };+ vi.stubGlobal("window", { ogb });+ cacheDesktopCapabilities(withDictation(APPLE));+ const bridge = speechBridge(deepseekSaved);+ expect(bridge).not.toBe(ogb);+ expect(recordsClips(bridge)).toBe(true);+ expect(speechBridge(savedFish)).toBe(ogb);+ expect(recordsClips(ogb as never)).toBe(false);+ });++ it("needs the DeepSeek key, not a Fish key, and still nothing where dictation is unavailable", () => {+ expect(listensHere(withDictation(APPLE), deepseek)).toBe(false);+ expect(missingListenKey(withDictation(APPLE), deepseek)).toBe("deepseek");+ expect(missingListenKey(withDictation(FISH), deepseek)).toBe("deepseek");+ expect(listensHere(withDictation(FISH), deepseekSaved)).toBe(true);+ expect(missingListenKey(withDictation(FISH), null)).toBe("fish");+ expect(listensHere(withDictation({ available: false, engine: "none", onDevice: false }), deepseekSaved)).toBe(false);+ vi.stubGlobal("window", {});+ expect(speechBridge(deepseekSaved)).toBeUndefined();+ });+});++describe("manual recording cap", () => {+ it("ends a DeepSeek clip under 120 seconds even with frame rounding, and leaves the default cap alone", () => {+ const FRAME = 64;+ const framesUntilDone = (maxMs?: number) => {+ const heard = createEndpointer(undefined, FRAME, maxMs);+ let frames = 1;+ while (heard(0.1) !== "done") frames += 1;+ return frames;+ };+ expect(framesUntilDone(DEEPSEEK_RECORDING_MAX_MS) * FRAME).toBeLessThan(120_000);+ expect(framesUntilDone(DEEPSEEK_RECORDING_MAX_MS) * FRAME).toBeGreaterThanOrEqual(DEEPSEEK_RECORDING_MAX_MS);+ expect(framesUntilDone() * FRAME).toBeGreaterThanOrEqual(5 * 60_000);});});diff --git a/src/lib/speech.ts b/src/lib/speech.tsindex 40b60e21e7..5cc878f292 100644--- a/src/lib/speech.ts+++ b/src/lib/speech.ts@@ -1,3 +1,4 @@+import { DEEPSEEK_RECORDING_MAX_MS } from "../../shared/deepseek-voice";import { keyEntry, savedState } from "@/components/keys/key-catalog";import type { ConfigStatus } from "@/state/store";import { desktopCapabilitiesNow } from "./desktop";@@ -7,19 +8,51 @@ import { fishSpeech, type SpeechBridge } from "./fish-speech";* for a short thinking pause mid-sentence. */export const CALL_ENDPOINT_MS = 1_700;-/** The speech bridge this computer listens through: the page's own Fish Audio listener, or the desktop app's helper. */-export function speechBridge(): SpeechBridge | Window["ogb"] {- return desktopCapabilitiesNow().dictation.engine === "fish-audio" ? fishSpeech : globalThis.window?.ogb;+const deepseekSpeech: SpeechBridge = {+ ...fishSpeech,+ speechStart: (options) => fishSpeech.speechStart({ ...options, maxMs: DEEPSEEK_RECORDING_MAX_MS }),+};++/** DeepSeek voice also hears through DeepSeek, on every computer that can listen at all. */+const deepseekHears = (config: ConfigStatus | null | undefined) => config?.tts?.provider === "deepseek";++function serverHears(capabilities: DesktopCapabilities, config: ConfigStatus | null | undefined): boolean {+ return capabilities.dictation.engine === "fish-audio" || (capabilities.dictation.available && deepseekHears(config));}-/** A key the server listens with: Fish Audio, or the person's own ElevenLabs key (not the plan's included voice). */+/** The speech bridge this computer listens through: the page's own recorder (heard by the harness through DeepSeek,+ * Fish Audio or ElevenLabs), or the desktop app's helper. */+export function speechBridge(config: ConfigStatus | null | undefined): SpeechBridge | Window["ogb"] {+ const capabilities = desktopCapabilitiesNow();+ if (capabilities.dictation.available && deepseekHears(config)) return deepseekSpeech;+ return capabilities.dictation.engine === "fish-audio" ? fishSpeech : globalThis.window?.ogb;+}++/** The page's recorder hears a clip only at its end, so stopping the mic must finish it. */+export const recordsClips = (bridge: SpeechBridge | Window["ogb"]) => bridge === fishSpeech || bridge === deepseekSpeech;++/** Stops whichever bridge is listening, for a caller that cannot know which one started. */+export function stopListening(): void {+ void fishSpeech.speechStop();+ void globalThis.window?.ogb?.speechStop?.();+}++/** A key the server listens with: DeepSeek while it is the voice; otherwise Fish Audio, or the person's own+ * ElevenLabs key (not the plan's included voice). */export function fishListeningReady(config: ConfigStatus | null | undefined): boolean {+ if (deepseekHears(config)) return savedState(keyEntry("deepseek"), config).configured;if (savedState(keyEntry("fishAudio"), config).configured) return true;const eleven = savedState(keyEntry("elevenlabs"), config);return eleven.configured && !eleven.included;}-/** Whether speech can be heard here: the engine is there and, through Fish Audio, so is a saved key. */+/** The key this computer still needs before the server can hear it, if any. */+export function missingListenKey(capabilities: DesktopCapabilities, config: ConfigStatus | null | undefined): "fish" | "deepseek" | null {+ if (!serverHears(capabilities, config) || fishListeningReady(config)) return null;+ return deepseekHears(config) ? "deepseek" : "fish";+}++/** Whether speech can be heard here: the engine is there and, through the server, so is a saved key. */export function listensHere(capabilities: DesktopCapabilities, config: ConfigStatus | null | undefined): boolean {- return capabilities.dictation.available && (capabilities.dictation.engine !== "fish-audio" || fishListeningReady(config));+ return capabilities.dictation.available && missingListenKey(capabilities, config) === null;}diff --git a/src/lib/use-composer-dictation.ts b/src/lib/use-composer-dictation.tsindex 1320daaf5b..770e30a1d7 100644--- a/src/lib/use-composer-dictation.ts+++ b/src/lib/use-composer-dictation.ts@@ -3,8 +3,7 @@ import { useDesktopCapabilities } from "@/components/DesktopCapabilities";import { withOpenSettings } from "@/components/OpenSystemSettings";import { useStoreSelector } from "@/state/store-select";import { t } from "./i18n";-import { fishSpeech } from "./fish-speech";-import { listensHere, speechBridge } from "./speech";+import { listensHere, recordsClips, speechBridge } from "./speech";export function useComposerDictation({ draftId, text, onText }: {draftId: string;@@ -12,14 +11,16 @@ export function useComposerDictation({ draftId, text, onText }: {onText: (text: string) => void;}) {const { capabilities } = useDesktopCapabilities();- const ready = listensHere(capabilities, useStoreSelector((state) => state.config));+ const config = useStoreSelector((state) => state.config);+ const ready = listensHere(capabilities, config);+ const configNow = useRef(config);+ configNow.current = config;const [recording, setRecording] = useState(false);const [speechError, setSpeechError] = useState<ReactNode>(null);const draft = useRef({ id: draftId, text });draft.current = { id: draftId, text };const session = useRef({ draftId: "", base: "" });const cancel = useRef<(() => void) | null>(null);- // Fish Audio hears the clip only at its end, so stopping the mic must finish it.const finish = useRef<(() => void) | null>(null);const stop = useCallback(() => {cancel.current?.();@@ -28,7 +29,8 @@ export function useComposerDictation({ draftId, text, onText }: {useEffect(() => {if (!recording) return;- const bridge = speechBridge();+ // Chosen once per recording, so a voice change mid-recording cannot stop or insert through another bridge.+ const bridge = speechBridge(configNow.current);if (!bridge || session.current.draftId !== draftId) {setRecording(false);return;@@ -44,7 +46,7 @@ export function useComposerDictation({ draftId, text, onText }: {setRecording(false);};cancel.current = cancelSession;- finish.current = bridge === fishSpeech ? () => void fishSpeech.speechFinish() : null;+ finish.current = recordsClips(bridge) ? () => void bridge.speechFinish?.() : null;const offTranscript = bridge.onSpeechTranscript((line) => {if (!active || draft.current.id !== draftId) return;if (draft.current.text !== lastText) {@@ -86,7 +88,7 @@ export function useComposerDictation({ draftId, text, onText }: {}, [recording, draftId, onText]);const toggle = () => {- if (!ready || !speechBridge()) {+ if (!ready || !speechBridge(config)) {setSpeechError(t("composer.dictation.unavailable"));} else if (recording) {if (finish.current) finish.current();diff --git a/src/locales/de.json b/src/locales/de.jsonindex b10eccf852..3b8f036556 100644--- a/src/locales/de.json+++ b/src/locales/de.json@@ -4019,5 +4019,13 @@"server.rooms.linkedEnded": "{place} hat sich 30 Tage lang nicht verbunden, deshalb wurde die Verbindung dorthin beendet. Nicht mehr in diesem Raum: {bots}.","room.members.far.place": "auf {place}","room.members.far.off": "Verbindung ist aus",- "room.members.far.missing": "Nicht mehr verfügbar"+ "room.members.far.missing": "Nicht mehr verfügbar",+ "voice.deepseek.sharedKey": "DeepSeek verwendet den vorhandenen DeepSeek-Schlüssel dieser Installation.",+ "voice.deepseek.description": "Liest Antworten und Sprachnachrichten mit der DeepSeek-Stimme Stella oder Tide vor. Mit DeepSeek hören dich auch Diktat und abwechselndes Sprechen über die DeepSeek-Spracherkennung, bis zu etwa zwei Minuten pro Aufnahme. Nutzt deinen DeepSeek-API-Schlüssel und wird von DeepSeek abgerechnet.",+ "voice.deepseek.missingKey": "Füge auf dem Host unter Einstellungen → API-Schlüssel einen DeepSeek-API-Schlüssel hinzu, um die DeepSeek-Stimme zu nutzen.",+ "voice.deepseek.stella": "Stella (weiblich)",+ "voice.deepseek.tide": "Tide (männlich)",+ "call.capability.turnsNeedDeepSeekKey": "Füge einen DeepSeek-Schlüssel hinzu, um in Anrufen abwechselnd zu sprechen",+ "call.capability.turnsNeedDeepSeekKeyReason": "DeepSeek ist deine Stimme, daher hört dich das abwechselnde Sprechen über die DeepSeek-Spracherkennung. Füge unter Einstellungen → API-Schlüssel einen DeepSeek-Schlüssel hinzu.",+ "serverError.voice.deepseekKeyRequired": "Füge unter Einstellungen → API-Schlüssel einen DeepSeek-API-Schlüssel hinzu, um mit der DeepSeek-Stimme mit deinen Bots zu sprechen."}diff --git a/src/locales/en.json b/src/locales/en.jsonindex 86e942e9b4..1ca3080e92 100644--- a/src/locales/en.json+++ b/src/locales/en.json@@ -6931,6 +6931,8 @@"call.mode.liveHint": "Talk naturally and interrupt any time; the bot still does the work.","call.capability.turnsNeedFishKey": "Add a Fish Audio or ElevenLabs key to take turns on calls","call.capability.turnsNeedFishKeyReason": "On this computer, Take turns hears you through Fish Audio or ElevenLabs speech-to-text. Add either key in Settings → API keys.",+ "call.capability.turnsNeedDeepSeekKey": "Add a DeepSeek key to take turns on calls",+ "call.capability.turnsNeedDeepSeekKeyReason": "DeepSeek is your voice, so Take turns hears you through DeepSeek speech-to-text. Add a DeepSeek key in Settings → API keys.","call.capability.turnsNeedDesktop": "Calls where you take turns need the desktop app","call.capability.turnsNeedDesktopReason": "They listen from this computer, so they need {app} on a Mac, Windows or Linux computer.","call.capability.turnsOnThisComputerAnyOs": "Calls where you take turns work with bots on this computer",@@ -10432,6 +10434,7 @@"server.connect.emailOnComputer": "Type your email address and password on your computer.","serverError.mailbox.adminOnly": "Only the owner or an admin can manage the mailboxes.","serverError.mailbox.addressAndPassword": "Enter your email address and password.",+ "serverError.voice.deepseekKeyRequired": "Add a DeepSeek API key in Settings → API keys to talk to your bots with DeepSeek voice.","serverError.voice.fishKeyRequired": "Add a Fish Audio or ElevenLabs key in Settings → API keys to talk to your bots here.","serverError.voice.fishTranscribeConnection": "Couldn't reach Fish Audio to hear you — check your connection.","serverError.voice.elevenLabsTranscribeConnection": "Couldn't reach ElevenLabs to hear you — check your connection.",@@ -10440,6 +10443,11 @@"server.botApi.confinedWhy": "This call came in through the Bot API, so it can only answer from what this bot already knows.","voice.openai.description": "Read replies and voice messages with AI-generated voices. Uses your OpenAI API key and is billed by OpenAI based on API usage. Live call settings are separate.","voice.openai.missingKey": "Add an OpenAI API key in Settings → API keys on the host to use readout.",+ "voice.deepseek.sharedKey": "DeepSeek uses this installation’s existing DeepSeek key.",+ "voice.deepseek.description": "Reads replies and voice messages aloud with DeepSeek’s Stella or Tide voice. Choosing DeepSeek also makes dictation and Take turns hear you through DeepSeek speech-to-text, up to about two minutes per recording. Uses your DeepSeek API key and is billed by DeepSeek.",+ "voice.deepseek.missingKey": "Add a DeepSeek API key in Settings → API keys on the host to use DeepSeek voice.",+ "voice.deepseek.stella": "Stella (female)",+ "voice.deepseek.tide": "Tide (male)","voice.sample": "Good morning. The tests passed overnight, and I left two notes for you in the chat.","voice.openai.error.key": "Add an OpenAI API key in Settings → API keys to read replies aloud.","voice.openai.error.auth": "OpenAI rejected the API key or its Realtime access. Check the key and project permissions in Settings.",diff --git a/src/locales/es.json b/src/locales/es.jsonindex c4dcc393b4..c491d4a618 100644--- a/src/locales/es.json+++ b/src/locales/es.json@@ -6507,5 +6507,13 @@"remote.tailscale.needsApproval": "Este ordenador espera la aprobación en tu red de Tailscale. Apruébalo en la consola de administración de Tailscale y vuelve a intentarlo.","together.switch.title": "Este equipo y My Cloud juntos","together.switch.line": "Desactivado de forma predeterminada. Los bots del Cloud y los de este equipo aparecen en una sola lista, y cada uno se abre donde está.",- "together.switch.failed": "No se pudo guardar. Inténtalo de nuevo."+ "together.switch.failed": "No se pudo guardar. Inténtalo de nuevo.",+ "voice.deepseek.sharedKey": "DeepSeek usa la clave de DeepSeek que ya tiene esta instalación.",+ "voice.deepseek.description": "Lee en voz alta las respuestas y los mensajes de voz con la voz Stella o Tide de DeepSeek. Al elegir DeepSeek, el dictado y el modo Por turnos también te escuchan con la transcripción de voz de DeepSeek, hasta unos dos minutos por grabación. Usa tu clave de API de DeepSeek y DeepSeek lo factura.",+ "voice.deepseek.missingKey": "Añade una clave de API de DeepSeek en Ajustes → Claves de API en el equipo anfitrión para usar la voz de DeepSeek.",+ "voice.deepseek.stella": "Stella (femenina)",+ "voice.deepseek.tide": "Tide (masculina)",+ "call.capability.turnsNeedDeepSeekKey": "Añade una clave de DeepSeek para hablar por turnos en las llamadas",+ "call.capability.turnsNeedDeepSeekKeyReason": "DeepSeek es tu voz, así que el modo Por turnos te escucha con la transcripción de voz de DeepSeek. Añade una clave de DeepSeek en Ajustes → Claves de API.",+ "serverError.voice.deepseekKeyRequired": "Añade una clave de API de DeepSeek en Ajustes → Claves de API para hablar con tus bots con la voz de DeepSeek."}diff --git a/src/locales/fr.json b/src/locales/fr.jsonindex a62e6feb47..8301411953 100644--- a/src/locales/fr.json+++ b/src/locales/fr.json@@ -3807,5 +3807,13 @@"remote.tailscale.needsApproval": "Cet ordinateur attend d'être approuvé sur votre réseau Tailscale. Approuvez-le dans la console d'administration Tailscale, puis réessayez.","together.switch.title": "Cet ordinateur et Mon Cloud ensemble","together.switch.line": "Désactivé par défaut. Les bots du Cloud et ceux de cet ordinateur s'affichent dans une seule liste, et chacun s'ouvre là où il se trouve.",- "together.switch.failed": "Impossible d'enregistrer. Réessayez."+ "together.switch.failed": "Impossible d'enregistrer. Réessayez.",+ "voice.deepseek.sharedKey": "DeepSeek utilise la clé DeepSeek déjà présente dans cette installation.",+ "voice.deepseek.description": "Lit les réponses et les messages vocaux avec la voix Stella ou Tide de DeepSeek. En choisissant DeepSeek, la dictée et les appels à tour de rôle vous entendent aussi via la reconnaissance vocale de DeepSeek, jusqu’à environ deux minutes par enregistrement. Utilise votre clé API DeepSeek et est facturé par DeepSeek.",+ "voice.deepseek.missingKey": "Ajoutez une clé API DeepSeek dans Paramètres → Clés API sur l’hôte pour utiliser la voix DeepSeek.",+ "voice.deepseek.stella": "Stella (féminine)",+ "voice.deepseek.tide": "Tide (masculine)",+ "call.capability.turnsNeedDeepSeekKey": "Ajoutez une clé DeepSeek pour parler à tour de rôle pendant les appels",+ "call.capability.turnsNeedDeepSeekKeyReason": "DeepSeek est votre voix : les appels à tour de rôle vous entendent donc via la reconnaissance vocale de DeepSeek. Ajoutez une clé DeepSeek dans Paramètres → Clés API.",+ "serverError.voice.deepseekKeyRequired": "Ajoutez une clé API DeepSeek dans Paramètres → Clés API pour parler à vos bots avec la voix DeepSeek."}diff --git a/src/locales/hi.json b/src/locales/hi.jsonindex 048df0c77c..b59146d49e 100644--- a/src/locales/hi.json+++ b/src/locales/hi.json@@ -3661,5 +3661,13 @@"remote.tailscale.needsApproval": "यह कंप्यूटर आपके Tailscale नेटवर्क पर मंज़ूरी का इंतज़ार कर रहा है। Tailscale एडमिन कंसोल में इसे मंज़ूर करें, फिर दोबारा कोशिश करें।","together.switch.title": "यही कंप्यूटर और मेरा क्लाउड एक साथ","together.switch.line": "डिफ़ॉल्ट रूप से बंद। क्लाउड के बॉट और इस कंप्यूटर के बॉट एक ही सूची में दिखते हैं, और हर बॉट वहीं खुलता है जहाँ वह है।",- "together.switch.failed": "इसे सहेजा नहीं जा सका। फिर से कोशिश करें।"+ "together.switch.failed": "इसे सहेजा नहीं जा सका। फिर से कोशिश करें।",+ "voice.deepseek.sharedKey": "DeepSeek इस इंस्टॉलेशन की मौजूदा DeepSeek कुंजी का उपयोग करता है।",+ "voice.deepseek.description": "जवाब और वॉइस मैसेज DeepSeek की Stella या Tide आवाज़ में पढ़कर सुनाता है। DeepSeek चुनने पर डिक्टेशन और बारी-बारी से बात करने वाले कॉल भी DeepSeek स्पीच-टू-टेक्स्ट से आपको सुनते हैं, हर रिकॉर्डिंग में लगभग दो मिनट तक। आपकी DeepSeek API कुंजी का उपयोग होता है और बिल DeepSeek देता है।",+ "voice.deepseek.missingKey": "DeepSeek आवाज़ इस्तेमाल करने के लिए होस्ट पर सेटिंग्स → API कुंजियाँ में DeepSeek API कुंजी जोड़ें।",+ "voice.deepseek.stella": "Stella (महिला)",+ "voice.deepseek.tide": "Tide (पुरुष)",+ "call.capability.turnsNeedDeepSeekKey": "कॉल में बारी-बारी से बात करने के लिए DeepSeek कुंजी जोड़ें",+ "call.capability.turnsNeedDeepSeekKeyReason": "DeepSeek आपकी आवाज़ है, इसलिए बारी-बारी से बात करते समय DeepSeek स्पीच-टू-टेक्स्ट आपको सुनता है। सेटिंग्स → API कुंजियाँ में DeepSeek कुंजी जोड़ें।",+ "serverError.voice.deepseekKeyRequired": "DeepSeek आवाज़ में अपने बॉट्स से बात करने के लिए सेटिंग्स → API कुंजियाँ में DeepSeek API कुंजी जोड़ें।"}diff --git a/src/locales/it.json b/src/locales/it.jsonindex b47d34869f..b644f6a71f 100644--- a/src/locales/it.json+++ b/src/locales/it.json@@ -7131,5 +7131,13 @@"remote.tailscale.needsApproval": "Questo computer è in attesa di approvazione sulla tua rete Tailscale. Approvalo nella console di amministrazione di Tailscale, poi riprova.","together.switch.title": "Questo computer e Il mio Cloud insieme","together.switch.line": "Disattivato per impostazione predefinita. I bot del Cloud e quelli di questo computer compaiono in un unico elenco, e ognuno si apre dove si trova.",- "together.switch.failed": "Non è stato possibile salvare. Riprova."+ "together.switch.failed": "Non è stato possibile salvare. Riprova.",+ "voice.deepseek.sharedKey": "DeepSeek usa la chiave DeepSeek già presente in questa installazione.",+ "voice.deepseek.description": "Legge ad alta voce risposte e messaggi vocali con la voce Stella o Tide di DeepSeek. Scegliendo DeepSeek, anche la dettatura e la modalità A turni ti ascoltano con la trascrizione vocale di DeepSeek, fino a circa due minuti per registrazione. Usa la tua chiave API DeepSeek ed è fatturato da DeepSeek.",+ "voice.deepseek.missingKey": "Aggiungi una chiave API DeepSeek in Impostazioni → Chiavi API sull’host per usare la voce DeepSeek.",+ "voice.deepseek.stella": "Stella (femminile)",+ "voice.deepseek.tide": "Tide (maschile)",+ "call.capability.turnsNeedDeepSeekKey": "Aggiungi una chiave DeepSeek per parlare a turni nelle chiamate",+ "call.capability.turnsNeedDeepSeekKeyReason": "DeepSeek è la tua voce, quindi la modalità A turni ti ascolta con la trascrizione vocale di DeepSeek. Aggiungi una chiave DeepSeek in Impostazioni → Chiavi API.",+ "serverError.voice.deepseekKeyRequired": "Aggiungi una chiave API DeepSeek in Impostazioni → Chiavi API per parlare con i tuoi bot con la voce DeepSeek."}diff --git a/src/locales/ja.json b/src/locales/ja.jsonindex 72723683b4..fbf878aefb 100644--- a/src/locales/ja.json+++ b/src/locales/ja.json@@ -8102,5 +8102,13 @@"remote.tailscale.needsApproval": "このコンピューターは Tailscale ネットワークでの承認を待っています。Tailscale の管理コンソールで承認してから、もう一度お試しください。","together.switch.title": "このコンピューターと My Cloud をまとめる","together.switch.line": "既定ではオフです。Cloud のボットとこのコンピューターのボットを 1 つの一覧に表示し、それぞれがある場所で開きます。",- "together.switch.failed": "保存できませんでした。もう一度お試しください。"+ "together.switch.failed": "保存できませんでした。もう一度お試しください。",+ "voice.deepseek.sharedKey": "DeepSeek は、このインストール環境に保存済みの DeepSeek キーを使います。",+ "voice.deepseek.description": "返信と音声メッセージを DeepSeek の Stella または Tide の声で読み上げます。DeepSeek を選ぶと、音声入力と「交互に話す」も DeepSeek の音声認識であなたの声を聞き取ります(1 回の録音につき約 2 分まで)。DeepSeek API キーを使い、料金は DeepSeek から請求されます。",+ "voice.deepseek.missingKey": "DeepSeek の音声を使うには、ホストの 設定 → API キー で DeepSeek API キーを追加してください。",+ "voice.deepseek.stella": "Stella(女性)",+ "voice.deepseek.tide": "Tide(男性)",+ "call.capability.turnsNeedDeepSeekKey": "通話で交互に話すには DeepSeek キーを追加してください",+ "call.capability.turnsNeedDeepSeekKeyReason": "音声に DeepSeek を選んでいるため、「交互に話す」は DeepSeek の音声認識であなたの声を聞き取ります。設定 → API キー で DeepSeek キーを追加してください。",+ "serverError.voice.deepseekKeyRequired": "DeepSeek の音声でボットと話すには、設定 → API キー で DeepSeek API キーを追加してください。"}diff --git a/src/locales/ko.json b/src/locales/ko.jsonindex 8db018801f..553168a5e3 100644--- a/src/locales/ko.json+++ b/src/locales/ko.json@@ -7792,5 +7792,13 @@"remote.tailscale.needsApproval": "이 컴퓨터는 Tailscale 네트워크에서 승인을 기다리고 있습니다. Tailscale 관리 콘솔에서 승인한 다음 다시 시도하세요.","together.switch.title": "이 컴퓨터와 내 클라우드 함께 보기","together.switch.line": "기본값은 꺼짐입니다. 클라우드의 봇과 이 컴퓨터의 봇이 하나의 목록에 표시되며, 각 봇은 자기가 있는 곳에서 열립니다.",- "together.switch.failed": "저장하지 못했습니다. 다시 시도하세요."+ "together.switch.failed": "저장하지 못했습니다. 다시 시도하세요.",+ "voice.deepseek.sharedKey": "DeepSeek은 이 설치에 이미 있는 DeepSeek 키를 써요.",+ "voice.deepseek.description": "답장과 음성 메시지를 DeepSeek의 Stella 또는 Tide 목소리로 읽어 줘요. DeepSeek을 고르면 받아쓰기와 번갈아 말하기도 DeepSeek 음성 인식으로 들어요. 녹음 한 번에 약 2분까지예요. DeepSeek API 키를 쓰고 요금은 DeepSeek에서 청구돼요.",+ "voice.deepseek.missingKey": "DeepSeek 목소리를 쓰려면 호스트의 설정 → API 키에서 DeepSeek API 키를 추가하세요.",+ "voice.deepseek.stella": "Stella (여성)",+ "voice.deepseek.tide": "Tide (남성)",+ "call.capability.turnsNeedDeepSeekKey": "통화에서 번갈아 말하려면 DeepSeek 키를 추가하세요",+ "call.capability.turnsNeedDeepSeekKeyReason": "목소리로 DeepSeek을 쓰고 있어서 번갈아 말하기도 DeepSeek 음성 인식으로 들어요. 설정 → API 키에서 DeepSeek 키를 추가하세요.",+ "serverError.voice.deepseekKeyRequired": "DeepSeek 목소리로 봇과 대화하려면 설정 → API 키에서 DeepSeek API 키를 추가하세요."}diff --git a/src/locales/pl.json b/src/locales/pl.jsonindex d78cd6ac47..c4b2b8e7ed 100644--- a/src/locales/pl.json+++ b/src/locales/pl.json@@ -7271,5 +7271,13 @@"remote.tailscale.needsApproval": "Ten komputer czeka na zatwierdzenie w Twojej sieci Tailscale. Zatwierdź go w konsoli administracyjnej Tailscale, a potem spróbuj ponownie.","together.switch.title": "Ten komputer i My Cloud razem","together.switch.line": "Domyślnie wyłączone. Boty z Cloud i boty z tego komputera są na jednej liście, a każdy otwiera się tam, gdzie działa.",- "together.switch.failed": "Nie udało się zapisać. Spróbuj ponownie."+ "together.switch.failed": "Nie udało się zapisać. Spróbuj ponownie.",+ "voice.deepseek.sharedKey": "DeepSeek korzysta z istniejącego klucza DeepSeek tej instalacji.",+ "voice.deepseek.description": "Czyta na głos odpowiedzi i wiadomości głosowe głosem Stella lub Tide od DeepSeek. Po wybraniu DeepSeek dyktowanie i tryb Po kolei też słyszą cię przez rozpoznawanie mowy DeepSeek, do około dwóch minut na nagranie. Używa twojego klucza API DeepSeek, a opłaty nalicza DeepSeek.",+ "voice.deepseek.missingKey": "Dodaj klucz API DeepSeek w Ustawienia → Klucze API na hoście, aby używać głosu DeepSeek.",+ "voice.deepseek.stella": "Stella (kobiecy)",+ "voice.deepseek.tide": "Tide (męski)",+ "call.capability.turnsNeedDeepSeekKey": "Dodaj klucz DeepSeek, aby rozmawiać po kolei w połączeniach",+ "call.capability.turnsNeedDeepSeekKeyReason": "DeepSeek jest twoim głosem, więc tryb Po kolei słyszy cię przez rozpoznawanie mowy DeepSeek. Dodaj klucz DeepSeek w Ustawienia → Klucze API.",+ "serverError.voice.deepseekKeyRequired": "Dodaj klucz API DeepSeek w Ustawienia → Klucze API, aby rozmawiać z botami głosem DeepSeek."}diff --git a/src/locales/pt-br.json b/src/locales/pt-br.jsonindex 894128b667..96b7472492 100644--- a/src/locales/pt-br.json+++ b/src/locales/pt-br.json@@ -11073,5 +11073,13 @@"server.rooms.linkedEnded": "{place} não se conecta há 30 dias, então a ligação com ele terminou. Não está mais neste grupo: {bots}.","room.members.far.place": "em {place}","room.members.far.off": "Ligação desligada",- "room.members.far.missing": "Não está mais disponível"+ "room.members.far.missing": "Não está mais disponível",+ "voice.deepseek.sharedKey": "o DeepSeek usa a chave do DeepSeek que já existe nesta instalação.",+ "voice.deepseek.description": "Lê respostas e mensagens de voz em voz alta com a voz Stella ou Tide do DeepSeek. Ao escolher o DeepSeek, o ditado e o modo Um de cada vez também ouvem você pela transcrição de fala do DeepSeek, até cerca de dois minutos por gravação. Usa sua chave de API do DeepSeek e é cobrado pelo DeepSeek.",+ "voice.deepseek.missingKey": "Adicione uma chave de API do DeepSeek em Configurações → Chaves de API no computador anfitrião para usar a voz do DeepSeek.",+ "voice.deepseek.stella": "Stella (feminina)",+ "voice.deepseek.tide": "Tide (masculina)",+ "call.capability.turnsNeedDeepSeekKey": "Adicione uma chave do DeepSeek para falar um de cada vez nas chamadas",+ "call.capability.turnsNeedDeepSeekKeyReason": "O DeepSeek é a sua voz, então o modo Um de cada vez ouve você pela transcrição de fala do DeepSeek. Adicione uma chave do DeepSeek em Configurações → Chaves de API.",+ "serverError.voice.deepseekKeyRequired": "Adicione uma chave de API do DeepSeek em Configurações → Chaves de API para falar com seus bots com a voz do DeepSeek."}diff --git a/src/locales/ru.json b/src/locales/ru.jsonindex 660f93d01e..287bd86746 100644--- a/src/locales/ru.json+++ b/src/locales/ru.json@@ -7325,5 +7325,13 @@"remote.tailscale.needsApproval": "Этот компьютер ждёт одобрения в вашей сети Tailscale. Одобрите его в консоли администратора Tailscale, затем попробуйте снова.","together.switch.title": "Этот компьютер и Моё облако вместе","together.switch.line": "По умолчанию выключено. Боты из облака и боты этого компьютера показаны в одном списке, и каждый открывается там, где он находится.",- "together.switch.failed": "Не удалось сохранить. Попробуйте ещё раз."+ "together.switch.failed": "Не удалось сохранить. Попробуйте ещё раз.",+ "voice.deepseek.sharedKey": "DeepSeek использует существующий ключ DeepSeek этой установки.",+ "voice.deepseek.description": "Читает ответы и голосовые сообщения голосом Stella или Tide от DeepSeek. Если выбрать DeepSeek, диктовка и режим «По очереди» тоже слушают вас через распознавание речи DeepSeek — до двух минут на одну запись. Использует ваш API-ключ DeepSeek, оплата — через DeepSeek.",+ "voice.deepseek.missingKey": "Добавьте API-ключ DeepSeek в разделе Настройки → API-ключи на хосте, чтобы использовать голос DeepSeek.",+ "voice.deepseek.stella": "Stella (женский)",+ "voice.deepseek.tide": "Tide (мужской)",+ "call.capability.turnsNeedDeepSeekKey": "Добавьте ключ DeepSeek, чтобы говорить по очереди в звонках",+ "call.capability.turnsNeedDeepSeekKeyReason": "Ваш голос — DeepSeek, поэтому режим «По очереди» слушает вас через распознавание речи DeepSeek. Добавьте ключ DeepSeek в разделе Настройки → API-ключи.",+ "serverError.voice.deepseekKeyRequired": "Добавьте API-ключ DeepSeek в разделе Настройки → API-ключи, чтобы разговаривать с ботами голосом DeepSeek."}diff --git a/src/locales/tr.json b/src/locales/tr.jsonindex 121888f4cb..d320cacccc 100644--- a/src/locales/tr.json+++ b/src/locales/tr.json@@ -6007,5 +6007,13 @@"remote.tailscale.needsApproval": "Bu bilgisayar Tailscale ağınızda onay bekliyor. Tailscale yönetici konsolunda onaylayın, ardından tekrar deneyin.","together.switch.title": "Bu bilgisayar ve Cloud'um birlikte","together.switch.line": "Varsayılan olarak kapalı. Cloud'daki botlar ile bu bilgisayardaki botlar tek listede görünür ve her biri bulunduğu yerde açılır.",- "together.switch.failed": "Kaydedilemedi. Yeniden deneyin."+ "together.switch.failed": "Kaydedilemedi. Yeniden deneyin.",+ "voice.deepseek.sharedKey": "DeepSeek, bu kurulumun mevcut DeepSeek anahtarını kullanır.",+ "voice.deepseek.description": "Yanıtları ve sesli mesajları DeepSeek’in Stella veya Tide sesiyle okur. DeepSeek’i seçtiğinde dikte ve Sırayla konuş da seni DeepSeek konuşmadan metne dönüştürme ile duyar; kayıt başına yaklaşık iki dakikaya kadar. DeepSeek API anahtarını kullanır ve ücreti DeepSeek tarafından alınır.",+ "voice.deepseek.missingKey": "DeepSeek sesini kullanmak için ana bilgisayarda Ayarlar → API anahtarları bölümüne bir DeepSeek API anahtarı ekle.",+ "voice.deepseek.stella": "Stella (kadın)",+ "voice.deepseek.tide": "Tide (erkek)",+ "call.capability.turnsNeedDeepSeekKey": "Aramalarda sırayla konuşmak için bir DeepSeek anahtarı ekle",+ "call.capability.turnsNeedDeepSeekKeyReason": "Sesin DeepSeek olduğu için Sırayla konuş seni DeepSeek konuşmadan metne dönüştürme ile duyar. Ayarlar → API anahtarları bölümüne bir DeepSeek anahtarı ekle.",+ "serverError.voice.deepseekKeyRequired": "Botlarınla DeepSeek sesiyle konuşmak için Ayarlar → API anahtarları bölümüne bir DeepSeek API anahtarı ekle."}diff --git a/src/locales/uk.json b/src/locales/uk.jsonindex f23e61877b..f1e85a166f 100644--- a/src/locales/uk.json+++ b/src/locales/uk.json@@ -4082,5 +4082,13 @@"remote.tailscale.needsApproval": "Цей комп’ютер чекає на схвалення у вашій мережі Tailscale. Схваліть його в консолі адміністратора Tailscale, потім спробуйте ще раз.","together.switch.title": "Цей комп'ютер і Моя хмара разом","together.switch.line": "Типово вимкнено. Боти з хмари й боти цього комп'ютера показані в одному списку, і кожен відкривається там, де він є.",- "together.switch.failed": "Не вдалося зберегти. Спробуйте ще раз."+ "together.switch.failed": "Не вдалося зберегти. Спробуйте ще раз.",+ "voice.deepseek.sharedKey": "DeepSeek використовує наявний ключ DeepSeek цієї інсталяції.",+ "voice.deepseek.description": "Читає відповіді та голосові повідомлення голосом Stella або Tide від DeepSeek. Якщо вибрати DeepSeek, диктування й розмова по черзі теж слухають вас через розпізнавання мовлення DeepSeek — до приблизно двох хвилин на запис. Використовує ваш API-ключ DeepSeek, оплата — через DeepSeek.",+ "voice.deepseek.missingKey": "Додайте API-ключ DeepSeek у Налаштування → API-ключі на хості, щоб використовувати голос DeepSeek.",+ "voice.deepseek.stella": "Stella (жіночий)",+ "voice.deepseek.tide": "Tide (чоловічий)",+ "call.capability.turnsNeedDeepSeekKey": "Додайте ключ DeepSeek, щоб говорити по черзі в дзвінках",+ "call.capability.turnsNeedDeepSeekKeyReason": "Ваш голос — DeepSeek, тому розмова по черзі слухає вас через розпізнавання мовлення DeepSeek. Додайте ключ DeepSeek у Налаштування → API-ключі.",+ "serverError.voice.deepseekKeyRequired": "Додайте API-ключ DeepSeek у Налаштування → API-ключі, щоб розмовляти з ботами голосом DeepSeek."}diff --git a/src/locales/vi.json b/src/locales/vi.jsonindex 458f8b29df..e032cf96c4 100644--- a/src/locales/vi.json+++ b/src/locales/vi.json@@ -6007,5 +6007,13 @@"remote.tailscale.needsApproval": "Máy tính này đang chờ được phê duyệt trên mạng Tailscale của bạn. Hãy phê duyệt trong bảng điều khiển quản trị Tailscale, rồi thử lại.","together.switch.title": "Máy tính này và My Cloud cùng nhau","together.switch.line": "Mặc định là tắt. Bot trên Cloud và bot trên máy tính này hiện trong một danh sách, và mỗi bot mở ở nơi nó đang ở.",- "together.switch.failed": "Không lưu được. Hãy thử lại."+ "together.switch.failed": "Không lưu được. Hãy thử lại.",+ "voice.deepseek.sharedKey": "DeepSeek sử dụng khóa DeepSeek hiện có của bản cài đặt này.",+ "voice.deepseek.description": "Đọc to câu trả lời và tin nhắn thoại bằng giọng Stella hoặc Tide của DeepSeek. Khi chọn DeepSeek, tính năng đọc chính tả và chế độ Luân phiên cũng nghe bạn qua chuyển giọng nói thành văn bản của DeepSeek, tối đa khoảng hai phút mỗi lần ghi. Dùng khóa API DeepSeek của bạn và do DeepSeek tính phí.",+ "voice.deepseek.missingKey": "Thêm khóa API DeepSeek trong Cài đặt → Khóa API trên máy chủ để dùng giọng DeepSeek.",+ "voice.deepseek.stella": "Stella (nữ)",+ "voice.deepseek.tide": "Tide (nam)",+ "call.capability.turnsNeedDeepSeekKey": "Thêm khóa DeepSeek để nói luân phiên trong cuộc gọi",+ "call.capability.turnsNeedDeepSeekKeyReason": "DeepSeek là giọng của bạn, nên chế độ Luân phiên nghe bạn qua chuyển giọng nói thành văn bản của DeepSeek. Thêm khóa DeepSeek trong Cài đặt → Khóa API.",+ "serverError.voice.deepseekKeyRequired": "Thêm khóa API DeepSeek trong Cài đặt → Khóa API để trò chuyện với bot bằng giọng DeepSeek."}diff --git a/src/locales/zh-tw.json b/src/locales/zh-tw.jsonindex 96f382f70e..0e62778ef1 100644--- a/src/locales/zh-tw.json+++ b/src/locales/zh-tw.json@@ -10356,5 +10356,13 @@"remote.tailscale.needsApproval": "這台電腦正在等待你的 Tailscale 網路核准。請在 Tailscale 管理主控台中核准它,然後再試一次。","together.switch.title": "這台電腦和 My Cloud 合在一起","together.switch.line": "預設為關閉。Cloud 上的機器人和這台電腦上的機器人顯示在同一個清單中,各自在所在的位置開啟。",- "together.switch.failed": "無法儲存。請再試一次。"+ "together.switch.failed": "無法儲存。請再試一次。",+ "voice.deepseek.sharedKey": "DeepSeek 使用此安裝實例現有的 DeepSeek 金鑰。",+ "voice.deepseek.description": "以 DeepSeek 的 Stella 或 Tide 聲音朗讀回覆和語音訊息。選擇 DeepSeek 後,聽寫和「輪流對話」也會透過 DeepSeek 語音轉文字聽你說話,每段錄音最長約兩分鐘。使用你的 DeepSeek API 金鑰,費用由 DeepSeek 收取。",+ "voice.deepseek.missingKey": "請在主機的「設定 → API 金鑰」中新增 DeepSeek API 金鑰,才能使用 DeepSeek 聲音。",+ "voice.deepseek.stella": "Stella(女聲)",+ "voice.deepseek.tide": "Tide(男聲)",+ "call.capability.turnsNeedDeepSeekKey": "新增 DeepSeek 金鑰即可在通話中輪流對話",+ "call.capability.turnsNeedDeepSeekKeyReason": "你的聲音是 DeepSeek,因此「輪流對話」會透過 DeepSeek 語音轉文字聽你說話。請在「設定 → API 金鑰」中新增 DeepSeek 金鑰。",+ "serverError.voice.deepseekKeyRequired": "請在「設定 → API 金鑰」中新增 DeepSeek API 金鑰,才能用 DeepSeek 聲音和機器人對話。"}diff --git a/src/locales/zh.json b/src/locales/zh.jsonindex 2360887d2e..1b22d89762 100644--- a/src/locales/zh.json+++ b/src/locales/zh.json@@ -10252,5 +10252,13 @@"server.rooms.linkedEnded": "{place} 已有 30 天没有连接,与它的连接已结束。已不在这个群组聊天中:{bots}。","room.members.far.place": "位于 {place}","room.members.far.off": "连接已关闭",- "room.members.far.missing": "已不可用"+ "room.members.far.missing": "已不可用",+ "voice.deepseek.sharedKey": "DeepSeek 使用此安装现有的 DeepSeek 密钥。",+ "voice.deepseek.description": "用 DeepSeek 的 Stella 或 Tide 声音朗读回复和语音消息。选择 DeepSeek 后,听写和“轮流说话”也会通过 DeepSeek 语音转文字来听你说话,每段录音最长约两分钟。使用你的 DeepSeek API 密钥,费用由 DeepSeek 收取。",+ "voice.deepseek.missingKey": "要使用 DeepSeek 声音,请在主机的设置 → API 密钥中添加 DeepSeek API 密钥。",+ "voice.deepseek.stella": "Stella(女声)",+ "voice.deepseek.tide": "Tide(男声)",+ "call.capability.turnsNeedDeepSeekKey": "添加 DeepSeek 密钥即可在通话中轮流说话",+ "call.capability.turnsNeedDeepSeekKeyReason": "你的声音是 DeepSeek,所以“轮流说话”会通过 DeepSeek 语音转文字来听你说话。请在设置 → API 密钥中添加 DeepSeek 密钥。",+ "serverError.voice.deepseekKeyRequired": "要用 DeepSeek 声音和机器人说话,请在设置 → API 密钥中添加 DeepSeek API 密钥。"}diff --git a/src/state/config-status.ts b/src/state/config-status.tsindex 0d35d24f46..a030603680 100644--- a/src/state/config-status.ts+++ b/src/state/config-status.ts@@ -94,7 +94,7 @@ export interface ConfigStatus {configured: boolean;ready: boolean;voice: string;- provider?: "elevenlabs" | "fish" | "system" | "chatterbox" | "xai" | "gemini" | "openai";+ provider?: "elevenlabs" | "fish" | "system" | "chatterbox" | "xai" | "gemini" | "openai" | "deepseek";baseUrl?: string;model?: string;/** Voice note with every reply, for every bot without its own choice. Absent from older servers. */