Skip to content

Conversation

@codejutsu1
Copy link

@codejutsu1 codejutsu1 commented Nov 15, 2025

This PR adds Gemini TTS (Text-to-Speech) support. Fixes #588

Notable Features

  • Audio outputs in raw audio format .pcm - users will need to manually convert using ffmpeg to wav or mp3
  • Multi-speaker configuration support

Usage Example

$response = Prism::audio()
    ->using(Provider::Gemini, 'gemini-2.5-flash-preview-tts')
    ->withInput('TTS the following conversation between Joe and Jane:
        Joe: How\'s it going today Jane?
        Jane: Not too bad, how about you?')
    ->withVoice('Enceladus') 
    ->withProviderOptions([
        'multiSpeaker' => [
            [
                'speaker' => 'Joe',
                'voiceName' => 'Kore',
            ],
            [
                'speaker' => 'Jane',
                'voiceName' => 'Puck',
            ],
        ],
    ])
    ->asAudio();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Gemini TTS

1 participant