mirror of
https://github.com/Pasta-Devs/Marinara-Agents.git
synced 2026-12-03 18:55:07 +07:00
[PR #1281] [MERGED] fix(calls): 1.1.0 — use the Engine's speech-to-text server and keep speech said while transcribing #1379
Labels
No labels
agent: chess
agent: conversation-calls
agent: eightball
agent: haptic
agent: hierarchical-maps
agent: hierarchical-maps
agent: illustrator
agent: poker
agent: rock-paper-scissors
agent: tic-tac-toe
agent: uno
artifacts
bug
bugfix
build
catalog
ci
client
dependencies
docs
documentation
enhancement
feature
fixed-in-staging
in-pr
normal-scope
packages
pull-request
qol
regression
roadmap
scope-risk
server
soup
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Agents#1379
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 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)
8ac6e78chore(calls): build the call routes and surface from package-owned copiesd31d79cfix(calls): 1.1.0 — use the Engine's speech-to-text server and queue speech (#1280)238b831chore(calls): describe which Calls files override vendored copies6b98bd8fix(calls): escape backslashes in call prompt option listsa7ea1b8fix(calls): skip Local Whisper and queued speech once the call is gone3149b90Merge origin/staging into fix/1280-calls-speech-to-text9dc3c25fix(calls): save nothing when the call ends during a slow transcription8499918Merge 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
Linked issue
Closes #1280
Engine side: Pasta-Devs/Marinara-Engine#7353 (for Pasta-Devs/Marinara-Engine#7344).
Why this change
api.runtime.integrations.speech.transcribe(...). Calls has to ask for it, because call transcription runs inside this package (POST /:id/mediacalled its own copy ofsidecarSpeechService.transcribeWav).What changed
Package:
conversation-calls1.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, newservices/conversation/call-transcription.ts)POST /:id/mediafirst callsruntime.integrations.speech.transcribe(wav, { filename: "call-audio.wav", mimeType: "audio/wav", signal }). The signal aborts if the browser disconnects.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.extra.speechServer: truefor server transcripts. Local Whisper transcripts keepextra.localWhisper: trueexactly 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 thenetworkpermission the capability requires, so permissions are unchanged.Client (
ConversationCallSurface.tsx, newlib/call-speech-queue.ts)CALL_MIC_SILENCE_MS = 3_000(a 3 s pause ends a clip),CALL_MIC_RMS_START = 0.022,CALL_MIC_RMS_CONTINUE = 0.013andCALL_MIC_MIN_PEAK_RMS = 0.022.Why the sources moved into the package (first commit)
conversation-calls.routes.tsandConversationCallSurface.tsxlived insources/engine, wherescripts/vendored-engine-baseline.jsonpins their hashes and only allows entries to be removed. They are now package-owned overrides underpackages/conversation-calls/src/engine/(the Noodle/Slurp pattern). The first commit copies them verbatim plus onelet→constthat lint requires; the rebuiltserver.mjs/client.jsfrom that commit are byte-identical to a rebuild from the vendored files. Review the second commit for the behaviour change.npm run typecheck:packagesnow covers Calls, and the Calls release regression reads the surface that actually ships.packages/, CodeQL scans them. It flaggedjs/incomplete-sanitizationin the existingformatPromptOptionList, which escaped quotes but not backslashes in names quoted into the call prompt. The last commit escapes backslashes first.Build: built with
MARINARA_ENGINE_ROOTat Engined71106851(staging just before Calls 1.0.17 was built). With the Agents tree of the 1.0.17 release commit (40fe81f6), it rebuilds the publishedconversation-calls-1.0.17.zip,server.mjsandclient.jsbyte for byte. The newserver.mjsalso 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 andscripts/vendored-engine-baseline.jsonare unchanged.Package and security impact
conversation-callsengine.minstays 2.4.1. On Engines without Pasta-Devs/Marinara-Engine#7353, Calls keeps using Local Whisper.networkpermission. URL policy, size and time limits and the API key stay on the Engine side.speechServer) on new call messages.Validation
node scripts/validate-catalog.mjspasses locallygit diff --checkpasses locallyCONTRIBUTING.mdManual verification notes
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, newcalls-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 theruntimewiring. 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" withextra.speechServer: true, and the upload wascall-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.mjsagainst Engine staging fails with 116 drift entries, identical on a pristineorigin/stagingworktree (this PR does not touchsources/engineor the baseline).tests/package-calls.e2e.tstimes out on both desktop and mobile against current Engine staging, also identical on pristineorigin/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, atd31d79c4) reported one finding, which was not fixed here. The finding:cleanupLiveCallMediadepends oncameraStream/screenStreamand 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 ina7ea1b87(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 in9dc3c251, the late-transcript case above.tests/calls-speech-to-text.regression.tsnow also checks the source and the builtserver.mjsfor that check, and fails without it.origin/staging(Noodle 1.5.3) was merged in. Calls was rebuilt against Engined71106851, and rebuilding again changes nothing. The previous head3149b905also rebuilt byte for byte. Onlyserver.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.jsdiffers only in the queue, andserver.mjsonly in the routes plus the two vendored fixes named above. All checks listed above were rerun on the merged tree and pass. A fulltscof 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: withoutthrowIfAborted, 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 Enginestagingworktree (3392afd31, which includes Pasta-Devs/Marinara-Engine#7353) with a loopback fake server. A clip was saved as "hola desde el servidor" withextra.speechServer: true, uploaded ascall-audio.wav/audio/wav. Then, with a server that took 4 s to answer, the call was ended 1 s in. At3149b905that 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 at8499918d: 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
transcriptionModefromdata.fieldsafter reading the file. The Calls client appends that field after the file, andreq.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
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
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.