You can ask a Gemini model to generate audio output. When you use
Firebase AI Logic, you can make this request directly from your mobile or
web app (such as your Apple (Swift), Android (Kotlin / Java), Web (JavaScript),
Flutter (Dart), or Unity app).

You can generate the following kinds of audio:

- [Generate speech from text input](https://firebase.google.com/docs/ai-logic/generate-speech.md.txt)
  using Gemini text-to-speech (TTS) models.

- [Generate *bidirectionally streamed* audio output](https://firebase.google.com/docs/ai-logic/live-api.md.txt)
  using the Gemini Live API.

#### Comparison between TTS and the Live API

Both text-to-speech (TTS) models and Live API models are low-latency,
speech-generating models that can be configured for different response voices
and languages. However, they serve very different use cases.

- **[Text-to-speech (TTS) generation](https://firebase.google.com/docs/ai-logic/generate-speech.md.txt)** is a
  *unidirectional* , request-response interaction (text in, audio out). It's
  tailored for scenarios that require ***exact recitation*** of the provided
  text with fine-grained control over style and sound, such as podcast
  narration, audiobooks, or reading articles aloud.

- **[Live API generation](https://firebase.google.com/docs/ai-logic/live-api.md.txt)** supports
  *bidirectional* streaming for ***real-time voice conversations*** (voice in,
  voice out). It excels in dynamic conversational contexts where the model
  decides the applicable speech to return. Note that the latest Live API
  models also support video and image input.