mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #1987] [Issue]: Issue-Report (English) — 60 s TTS timeout #972
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#972
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?
Originally created by @GerdW on GitHub (Jun 2, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/1987
Originally assigned to: @cha1latte on GitHub.
Issue-Report (English) — 60 s TTS timeout
Summary
The server-side TTS proxy (
POST /api/tts/speak) hard-codes a 60-second request timeout (AbortSignal.timeout(60_000)), with no environment variable or setting to change it. Self-hosted, OpenAI-compatible TTS backends that are slower than real-time (e.g. voice-cloning models at RTF ≈ 2–3) exceed 60s even for a single chunk and fail with a 502, making higher-quality local TTS effectively unusable.Expected behavior
The TTS request timeout should be configurable (e.g. a
TTS_REQUEST_TIMEOUT_MSenvironment variable, or a per-connection setting), so users running slower self-hosted TTS providers can raise it to match their backend's generation time.Actual behavior
The timeout is fixed at 60,000 ms in code and cannot be overridden. When a single TTS chunk takes longer than 60s to synthesize, the provider fetch aborts and the endpoint returns
502 { "error": "TTS request timed out" }. Client-side sentence/length chunking (~900 chars per request) does not prevent this, because a single chunk on a slow backend can still exceed 60s.Steps to reproduce
Environment
Logs, screenshots, or video
TTS provider request failed: TimeoutError
POST /api/tts/speak -> 502 { "error": "TTS request timed out" }
(Server log shows a
TimeoutErrorexactly 60s after the request is issued.)Additional context
packages/server/src/routes/tts.routes.ts, in thePOST /api/tts/speakhandler —signal: AbortSignal.timeout(60_000)on the providersafeFetch. The value is a literal constant; there is no env/config override.packages/client/src/lib/tts-dialogue.ts,DEFAULT_TTS_CHUNK_CHAR_LIMIT = 900) already splits text into chunks sent as separate/api/tts/speakrequests, but the per-chunk ceiling still blocks slow backends.TTS_REQUEST_TIMEOUT_MS, default 60000) and/or expose it as a per-connection setting. Optionally makeDEFAULT_TTS_CHUNK_CHAR_LIMITconfigurable so users can trade smaller chunks for staying under the timeout.Template check
Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:
@cha1latte commented on GitHub (Jun 2, 2026):
fixed in refactor in #1990