diff --git a/server.ts b/server.ts index 8b3d927..1092fc2 100644 --- a/server.ts +++ b/server.ts @@ -86,7 +86,7 @@ app.get("/podcast_audio/*", async (c) => { const file = Bun.file(audioFilePath); if (await file.exists()) { const blob = await file.arrayBuffer(); - return c.body(blob, 200, { "Content-Type": "audio/wav" }); + return c.body(blob, 200, { "Content-Type": "audio/mpeg" }); } return c.notFound(); }); diff --git a/services/podcast.ts b/services/podcast.ts index 71a326a..0416df3 100644 --- a/services/podcast.ts +++ b/services/podcast.ts @@ -38,7 +38,7 @@ export async function updatePodcastRSS() { ${channelCategories} ${channelLanguage} ${channelTTL} - + ${fileUrl} ${pubDate} diff --git a/services/tts.ts b/services/tts.ts index abb3351..5b26b51 100644 --- a/services/tts.ts +++ b/services/tts.ts @@ -86,5 +86,9 @@ export async function generateTTS( .save(mp3FilePath); }); + // Wavファイルを削除 + fs.unlinkSync(wavFilePath); + console.log(`TTS生成完了: ${itemId}`); + return path.basename(mp3FilePath); }