[PR #1281] [MERGED] fix(calls): 1.1.0 — use the Engine's speech-to-text server and keep speech said while transcribing #1379

Closed
opened 2026-10-21 05:10:07 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Agents/pull/1281
Author: @SpicyMarinara
Created: 10/9/2026
Status: ✅ Merged
Merged: 10/9/2026
Merged by: @SpicyMarinara

Base: staging ← Head: fix/1280-calls-speech-to-text


📝 Commits (8)

  • 8ac6e78 chore(calls): build the call routes and surface from package-owned copies
  • d31d79c fix(calls): 1.1.0 — use the Engine's speech-to-text server and queue speech (#1280)
  • 238b831 chore(calls): describe which Calls files override vendored copies
  • 6b98bd8 fix(calls): escape backslashes in call prompt option lists
  • a7ea1b8 fix(calls): skip Local Whisper and queued speech once the call is gone
  • 3149b90 Merge origin/staging into fix/1280-calls-speech-to-text
  • 9dc3c25 fix(calls): save nothing when the call ends during a slow transcription
  • 8499918 Merge origin/staging into fix/1280-calls-speech-to-text

📊 Changes

20 files changed (+6835 additions, -215 deletions)

View changed files

📝 .github/workflows/pull-request-checks.yml (+3 -0)
➕ artifacts/conversation-calls-1.1.0.zip (+0 -0)
📝 catalog/catalog.json (+8 -8)
📝 catalog/notes.json (+6 -0)
📝 catalog/v2/catalog.json (+8 -8)
📝 catalog/v2/notes.json (+6 -0)
📝 catalog/v3/catalog.json (+8 -8)
📝 catalog/v3/notes.json (+6 -0)
📝 package.json (+1 -1)
📝 packages/conversation-calls/CHANGELOG.md (+5 -0)
📝 packages/conversation-calls/client.js (+10 -10)
📝 packages/conversation-calls/manifest.json (+5 -5)
📝 packages/conversation-calls/server.mjs (+166 -166)
➕ packages/conversation-calls/src/engine/packages/client/src/components/chat/ConversationCallSurface.tsx (+3266 -0)
➕ packages/conversation-calls/src/engine/packages/client/src/lib/call-speech-queue.ts (+27 -0)
➕ packages/conversation-calls/src/engine/packages/server/src/routes/conversation-calls.routes.ts (+3020 -0)
➕ packages/conversation-calls/src/engine/packages/server/src/services/conversation/call-transcription.ts (+60 -0)
📝 scripts/build-feature-packages.mjs (+18 -6)
➕ tests/calls-speech-to-text.regression.ts (+209 -0)
📝 tests/conversation-calls-summary.regression.mjs (+3 -3)

📄 Description

Pull request

Important

Contributions target staging. Only SpicyMarinara may promote this repository's staging branch to main.
Outside and first-time contributors also require an approving review from SpicyMarinara.

Linked issue

Closes #1280

Engine side: Pasta-Devs/Marinara-Engine#7353 (for Pasta-Devs/Marinara-Engine#7344).

Why this change

  • A Calls user finds that Local Whisper misunderstands their native language. Pasta-Devs/Marinara-Engine#7353 adds a Speech to Text server setting in Engine Connections and an optional host call, api.runtime.integrations.speech.transcribe(...). Calls has to ask for it, because call transcription runs inside this package (POST /:id/media called its own copy of sidecarSpeechService.transcribeWav).
  • Speech recorded while the previous clip was still being transcribed was thrown away with "Still processing your last voice message." Users describe this as "the mic cuts off before I finish talking": a 3-second pause ends a clip, and anything said while it is transcribed was lost.

What changed

Package: conversation-calls 1.0.17 → 1.1.0 (the staging catalog has published up to 1.0.17; a closed, unmerged branch once used 1.0.18, so this skips it).

Server (conversation-calls.routes.ts, new services/conversation/call-transcription.ts)

  • In Local Whisper mode, POST /:id/media first calls runtime.integrations.speech.transcribe(wav, { filename: "call-audio.wav", mimeType: "audio/wav", signal }). The signal aborts if the browser disconnects.
  • It falls back to Local Whisper when the Engine has no speech integration (older Engines, feature-detected), when the server is off (null), or when it fails (logged at warn). If Local Whisper then fails too, the user sees the server's reason, not "Download Local Whisper…". If the browser has disconnected, Local Whisper is not started.
  • The blank-transcript checks are unchanged. Their message names whichever engine answered ("The speech-to-text server did not detect speech." / the existing Local Whisper text).
  • After transcription the route checks the call again before saving anything. Hanging up does not cancel the upload, and the Engine gives the server up to two minutes. Before this check, a transcript that arrived after hang-up was saved into the ended call and a character reply was generated for it. The route now answers "Call is not active" (existing text) and saves nothing.
  • The saved call message carries extra.speechServer: true for server transcripts. Local Whisper transcripts keep extra.localWhisper: true exactly as before. Nothing in Calls or the Engine reads either field today.
  • scripts/build-feature-packages.mjs: the Calls entry registers its routes with { prefix, runtime: api.runtime }. Calls already declares the network permission the capability requires, so permissions are unchanged.

Client (ConversationCallSurface.tsx, new lib/call-speech-queue.ts)

  • A recorded clip takes one of 3 places (the clip being transcribed and two waiting after it). Clips run through the surface's existing serial interaction queue, so they are sent in the order they were spoken, each after the previous reply.
  • A clip frees its place once its transcript and reply come back, before playback, as before. Past three, the existing notice still drops the clip.
  • Hang-up clears the places; clips still queued are skipped by the existing cancelled-call check.
  • When a character ends the call, the call is now marked cancelled before it is ended (as hanging up already did), so clips still queued behind that reply are skipped instead of failing with "Call is not active".
  • Not changed, as asked: CALL_MIC_SILENCE_MS = 3_000 (a 3 s pause ends a clip), CALL_MIC_RMS_START = 0.022, CALL_MIC_RMS_CONTINUE = 0.013 and CALL_MIC_MIN_PEAK_RMS = 0.022.

Why the sources moved into the package (first commit)

  • conversation-calls.routes.ts and ConversationCallSurface.tsx lived in sources/engine, where scripts/vendored-engine-baseline.json pins their hashes and only allows entries to be removed. They are now package-owned overrides under packages/conversation-calls/src/engine/ (the Noodle/Slurp pattern). The first commit copies them verbatim plus one let → const that lint requires; the rebuilt server.mjs/client.js from that commit are byte-identical to a rebuild from the vendored files. Review the second commit for the behaviour change.
  • The vendored copies and their baseline entries stay untouched. Removing them (a baseline shrink) can be a follow-up.
  • The Calls entry now also imports its command runtime, character videos and storage from the build root. Without that, the overlay bundled a second copy of 54 shared modules (+150 KB).
  • npm run typecheck:packages now covers Calls, and the Calls release regression reads the surface that actually ships.
  • Because the routes now sit under packages/, CodeQL scans them. It flagged js/incomplete-sanitization in the existing formatPromptOptionList, which escaped quotes but not backslashes in names quoted into the call prompt. The last commit escapes backslashes first.

Build: built with MARINARA_ENGINE_ROOT at Engine d71106851 (staging just before Calls 1.0.17 was built). With the Agents tree of the 1.0.17 release commit (40fe81f6), it rebuilds the published conversation-calls-1.0.17.zip, server.mjs and client.js byte for byte. The new server.mjs also picks up two vendored fixes that merged after 1.0.17 (SwarmUI LoRAs and prompt images without a custom workflow; OpenAI-compatible base URLs with a trailing slash). Reverting just those two files on current staging also reproduces 1.0.17 byte for byte. sources/engine, the vendored shared dist and scripts/vendored-engine-baseline.json are unchanged.

Package and security impact

  • Affected package IDs: conversation-calls
  • Engine compatibility impact: none. engine.min stays 2.4.1. On Engines without Pasta-Devs/Marinara-Engine#7353, Calls keeps using Local Whisper.
  • New or changed permissions/entrypoints: none. The speech capability uses the existing network permission. URL policy, size and time limits and the API key stay on the Engine side.
  • Restart, storage, update, or uninstall impact: none beyond the usual restart after updating. No migration; one new optional field (speechServer) on new call messages.

Validation

  • node scripts/validate-catalog.mjs passes locally
  • git diff --check passes locally
  • Rebuilt every affected manifest, payload, artifact, and catalog entry
  • Installed or updated the affected package through Marinara Engine
  • Checked supported modes, restart behavior, and uninstall cleanup
  • Read and followed CONTRIBUTING.md

Manual verification notes

  • Manually verify, on an Engine with Pasta-Devs/Marinara-Engine#7353, that a Mic recording + Local Whisper call sends speech to the Speech to Text server while its switch is on (the transcript matches the server's language), and goes back to Local Whisper when it is off.
  • Manually verify that with the server on but unreachable, a call still transcribes with Local Whisper if it is downloaded, and otherwise shows the server's error.
  • Manually verify that if you keep talking after a 3-second pause, the second part is sent after the character answers the first, instead of "Still processing your last voice message."
  • Manually verify that hanging up while clips are queued sends nothing more and the next call starts clean.
  • Manually verify that hanging up while a slow speech-to-text server is still transcribing adds no message or reply to the ended call.
  • Manually verify Calls still works on a stable Engine without Speech to Text (Local Whisper only).

Agent-run checks: npm run check (pass; 4 existing warnings in other packages), npm run typecheck:packages (pass, now including Calls), npm run test:security, node scripts/test-catalog-lanes.mjs, node scripts/tests/ui-translation-retention.regression.mjs, node scripts/validate-package-locales.mjs, node scripts/validate-package-locale-keys.mjs, node scripts/validate-catalog.mjs, node scripts/tests/catalog-generatedat-determinism.regression.mjs, node scripts/tests/catalog-release-notes.regression.mjs, node scripts/tests/vendored-engine.regression.mjs, node scripts/tests/ruleset-package.regression.mjs, node scripts/validate-pr-triage.mjs, git diff --check, and the Calls regressions (calls-playback, conversation-calls-summary, calls-swarmui-video, new calls-speech-to-text) all pass. The new regression fails on the old behaviour: with the server step removed (always Local Whisper), with the queue limit set back to 1 (the old one-clip gate), and against a bundle built without the runtime wiring. It is wired into Catalog validation. A temporary Playwright proof (deleted, not committed) installed the 1.1.0 artifact into the Engine at the head of Pasta-Devs/Marinara-Engine#7353 with a loopback fake transcription server. With the server on, a recorded WAV was saved as "hola desde el servidor" with extra.speechServer: true, and the upload was call-audio.wav / audio/wav. With the server answering 500, the response was "The speech-to-text server answered 500: model crashed" (no Local Whisper model there). With it off, the request went to Local Whisper. On Engine staging (no speech integration), the same request went to Local Whisper. node scripts/validate-vendored-engine.mjs against Engine staging fails with 116 drift entries, identical on a pristine origin/staging worktree (this PR does not touch sources/engine or the baseline). tests/package-calls.e2e.ts times out on both desktop and mobile against current Engine staging, also identical on pristine origin/staging: the Engine's new "Make this chat your own" intro covers the call button. With that intro dismissed in a local-only tweak, desktop passed with this build and with pristine, and mobile timed out in both. Local CodeRabbit (one run, at d31d79c4) reported one finding, which was not fixed here. The finding: cleanupLiveCallMedia depends on cameraStream/screenStream and is the cleanup of the unmount effect, so turning the camera or screen share on or off tears down live call media. That stops the mic, cuts the character's voice, can stop the camera when screen share starts, and now also clears the queue places. This is real, but it predates this PR: the old code reset its one-clip flag in that same callback, with the same dependencies, so a toggle already reset the gate. It also matters for native video mode. The mic recording keeps the camera or screen track it had when recording started, and this teardown is currently what makes the next unmute pick up a new track. Changing it needs camera testing on real devices, so it should be its own issue. After that run: a builder comment, the one-line CodeQL escape fix, and the two GitHub CodeRabbit findings, all fixed in a7ea1b87 (no Local Whisper after a disconnect, with a regression case that fails without it; cancel before a character ends the call). CodeRabbit was not rerun locally; the GitHub review covers those commits. origin/staging (Long-Term Memory 1.4.21) was merged in. After each change the package was rebuilt against the same Engine root, and the checks above were rerun on the merged tree. All passed, and rebuilding Calls on the merged tree changes nothing.

Verification pass (adversarial review, head 8499918d): one defect fixed in 9dc3c251, the late-transcript case above. tests/calls-speech-to-text.regression.ts now also checks the source and the built server.mjs for that check, and fails without it. origin/staging (Noodle 1.5.3) was merged in. Calls was rebuilt against Engine d71106851, and rebuilding again changes nothing. The previous head 3149b905 also rebuilt byte for byte. Only server.mjs, the manifest, the artifact and the catalog hashes changed; a token-level diff of the bundle shows only the new check. Against 1.0.17, client.js differs only in the queue, and server.mjs only in the routes plus the two vendored fixes named above. All checks listed above were rerun on the merged tree and pass. A full tsc of the overlaid Engine tree (with the shared types built) reports no new errors in the four Calls files, and the one remaining error there is identical in the vendored copies. The mutation runs fail as expected: without throwIfAborted, with a queue limit of 1, and with the server step disabled. A temporary request-level Playwright proof (deleted, not committed) installed the artifact into an Engine staging worktree (3392afd31, which includes Pasta-Devs/Marinara-Engine#7353) with a loopback fake server. A clip was saved as "hola desde el servidor" with extra.speechServer: true, uploaded as call-audio.wav / audio/wav. Then, with a server that took 4 s to answer, the call was ended 1 s in. At 3149b905 that clip was still saved into the ended call (HTTP 200). With the fix it got 400 "Call is not active" and no message was added. Local CodeRabbit on the full PR diff at 8499918d: no findings. GitHub "Calls package browser" also fails on staging PR runs from 2026-10-06 with the same 60 s timeouts, so it is not caused by this PR.

Found while verifying, not changed here: the media route reads transcriptionMode from data.fields after reading the file. The Calls client appends that field after the file, and req.file() can return before busboy has parsed it. In the temporary proof, uploads in the client's order (file first) were treated as provider-native audio and failed with "Selected provider/model cannot receive provider-native audio input. Choose another audio input mode." This happened in 1 of 12 uploads on one run and 2 of 12 on another; with the fields sent first, none failed. That lost clip predates this PR (same route code and client order in 1.0.17) and should get its own issue.

Documentation impact

  • No documentation changes needed
  • Updated this README catalog and package guidance
  • Updated linked Marinara Engine documentation

Pasta-Devs/Marinara-Engine#7353 documents the Engine side in docs/conversation/calls.md. Once this ships, that page could name Calls 1.1.0 as the version that uses the server.

UI evidence (if applicable)

No visual change: the queue changes when speech is sent, not what is shown.

Summary by CodeRabbit

  • New Features
    • Microphone recordings can use the configured speech-to-text server, with Local Whisper as a fallback when the server is unavailable or fails.
    • Recordings made while another clip is being transcribed are queued instead of being dropped.
    • Calls include participant tiles, chat, reactions, attachments, and call controls.
    • Call audio supports synchronized character video and voice playback.
  • Bug Fixes
    • Improved handling of transcription failures and cancellation, including preventing fallback when transcription is cancelled.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Agents/pull/1281 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 10/9/2026 **Status:** ✅ Merged **Merged:** 10/9/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `fix/1280-calls-speech-to-text` --- ### 📝 Commits (8) - [`8ac6e78`](https://github.com/Pasta-Devs/Marinara-Agents/commit/8ac6e781e69f38bcabdb25aea8ba7b3e6f4b6cc6) chore(calls): build the call routes and surface from package-owned copies - [`d31d79c`](https://github.com/Pasta-Devs/Marinara-Agents/commit/d31d79c41ac70de0687e8ccc84a29c438088aa1d) fix(calls): 1.1.0 — use the Engine's speech-to-text server and queue speech (#1280) - [`238b831`](https://github.com/Pasta-Devs/Marinara-Agents/commit/238b831f68f004070b27adf9801e1c7769c9ead8) chore(calls): describe which Calls files override vendored copies - [`6b98bd8`](https://github.com/Pasta-Devs/Marinara-Agents/commit/6b98bd8e3d818bd8773062fbd925844267fafd54) fix(calls): escape backslashes in call prompt option lists - [`a7ea1b8`](https://github.com/Pasta-Devs/Marinara-Agents/commit/a7ea1b8770456efcecf6955b567c1d0ae9698a24) fix(calls): skip Local Whisper and queued speech once the call is gone - [`3149b90`](https://github.com/Pasta-Devs/Marinara-Agents/commit/3149b905d013740354b7a6fbfa6fec468f554075) Merge origin/staging into fix/1280-calls-speech-to-text - [`9dc3c25`](https://github.com/Pasta-Devs/Marinara-Agents/commit/9dc3c251973f50e9364ac03723aea60bc4922417) fix(calls): save nothing when the call ends during a slow transcription - [`8499918`](https://github.com/Pasta-Devs/Marinara-Agents/commit/8499918d8c4f40bf6190666c3814867af6a0815c) Merge origin/staging into fix/1280-calls-speech-to-text ### 📊 Changes **20 files changed** (+6835 additions, -215 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/pull-request-checks.yml` (+3 -0) ➕ `artifacts/conversation-calls-1.1.0.zip` (+0 -0) 📝 `catalog/catalog.json` (+8 -8) 📝 `catalog/notes.json` (+6 -0) 📝 `catalog/v2/catalog.json` (+8 -8) 📝 `catalog/v2/notes.json` (+6 -0) 📝 `catalog/v3/catalog.json` (+8 -8) 📝 `catalog/v3/notes.json` (+6 -0) 📝 `package.json` (+1 -1) 📝 `packages/conversation-calls/CHANGELOG.md` (+5 -0) 📝 `packages/conversation-calls/client.js` (+10 -10) 📝 `packages/conversation-calls/manifest.json` (+5 -5) 📝 `packages/conversation-calls/server.mjs` (+166 -166) ➕ `packages/conversation-calls/src/engine/packages/client/src/components/chat/ConversationCallSurface.tsx` (+3266 -0) ➕ `packages/conversation-calls/src/engine/packages/client/src/lib/call-speech-queue.ts` (+27 -0) ➕ `packages/conversation-calls/src/engine/packages/server/src/routes/conversation-calls.routes.ts` (+3020 -0) ➕ `packages/conversation-calls/src/engine/packages/server/src/services/conversation/call-transcription.ts` (+60 -0) 📝 `scripts/build-feature-packages.mjs` (+18 -6) ➕ `tests/calls-speech-to-text.regression.ts` (+209 -0) 📝 `tests/conversation-calls-summary.regression.mjs` (+3 -3) </details> ### 📄 Description # Pull request > [!IMPORTANT] > Contributions target `staging`. Only `SpicyMarinara` may promote this repository's `staging` branch to `main`. > Outside and first-time contributors also require an approving review from `SpicyMarinara`. ## Linked issue Closes #1280 Engine side: Pasta-Devs/Marinara-Engine#7353 (for Pasta-Devs/Marinara-Engine#7344). ## Why this change - A Calls user finds that Local Whisper misunderstands their native language. Pasta-Devs/Marinara-Engine#7353 adds a **Speech to Text** server setting in Engine **Connections** and an optional host call, `api.runtime.integrations.speech.transcribe(...)`. Calls has to ask for it, because call transcription runs inside this package (`POST /:id/media` called its own copy of `sidecarSpeechService.transcribeWav`). - Speech recorded while the previous clip was still being transcribed was thrown away with "Still processing your last voice message." Users describe this as "the mic cuts off before I finish talking": a 3-second pause ends a clip, and anything said while it is transcribed was lost. ## What changed Package: `conversation-calls` **1.0.17 → 1.1.0** (the staging catalog has published up to 1.0.17; a closed, unmerged branch once used 1.0.18, so this skips it). **Server** (`conversation-calls.routes.ts`, new `services/conversation/call-transcription.ts`) - In Local Whisper mode, `POST /:id/media` first calls `runtime.integrations.speech.transcribe(wav, { filename: "call-audio.wav", mimeType: "audio/wav", signal })`. The signal aborts if the browser disconnects. - It falls back to Local Whisper when the Engine has no speech integration (older Engines, feature-detected), when the server is off (`null`), or when it fails (logged at warn). If Local Whisper then fails too, the user sees the server's reason, not "Download Local Whisper…". If the browser has disconnected, Local Whisper is not started. - The blank-transcript checks are unchanged. Their message names whichever engine answered ("The speech-to-text server did not detect speech." / the existing Local Whisper text). - After transcription the route checks the call again before saving anything. Hanging up does not cancel the upload, and the Engine gives the server up to two minutes. Before this check, a transcript that arrived after hang-up was saved into the ended call and a character reply was generated for it. The route now answers "Call is not active" (existing text) and saves nothing. - The saved call message carries `extra.speechServer: true` for server transcripts. Local Whisper transcripts keep `extra.localWhisper: true` exactly as before. Nothing in Calls or the Engine reads either field today. - `scripts/build-feature-packages.mjs`: the Calls entry registers its routes with `{ prefix, runtime: api.runtime }`. Calls already declares the `network` permission the capability requires, so permissions are unchanged. **Client** (`ConversationCallSurface.tsx`, new `lib/call-speech-queue.ts`) - A recorded clip takes one of **3** places (the clip being transcribed and two waiting after it). Clips run through the surface's existing serial interaction queue, so they are sent in the order they were spoken, each after the previous reply. - A clip frees its place once its transcript and reply come back, before playback, as before. Past three, the existing notice still drops the clip. - Hang-up clears the places; clips still queued are skipped by the existing cancelled-call check. - When a character ends the call, the call is now marked cancelled before it is ended (as hanging up already did), so clips still queued behind that reply are skipped instead of failing with "Call is not active". - Not changed, as asked: `CALL_MIC_SILENCE_MS = 3_000` (a 3 s pause ends a clip), `CALL_MIC_RMS_START = 0.022`, `CALL_MIC_RMS_CONTINUE = 0.013` and `CALL_MIC_MIN_PEAK_RMS = 0.022`. **Why the sources moved into the package (first commit)** - `conversation-calls.routes.ts` and `ConversationCallSurface.tsx` lived in `sources/engine`, where `scripts/vendored-engine-baseline.json` pins their hashes and only allows entries to be removed. They are now package-owned overrides under `packages/conversation-calls/src/engine/` (the Noodle/Slurp pattern). The first commit copies them verbatim plus one `let` → `const` that lint requires; the rebuilt `server.mjs`/`client.js` from that commit are byte-identical to a rebuild from the vendored files. **Review the second commit for the behaviour change.** - The vendored copies and their baseline entries stay untouched. Removing them (a baseline shrink) can be a follow-up. - The Calls entry now also imports its command runtime, character videos and storage from the build root. Without that, the overlay bundled a second copy of 54 shared modules (+150 KB). - `npm run typecheck:packages` now covers Calls, and the Calls release regression reads the surface that actually ships. - Because the routes now sit under `packages/`, CodeQL scans them. It flagged `js/incomplete-sanitization` in the existing `formatPromptOptionList`, which escaped quotes but not backslashes in names quoted into the call prompt. The last commit escapes backslashes first. **Build**: built with `MARINARA_ENGINE_ROOT` at Engine `d71106851` (staging just before Calls 1.0.17 was built). With the Agents tree of the 1.0.17 release commit (`40fe81f6`), it rebuilds the published `conversation-calls-1.0.17.zip`, `server.mjs` and `client.js` byte for byte. The new `server.mjs` also picks up two vendored fixes that merged after 1.0.17 (SwarmUI LoRAs and prompt images without a custom workflow; OpenAI-compatible base URLs with a trailing slash). Reverting just those two files on current staging also reproduces 1.0.17 byte for byte. `sources/engine`, the vendored shared dist and `scripts/vendored-engine-baseline.json` are unchanged. ## Package and security impact - Affected package IDs: `conversation-calls` - Engine compatibility impact: none. `engine.min` stays 2.4.1. On Engines without Pasta-Devs/Marinara-Engine#7353, Calls keeps using Local Whisper. - New or changed permissions/entrypoints: none. The speech capability uses the existing `network` permission. URL policy, size and time limits and the API key stay on the Engine side. - Restart, storage, update, or uninstall impact: none beyond the usual restart after updating. No migration; one new optional field (`speechServer`) on new call messages. ## Validation - [ ] `node scripts/validate-catalog.mjs` passes locally - [ ] `git diff --check` passes locally - [ ] Rebuilt every affected manifest, payload, artifact, and catalog entry - [ ] Installed or updated the affected package through Marinara Engine - [ ] Checked supported modes, restart behavior, and uninstall cleanup - [ ] Read and followed `CONTRIBUTING.md` ### Manual verification notes - Manually verify, on an Engine with Pasta-Devs/Marinara-Engine#7353, that a **Mic recording + Local Whisper** call sends speech to the Speech to Text server while its switch is on (the transcript matches the server's language), and goes back to Local Whisper when it is off. - Manually verify that with the server on but unreachable, a call still transcribes with Local Whisper if it is downloaded, and otherwise shows the server's error. - Manually verify that if you keep talking after a 3-second pause, the second part is sent after the character answers the first, instead of "Still processing your last voice message." - Manually verify that hanging up while clips are queued sends nothing more and the next call starts clean. - Manually verify that hanging up while a slow speech-to-text server is still transcribing adds no message or reply to the ended call. - Manually verify Calls still works on a stable Engine without Speech to Text (Local Whisper only). Agent-run checks: `npm run check` (pass; 4 existing warnings in other packages), `npm run typecheck:packages` (pass, now including Calls), `npm run test:security`, `node scripts/test-catalog-lanes.mjs`, `node scripts/tests/ui-translation-retention.regression.mjs`, `node scripts/validate-package-locales.mjs`, `node scripts/validate-package-locale-keys.mjs`, `node scripts/validate-catalog.mjs`, `node scripts/tests/catalog-generatedat-determinism.regression.mjs`, `node scripts/tests/catalog-release-notes.regression.mjs`, `node scripts/tests/vendored-engine.regression.mjs`, `node scripts/tests/ruleset-package.regression.mjs`, `node scripts/validate-pr-triage.mjs`, `git diff --check`, and the Calls regressions (`calls-playback`, `conversation-calls-summary`, `calls-swarmui-video`, new `calls-speech-to-text`) all pass. The new regression fails on the old behaviour: with the server step removed (always Local Whisper), with the queue limit set back to 1 (the old one-clip gate), and against a bundle built without the `runtime` wiring. It is wired into **Catalog validation**. A temporary Playwright proof (deleted, not committed) installed the 1.1.0 artifact into the Engine at the head of Pasta-Devs/Marinara-Engine#7353 with a loopback fake transcription server. With the server on, a recorded WAV was saved as "hola desde el servidor" with `extra.speechServer: true`, and the upload was `call-audio.wav` / `audio/wav`. With the server answering 500, the response was "The speech-to-text server answered 500: model crashed" (no Local Whisper model there). With it off, the request went to Local Whisper. On Engine staging (no speech integration), the same request went to Local Whisper. `node scripts/validate-vendored-engine.mjs` against Engine staging fails with 116 drift entries, identical on a pristine `origin/staging` worktree (this PR does not touch `sources/engine` or the baseline). `tests/package-calls.e2e.ts` times out on both desktop and mobile against current Engine staging, also identical on pristine `origin/staging`: the Engine's new "Make this chat your own" intro covers the call button. With that intro dismissed in a local-only tweak, desktop passed with this build and with pristine, and mobile timed out in both. Local CodeRabbit (one run, at `d31d79c4`) reported one finding, which was not fixed here. The finding: `cleanupLiveCallMedia` depends on `cameraStream`/`screenStream` and is the cleanup of the unmount effect, so turning the camera or screen share on or off tears down live call media. That stops the mic, cuts the character's voice, can stop the camera when screen share starts, and now also clears the queue places. This is real, but it predates this PR: the old code reset its one-clip flag in that same callback, with the same dependencies, so a toggle already reset the gate. It also matters for native video mode. The mic recording keeps the camera or screen track it had when recording started, and this teardown is currently what makes the next unmute pick up a new track. Changing it needs camera testing on real devices, so it should be its own issue. After that run: a builder comment, the one-line CodeQL escape fix, and the two GitHub CodeRabbit findings, all fixed in `a7ea1b87` (no Local Whisper after a disconnect, with a regression case that fails without it; cancel before a character ends the call). CodeRabbit was not rerun locally; the GitHub review covers those commits. `origin/staging` (Long-Term Memory 1.4.21) was merged in. After each change the package was rebuilt against the same Engine root, and the checks above were rerun on the merged tree. All passed, and rebuilding Calls on the merged tree changes nothing. Verification pass (adversarial review, head `8499918d`): one defect fixed in `9dc3c251`, the late-transcript case above. `tests/calls-speech-to-text.regression.ts` now also checks the source and the built `server.mjs` for that check, and fails without it. `origin/staging` (Noodle 1.5.3) was merged in. Calls was rebuilt against Engine `d71106851`, and rebuilding again changes nothing. The previous head `3149b905` also rebuilt byte for byte. Only `server.mjs`, the manifest, the artifact and the catalog hashes changed; a token-level diff of the bundle shows only the new check. Against 1.0.17, `client.js` differs only in the queue, and `server.mjs` only in the routes plus the two vendored fixes named above. All checks listed above were rerun on the merged tree and pass. A full `tsc` of the overlaid Engine tree (with the shared types built) reports no new errors in the four Calls files, and the one remaining error there is identical in the vendored copies. The mutation runs fail as expected: without `throwIfAborted`, with a queue limit of 1, and with the server step disabled. A temporary request-level Playwright proof (deleted, not committed) installed the artifact into an Engine `staging` worktree (`3392afd31`, which includes Pasta-Devs/Marinara-Engine#7353) with a loopback fake server. A clip was saved as "hola desde el servidor" with `extra.speechServer: true`, uploaded as `call-audio.wav` / `audio/wav`. Then, with a server that took 4 s to answer, the call was ended 1 s in. At `3149b905` that clip was still saved into the ended call (HTTP 200). With the fix it got 400 "Call is not active" and no message was added. Local CodeRabbit on the full PR diff at `8499918d`: no findings. GitHub "Calls package browser" also fails on staging PR runs from 2026-10-06 with the same 60 s timeouts, so it is not caused by this PR. Found while verifying, not changed here: the media route reads `transcriptionMode` from `data.fields` after reading the file. The Calls client appends that field after the file, and `req.file()` can return before busboy has parsed it. In the temporary proof, uploads in the client's order (file first) were treated as provider-native audio and failed with "Selected provider/model cannot receive provider-native audio input. Choose another audio input mode." This happened in 1 of 12 uploads on one run and 2 of 12 on another; with the fields sent first, none failed. That lost clip predates this PR (same route code and client order in 1.0.17) and should get its own issue. ## Documentation impact - [ ] No documentation changes needed - [ ] Updated this README catalog and package guidance - [ ] Updated linked Marinara Engine documentation Pasta-Devs/Marinara-Engine#7353 documents the Engine side in `docs/conversation/calls.md`. Once this ships, that page could name Calls 1.1.0 as the version that uses the server. ## UI evidence (if applicable) No visual change: the queue changes when speech is sent, not what is shown. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Microphone recordings can use the configured speech-to-text server, with Local Whisper as a fallback when the server is unavailable or fails. * Recordings made while another clip is being transcribed are queued instead of being dropped. * Calls include participant tiles, chat, reactions, attachments, and call controls. * Call audio supports synchronized character video and voice playback. * **Bug Fixes** * Improved handling of transcription failures and cancellation, including preventing fallback when transcription is cancelled. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-21 05:10:07 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Agents#1379
No description provided.