Mintplex-Labs/anything-llm · error

TTS could not be completed

Error message

TTS could not be completed

What it means

Catch-all around the workspace TTS flow: converting the chat's text to speech (provider call, buffering, or cache write) threw, so no audio can be returned and a 500 'TTS could not be completed' is sent after logging.

Source

Thrown at server/endpoints/workspaces.js:676

        }

        const text = safeJsonParse(wsChat.response, null)?.text;
        if (!text) return response.sendStatus(204).end();

        const TTSProvider = getTTSProvider();
        const buffer = await TTSProvider.ttsBuffer(text);
        if (buffer === null) return response.sendStatus(204).end();

        const { mime } = getAudioFileInfo(buffer);
        responseCache.set(cacheKey, { buffer, mime });
        response.writeHead(200, {
          "Content-Type": mime,
        });
        response.end(buffer);
        return;
      } catch (error) {
        console.error("Error processing the TTS request:", error);
        response.status(500).json({ message: "TTS could not be completed" });
      }
    }
  );

  app.post(
    "/workspace/:slug/thread/fork",
    [validatedRequest, flexUserRoleValid([ROLES.all]), validWorkspaceSlug],
    async (request, response) => {
      try {
        const user = await userFromSession(request, response);
        const workspace = response.locals.workspace;
        const { chatId, threadSlug } = reqBody(request);
        if (!chatId)
          return response.status(400).json({ message: "chatId is required" });

        // Get threadId we are branching from if that request body is sent
        // and is a valid thread slug.
        const threadId = !!threadSlug

View on GitHub (pinned to 3aec848f28)

Solutions

  1. Verify the TTS provider is configured and reachable.
  2. Check the TTS provider credentials and server logs, then retry.
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at server/endpoints/workspaces.js:676 when the library encounters an invalid state.

Common situations: Text-to-speech synthesis failed in the provider or configuration.


AI-assisted analysis of Mintplex-Labs/anything-llm@3aec848f28 (2026-08-18). Data as JSON: /api/errors/ac4cb3f68993e7bd. Report an issue: GitHub.