From dca0fcc59f25ea6b92e293789ed30ef35a193700 Mon Sep 17 00:00:00 2001
From: Z User
Date: Thu, 29 Oct 2026 21:42:08 +0000
Subject: [PATCH] fix: TTS logs in Logs tab + TTS generate buffer fix + Russian
voice hint + v0.8.2
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
## Fixes
### 1. TTS logs in Logs tab
Added 'tts' to the logs target selector in the Logs tab. Now you can
stream docker logs from the TTS container.
### 2. TTS generate fetch failed
Changed /api/tts/generate from streaming res.body directly to
res.arrayBuffer() first, then returning the buffer. Next.js sometimes
cuts off streaming responses from server-side fetch — buffering avoids
this.
Also improved error messages:
- ECONNREFUSED / fetch failed → 'TTS container is not running...'
- ENOTFOUND → 'TTS container not found on Docker network...'
### 3. Russian voice accent
Built-in voices (alloy, nova, shimmer) are English-trained and will
speak Russian with an accent. Added a prominent hint in the TTS tab
explaining that for natural Russian, you need to upload a custom WAV
sample of a Russian speaker.
## Version → 0.8.2
---
dashboard/src/app/api/debug/route.ts | 2 +-
dashboard/src/app/api/tts/generate/route.ts | 18 +++++++++++++++---
dashboard/src/app/page.tsx | 19 ++++++++++++++-----
dashboard/src/lib/version.ts | 2 +-
4 files changed, 31 insertions(+), 10 deletions(-)
diff --git a/dashboard/src/app/api/debug/route.ts b/dashboard/src/app/api/debug/route.ts
index b4b1c96..5392b6d 100644
--- a/dashboard/src/app/api/debug/route.ts
+++ b/dashboard/src/app/api/debug/route.ts
@@ -120,7 +120,7 @@ export async function GET() {
ok: envError === null,
error: envError,
},
- version: "0.8.1",
+ version: "0.8.2",
timestamp: new Date().toISOString(),
});
}
diff --git a/dashboard/src/app/api/tts/generate/route.ts b/dashboard/src/app/api/tts/generate/route.ts
index 726318e..60ac6e3 100644
--- a/dashboard/src/app/api/tts/generate/route.ts
+++ b/dashboard/src/app/api/tts/generate/route.ts
@@ -62,16 +62,28 @@ export async function POST(req: NextRequest) {
res.headers.get("content-type") || "audio/mpeg";
const format = body.response_format || "mp3";
- // Stream the audio response back to the browser
- return new Response(res.body, {
+ // Read the full response into a buffer, then return it as a Response.
+ // (Streaming res.body directly sometimes doesn't work through Next.js
+ // server components — the connection gets cut off.)
+ const arrayBuffer = await res.arrayBuffer();
+
+ return new Response(arrayBuffer, {
headers: {
"Content-Type": contentType,
"Content-Disposition": `attachment; filename="tts-output.${format}"`,
+ "Content-Length": `${arrayBuffer.byteLength}`,
},
});
} catch (err) {
+ const msg = (err as Error).message;
+ const hint =
+ msg.includes("ECONNREFUSED") || msg.includes("fetch failed")
+ ? "TTS container is not running. Start it from the TTS tab or: docker compose --profile tts up -d tts"
+ : msg.includes("ENOTFOUND")
+ ? "TTS container not found on Docker network. Is it running?"
+ : msg;
return Response.json(
- { ok: false, error: (err as Error).message },
+ { ok: false, error: hint },
{ status: 503 }
);
}
diff --git a/dashboard/src/app/page.tsx b/dashboard/src/app/page.tsx
index 326c6f5..eadf05d 100644
--- a/dashboard/src/app/page.tsx
+++ b/dashboard/src/app/page.tsx
@@ -268,7 +268,7 @@ export default function DashboardPage() {
>([]);
const [logsAutoScroll, setLogsAutoScroll] = React.useState(true);
const [logsTarget, setLogsTarget] = React.useState<
- "llama" | "comfyui" | "dashboard" | "ssh"
+ "llama" | "comfyui" | "dashboard" | "ssh" | "tts"
>("llama");
const logsEndRef = React.useRef(null);
const logsEventSourceRef = React.useRef(null);
@@ -3315,8 +3315,8 @@ function LogsTab({
onClear,
logsEndRef,
}: {
- target: "llama" | "comfyui" | "dashboard" | "ssh";
- setTarget: (t: "llama" | "comfyui" | "dashboard" | "ssh") => void;
+ target: "llama" | "comfyui" | "dashboard" | "ssh" | "tts";
+ setTarget: (t: "llama" | "comfyui" | "dashboard" | "ssh" | "tts") => void;
liveLogs: { stream: "stdout" | "stderr"; line: string; ts?: number }[];
autoScroll: boolean;
setAutoScroll: (v: boolean) => void;
@@ -3348,6 +3348,7 @@ function LogsTab({
comfyuidashboardssh-main
+ tts
)}
- For XTTS voice cloning: mono 22050 Hz WAV, 6-30 seconds, clean sample.
- Russian is supported by XTTSv2. After upload, restart TTS to apply.
+ For natural Russian:{" "}
+ built-in voices (alloy, nova, shimmer) are English-trained and will
+ speak Russian with an accent. Upload a clean WAV sample of a Russian
+ speaker (10-20s, mono 22050 Hz, no noise) → restart TTS → select
+ the new voice. XTTSv2 supports Russian natively.
+
+
+ Good sources: audiobook samples (lib.ru), news clips, or record
+ yourself. Avoid music, breathing, or partial words.
+
diff --git a/dashboard/src/lib/version.ts b/dashboard/src/lib/version.ts
index ebbb474..0aa77a2 100644
--- a/dashboard/src/lib/version.ts
+++ b/dashboard/src/lib/version.ts
@@ -4,7 +4,7 @@
* Displayed in the footer and available via /api/debug so the user can
* verify the update actually took effect.
*/
-export const DASHBOARD_VERSION = "0.8.1";
+export const DASHBOARD_VERSION = "0.8.2";
/**
* Build timestamp — set at build time by Next.js.