feat: fix TypeScript errors and improve code quality

This commit is contained in:
2025-06-04 11:30:12 +09:00
parent a93cfd201d
commit 56320f125b
3 changed files with 4 additions and 3 deletions

View File

@ -1,6 +1,5 @@
import fs from "fs";
import path from "path";
import fetch from "node-fetch";
// VOICEVOX APIの設定
const VOICEVOX_HOST = "http://localhost:50021";
@ -54,7 +53,8 @@ export async function generateTTS(
throw new Error("VOICEVOX 音声合成に失敗しました");
}
const audioBuffer = await audioResponse.buffer();
const audioArrayBuffer = await audioResponse.arrayBuffer();
const audioBuffer = Buffer.from(audioArrayBuffer);
// 出力ディレクトリの準備
const outputDir = path.join(__dirname, "../public/podcast_audio");