From 2e1bdb2cfd0b00771db8cd36d36cd8c34e6b191d Mon Sep 17 00:00:00 2001 From: itzmarkoni Date: Mon, 16 Jun 2025 19:43:30 -0400 Subject: [PATCH] updated --- Astrocore.Api/Controllers/TextToSpeechController.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Astrocore.Api/Controllers/TextToSpeechController.cs b/Astrocore.Api/Controllers/TextToSpeechController.cs index d275856..43e3d0b 100644 --- a/Astrocore.Api/Controllers/TextToSpeechController.cs +++ b/Astrocore.Api/Controllers/TextToSpeechController.cs @@ -35,8 +35,9 @@ namespace Astrocore.Api.Controllers var mp3File = doc.RootElement.GetProperty("URL").GetString(); var mp3Bytes = await client.GetByteArrayAsync(mp3File); var tempDir = Path.GetTempPath(); - var mp3Path = Path.Combine(tempDir, "tts.mp3"); - var dfpwmPath = Path.Combine(tempDir, "tts.dfpwm"); + var fileNameGuid = Guid.NewGuid().ToString(); + var mp3Path = Path.Combine(tempDir, $"{fileNameGuid}.mp3"); + var dfpwmPath = Path.Combine(tempDir, $"{fileNameGuid}.dfpwm"); await System.IO.File.WriteAllBytesAsync(mp3Path, mp3Bytes); var process = new Process