Add dictation and streamed read-aloud to the chat

- A mic in the composer records, transcribes with the bot's
  transcription model (api/admin/bots/transcribe) and writes the text
  into the input at the cursor to edit before sending. Escape cancels;
  recordings aren't stored.
- Every bot message has a read-aloud button that plays
  GET api/admin/bots/speak-message, streamed from the provider as the
  audio is made, so it starts in a couple of seconds. One message plays
  at a time; only the user's own sessions can be read.
- Both buttons stay visible but disabled while the bot has no model for
  them (bot_voice page prop).
- Transcription and speech no longer pick free models automatically:
  they're not available until a model is picked, and Settings says so.
  Transcription lists speech-to-text models only, so the chat-model
  transcript path and its missing-audio check are gone.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
2026-10-19 21:21:04 +01:00
co-authored by Claude Opus 5.5
parent 727cbf53c8
commit 163d9a434c
37 changed files with 936 additions and 197 deletions
+15
View File
@@ -277,6 +277,11 @@ export type HarnessOverview = {
title: string;
description: string;
required: boolean;
/**
* Picks a free model itself when none is picked. Otherwise it isn't
* available until one is.
*/
automatic: boolean;
model_id?: number;
/**
* The provider the harness is limited to; undefined: any.
@@ -599,6 +604,11 @@ export type DbBackup = {
size: number;
};
export type BotVoicePayload = {
transcription: boolean;
speech: boolean;
};
export type PagePropsType = {
user?: User | null;
user_types?: BUN_SQLITE_COBBLE_USER_TYPES[] | null;
@@ -678,6 +688,11 @@ export type PagePropsType = {
mcps_overview?: McpServersOverviewPayload | null;
tools_overview?: CustomToolsOverviewPayload | null;
bot_extensions?: BotExtensionsPayload | null;
/**
* Whether the open conversation's mic (transcription) and read-aloud
* (speech) are turned on for the bot there.
*/
bot_voice?: BotVoicePayload | null;
workspace_extensions?: BotExtensionsPayload | null;
envs?: {
GOOGLE_CLIENT_ID?: string;