Update main.ts
Browse files
main.ts
CHANGED
|
@@ -337,7 +337,7 @@ class OpenAICompatibleServer {
|
|
| 337 |
return new Response(JSON.stringify({ error: "Missing required fields: input, voice, model." }), { status: 400 });
|
| 338 |
}
|
| 339 |
const audioBuffer = await this.googleAI.generateSpeech(body.input, body.model, body.voice);
|
| 340 |
-
return new Response(audioBuffer, { headers: { "Content-Type": "audio/
|
| 341 |
}
|
| 342 |
|
| 343 |
private async handleChatCompletions(request: Request): Promise<Response> {
|
|
|
|
| 337 |
return new Response(JSON.stringify({ error: "Missing required fields: input, voice, model." }), { status: 400 });
|
| 338 |
}
|
| 339 |
const audioBuffer = await this.googleAI.generateSpeech(body.input, body.model, body.voice);
|
| 340 |
+
return new Response(audioBuffer, { headers: { "Content-Type": "audio/mp3" } });
|
| 341 |
}
|
| 342 |
|
| 343 |
private async handleChatCompletions(request: Request): Promise<Response> {
|