From 0135ee8151c964156b4eb1943feb7ab9dc1182ac Mon Sep 17 00:00:00 2001 From: akirilyuk Date: Tue, 1 Sep 2026 19:07:04 +0700 Subject: [PATCH 1/2] feat(projects): list and set session.stt_enabled --- .../session-settings/commands.test.ts | 25 +++++++++++++++++++ .../projects/session-settings/defs.ts | 10 +++++++- 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/src/commands/projects/session-settings/commands.test.ts b/src/commands/projects/session-settings/commands.test.ts index 54be837..32192bc 100644 --- a/src/commands/projects/session-settings/commands.test.ts +++ b/src/commands/projects/session-settings/commands.test.ts @@ -1,6 +1,7 @@ import { beforeEach, describe, expect, it, vi } from "vitest"; import { runProjectsSessionSettingsList } from "./list.js"; import { runProjectsSessionSettingsSet } from "./set.js"; +import { SESSION_SETTING_KEYS } from "./defs.js"; const listProjectSessionSettings = vi.fn(); const setProjectSessionSetting = vi.fn(); @@ -23,6 +24,10 @@ vi.mock("../../../lib/project-config.js", () => ({ })); describe("projects session-settings commands", () => { + it("SESSION_SETTING_KEYS includes stt_enabled", () => { + expect(SESSION_SETTING_KEYS).toContain("stt_enabled"); + }); + beforeEach(() => { listProjectSessionSettings.mockReset(); setProjectSessionSetting.mockReset(); @@ -46,6 +51,7 @@ describe("projects session-settings commands", () => { idle_timeout_enabled: true, idle_timeout_seconds: 30, conversation_history_enabled: true, + stt_enabled: true, }, }); @@ -57,6 +63,7 @@ describe("projects session-settings commands", () => { expect(console.log).toHaveBeenCalledWith( "conversation_history_enabled=true", ); + expect(console.log).toHaveBeenCalledWith("stt_enabled=true"); }); it("uses explicit project id over linked config", async () => { @@ -115,6 +122,24 @@ describe("projects session-settings commands", () => { ); }); + it("sets stt_enabled", async () => { + setProjectSessionSetting.mockResolvedValue({ + project_id: "proj-1", + settings: { stt_enabled: false }, + }); + + await runProjectsSessionSettingsSet({ + name: "stt_enabled", + value: "false", + }); + + expect(setProjectSessionSetting).toHaveBeenCalledWith( + "proj-1", + "stt_enabled", + false, + ); + }); + it("sets conversation_history_enabled", async () => { setProjectSessionSetting.mockResolvedValue({ project_id: "proj-1", diff --git a/src/commands/projects/session-settings/defs.ts b/src/commands/projects/session-settings/defs.ts index 8a9db29..61a8d6f 100644 --- a/src/commands/projects/session-settings/defs.ts +++ b/src/commands/projects/session-settings/defs.ts @@ -5,6 +5,7 @@ export const SESSION_SETTING_KEYS = [ "data_only_idle_timeout_seconds", "idle_timeout_voice_activity", "idle_timeout_dc_inbound", + "stt_enabled", "conversation_history_enabled", "conversation_recording_enabled", "conversation_recording_metered_overage_enabled", @@ -71,11 +72,17 @@ export const SESSION_SETTING_DEFS: Record< description: "When on, client→server data-channel messages reset the idle countdown. When off, data-channel traffic does not extend the session.", }, + stt_enabled: { + type: "boolean", + default: true, + description: + "When on (default), inbound user audio is transcribed on Voice and Voice+Data sessions. false disables project-default STT (sessions/clients can still enable STT at runtime).", + }, conversation_history_enabled: { type: "boolean", default: true, description: - "When on (default), store final user speech and agent TTS text for the dashboard Conversation tab. false stops recording new transcripts (existing history kept until retention).", + "When on (default), store final user speech and agent TTS text for Voice and Voice+Data sessions in the dashboard Conversation tab. false stops recording new transcripts (existing history kept until retention).", }, conversation_recording_enabled: { type: "boolean", @@ -140,6 +147,7 @@ export function formatSessionSettingsGroupHelp(): string { lines.push( " $ voicethere projects session-settings set conversation_history_enabled false", ); + lines.push(" $ voicethere projects session-settings set stt_enabled false"); lines.push( " $ voicethere projects session-settings set conversation_recording_enabled true", ); From 1fdb303c4284c155996ffb71a449c07840ec4070 Mon Sep 17 00:00:00 2001 From: akirilyuk Date: Thu, 3 Sep 2026 03:03:16 +0700 Subject: [PATCH 2/2] fix(projects): add stt_enabled to session settings API type SESSION_SETTING_KEYS already listed stt_enabled; ProjectSessionSettingsResponse did not, so typecheck failed on list/set. --- src/lib/api.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/api.ts b/src/lib/api.ts index 344e841..d4de43c 100644 --- a/src/lib/api.ts +++ b/src/lib/api.ts @@ -218,6 +218,7 @@ export interface ProjectSessionSettingsResponse { conversation_history_enabled?: boolean; conversation_recording_enabled?: boolean; conversation_recording_metered_overage_enabled?: boolean; + stt_enabled?: boolean; }; }