Add full STT LLM TTS test mode

This commit is contained in:
2026-05-03 21:54:51 +09:00
parent a5f47393ee
commit 99857cdaa8
8 changed files with 419 additions and 67 deletions

View File

@@ -1,5 +1,5 @@
import process from "node:process";
import { mkdir, rm } from "node:fs/promises";
import { mkdir } from "node:fs/promises";
import path from "node:path";
import { spawn } from "node:child_process";
@@ -57,13 +57,12 @@ export async function setupTts(): Promise<void> {
await run(docker, ["build", "-t", config.TTS_IMAGE, dockerContext]);
const tts = new MeloTtsService(config, logger);
const warmupPath = path.join(outputDir, "warmup.wav");
console.log("MeloTTS 모델 워밍업...");
try {
await tts.synthesizeToFile("안녕하세요. 로컬 티티에스 준비 테스트입니다.", warmupPath);
await tts.warmup();
} finally {
await rm(warmupPath, { force: true }).catch(() => undefined);
await tts.destroy().catch(() => undefined);
}
console.log("로컬 TTS 환경 준비 완료");