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
+9 -2
View File
@@ -1,36 +1,43 @@
/**
* The harnesses: what a model is used for. Each harness has one model
* setting (`harness_settings`), automatic by default. Text is the brain and
* can't be turned off; the others are helpers it calls on.
* setting (`harness_settings`). Text is the brain and can't be turned off;
* the others are helpers it calls on. `automatic` ones pick a free model
* themselves when none is picked; the rest (transcription, speech) are
* not available until one is, since free picks there rarely work.
*/
export const Harnesses = [
{
title: "Text",
value: "text",
automatic: true,
description: `Chats, plans and works on computers. Every bot thinks with it.`,
required: true,
},
{
title: "Media reading",
value: "vision",
automatic: true,
description: `Reads images, scans and screenshots for the text model when it can't see them itself.`,
required: false,
},
{
title: "Transcription",
value: "transcription",
automatic: false,
description: `Turns voice messages and recordings into text.`,
required: false,
},
{
title: "Speech",
value: "speech",
automatic: false,
description: `Reads bot replies aloud.`,
required: false,
},
{
title: "Image generation",
value: "image",
automatic: true,
description: `Makes images when a bot is asked for one.`,
required: false,
},