style: fix formatter issues
This commit is contained in:
parent
8f48af6ab8
commit
bb506c4db1
@ -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<void> {
|
||||
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));
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user