diff --git a/src/tts/tts-core.ts b/src/tts/tts-core.ts index a0c112d82bb..4472b1e38af 100644 --- a/src/tts/tts-core.ts +++ b/src/tts/tts-core.ts @@ -681,7 +681,6 @@ export async function openaiTTS(params: { export function inferEdgeExtension(outputFormat: string): string { const normalized = outputFormat.toLowerCase(); - if (normalized.includes("webm")) { return ".webm"; } @@ -691,14 +690,9 @@ export function inferEdgeExtension(outputFormat: string): string { if (normalized.includes("opus")) { return ".opus"; } - if ( - normalized.includes("wav") || - normalized.includes("riff") || - normalized.includes("pcm") - ) { + if (normalized.includes("wav") || normalized.includes("riff") || normalized.includes("pcm")) { return ".wav"; } - return ".mp3"; } @@ -710,7 +704,6 @@ export async function edgeTTS(params: { }): Promise { const { text, outputPath, config, timeoutMs } = params; - if (!text || text.trim().length === 0) { throw new Error("TTS text cannot be empty"); } @@ -732,7 +725,6 @@ export async function edgeTTS(params: { let { size } = statSync(outputPath); if (size === 0) { - await tts.ttsPromise(text, outputPath); ({ size } = statSync(outputPath));