Enhance OpenAI TTS: add gpt-4o-mini-tts support with instructions parameter

This commit is contained in:
2026-05-13 02:36:46 +02:00
parent fc02d2001c
commit 19975917c5
6 changed files with 20 additions and 5 deletions

View File

@@ -41,8 +41,9 @@ export class OpenAITTSProvider implements TTSProvider {
const mp3 = await this.openai.audio.speech.create({
model: model,
voice: voice as any, // Type casting to any to avoid type issues
input: text
voice: voice as any,
input: text,
...(options.instructions ? { instructions: options.instructions } : {})
});
// Cost calculation is based on character count