Compare commits
2 Commits
fix/perf-f
...
fix/tts-lo
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dca0fcc59f | ||
| 5161de152a |
@@ -120,7 +120,7 @@ export async function GET() {
|
|||||||
ok: envError === null,
|
ok: envError === null,
|
||||||
error: envError,
|
error: envError,
|
||||||
},
|
},
|
||||||
version: "0.8.1",
|
version: "0.8.2",
|
||||||
timestamp: new Date().toISOString(),
|
timestamp: new Date().toISOString(),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -62,16 +62,28 @@ export async function POST(req: NextRequest) {
|
|||||||
res.headers.get("content-type") || "audio/mpeg";
|
res.headers.get("content-type") || "audio/mpeg";
|
||||||
const format = body.response_format || "mp3";
|
const format = body.response_format || "mp3";
|
||||||
|
|
||||||
// Stream the audio response back to the browser
|
// Read the full response into a buffer, then return it as a Response.
|
||||||
return new Response(res.body, {
|
// (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: {
|
headers: {
|
||||||
"Content-Type": contentType,
|
"Content-Type": contentType,
|
||||||
"Content-Disposition": `attachment; filename="tts-output.${format}"`,
|
"Content-Disposition": `attachment; filename="tts-output.${format}"`,
|
||||||
|
"Content-Length": `${arrayBuffer.byteLength}`,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
} catch (err) {
|
} 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(
|
return Response.json(
|
||||||
{ ok: false, error: (err as Error).message },
|
{ ok: false, error: hint },
|
||||||
{ status: 503 }
|
{ status: 503 }
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -268,7 +268,7 @@ export default function DashboardPage() {
|
|||||||
>([]);
|
>([]);
|
||||||
const [logsAutoScroll, setLogsAutoScroll] = React.useState(true);
|
const [logsAutoScroll, setLogsAutoScroll] = React.useState(true);
|
||||||
const [logsTarget, setLogsTarget] = React.useState<
|
const [logsTarget, setLogsTarget] = React.useState<
|
||||||
"llama" | "comfyui" | "dashboard" | "ssh"
|
"llama" | "comfyui" | "dashboard" | "ssh" | "tts"
|
||||||
>("llama");
|
>("llama");
|
||||||
const logsEndRef = React.useRef<HTMLDivElement | null>(null);
|
const logsEndRef = React.useRef<HTMLDivElement | null>(null);
|
||||||
const logsEventSourceRef = React.useRef<EventSource | null>(null);
|
const logsEventSourceRef = React.useRef<EventSource | null>(null);
|
||||||
@@ -3315,8 +3315,8 @@ function LogsTab({
|
|||||||
onClear,
|
onClear,
|
||||||
logsEndRef,
|
logsEndRef,
|
||||||
}: {
|
}: {
|
||||||
target: "llama" | "comfyui" | "dashboard" | "ssh";
|
target: "llama" | "comfyui" | "dashboard" | "ssh" | "tts";
|
||||||
setTarget: (t: "llama" | "comfyui" | "dashboard" | "ssh") => void;
|
setTarget: (t: "llama" | "comfyui" | "dashboard" | "ssh" | "tts") => void;
|
||||||
liveLogs: { stream: "stdout" | "stderr"; line: string; ts?: number }[];
|
liveLogs: { stream: "stdout" | "stderr"; line: string; ts?: number }[];
|
||||||
autoScroll: boolean;
|
autoScroll: boolean;
|
||||||
setAutoScroll: (v: boolean) => void;
|
setAutoScroll: (v: boolean) => void;
|
||||||
@@ -3348,6 +3348,7 @@ function LogsTab({
|
|||||||
<SelectItem value="comfyui">comfyui</SelectItem>
|
<SelectItem value="comfyui">comfyui</SelectItem>
|
||||||
<SelectItem value="dashboard">dashboard</SelectItem>
|
<SelectItem value="dashboard">dashboard</SelectItem>
|
||||||
<SelectItem value="ssh">ssh-main</SelectItem>
|
<SelectItem value="ssh">ssh-main</SelectItem>
|
||||||
|
<SelectItem value="tts">tts</SelectItem>
|
||||||
</SelectContent>
|
</SelectContent>
|
||||||
</Select>
|
</Select>
|
||||||
<label className="flex items-center gap-2 text-xs text-muted-foreground">
|
<label className="flex items-center gap-2 text-xs text-muted-foreground">
|
||||||
@@ -4734,8 +4735,16 @@ function TTSTab({
|
|||||||
</p>
|
</p>
|
||||||
)}
|
)}
|
||||||
<p className="text-[10px] text-muted-foreground">
|
<p className="text-[10px] text-muted-foreground">
|
||||||
For XTTS voice cloning: mono 22050 Hz WAV, 6-30 seconds, clean sample.
|
<strong className="text-foreground">For natural Russian:</strong>{" "}
|
||||||
Russian is supported by XTTSv2. After upload, restart TTS to apply.
|
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.
|
||||||
|
<br />
|
||||||
|
<span className="mt-1 block">
|
||||||
|
Good sources: audiobook samples (lib.ru), news clips, or record
|
||||||
|
yourself. Avoid music, breathing, or partial words.
|
||||||
|
</span>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</CardContent>
|
</CardContent>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
* Displayed in the footer and available via /api/debug so the user can
|
* Displayed in the footer and available via /api/debug so the user can
|
||||||
* verify the update actually took effect.
|
* 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.
|
* Build timestamp — set at build time by Next.js.
|
||||||
|
|||||||
Reference in New Issue
Block a user