Gemini 3.8 Flash-Lite TTS
Speechgoogle/gemini-3.8-flash-lite-ttsAvailable Providers
Vertex
Supported Protocols
openai
Providers
Vertex
Input Tokens
$0.5/M
Output Tokens
$6/M
Output Audio
$6/M
Protocols
openai
/v1/audio/speechCode Examples
from openai import OpenAIclient = OpenAI(base_url="https://api.ofox.run/v1", api_key="YOUR_OFOX_API_KEY")response = client.audio.speech.create(model="google/gemini-3.8-flash-lite-tts",voice="Kore",input="Hello from OFOX.",response_format="wav",speed=1.1,extra_body={"language_code": "en-US", "instructions": "Speak warmly and clearly."},)response.stream_to_file("speech.wav")
Gemini 3.8 TTS: language_code and instructions are optional; speed gives an approximate pace. WAV and PCM are fixed at 24 kHz; ฮผ-law and A-law at 8 kHz. SSE defaults to PCM chunks; explicit WAV is assembled into one complete file.
response_formatwav (24 kHz), pcm (24 kHz), ulaw (8 kHz), alaw (8 kHz)
Related Models
Frequently Asked Questions
Simply set your base URL to https://api.ofox.run/v1 and use your Ofox API key. The API is OpenAI-compatible โ just change the base URL and API key in your existing code.