<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/5-ways-to-use-gemini-text-to-speech-tts-in-your-apps-with-firebase-ai-logic-zem9xw3nl" -->

---
title: 5 ways to use Gemini text-to-speech (TTS) in your apps...
description: Firebase AI Logic now exposes Gemini's native audio generation text-to-speech models, letting mobile and web apps synthesize natural, context-aware speech...
canonical: https://daily.dev/posts/5-ways-to-use-gemini-text-to-speech-tts-in-your-apps-with-firebase-ai-logic-zem9xw3nl
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: 5 ways to use Gemini text-to-speech (TTS) in your apps with Firebase AI Logic | daily.dev
og:description: Firebase AI Logic now exposes Gemini's native audio generation text-to-speech models, letting mobile and web apps synthesize natural, context-aware speech...
og:url: https://daily.dev/posts/5-ways-to-use-gemini-text-to-speech-tts-in-your-apps-with-firebase-ai-logic-zem9xw3nl
og:image: https://api.daily.dev/og/posts/ZeM9xw3NL.png
og:image:alt: 5 ways to use Gemini text-to-speech (TTS) in your apps with Firebase AI Logic
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# 5 ways to use Gemini text-to-speech (TTS) in your apps with Firebase AI Logic

**[Firebase](https://daily.dev/sources/firebase-blog)** · 6 min read · 1 upvotes · 1 comments

## Summary

Firebase AI Logic now exposes Gemini's native audio generation text-to-speech models, letting mobile and web apps synthesize natural, context-aware speech directly from text prompts. Five use cases are highlighted: language learning conversation practice, hands-free content reading (e.g., recipe narration), accessibility summarization, interactive storytelling with dynamic character voices, and multi-speaker podcast simulation. The models support over 30 multilingual voices, director's notes for tone/pacing/accent, and stream continuous PCM audio to clients with low latency. A Kotlin code example shows how to configure a SpeechConfig and stream audio chunks using Firebase AI Logic, with SDK support across Swift, Kotlin, Java, JavaScript, Dart, and Unity.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://firebase.blog/posts/2026/09/ai-logic-text-to-speech>

## Questions this post answers

### How do I stream Gemini text-to-speech audio in a Kotlin app using Firebase AI Logic?

Configure a generationConfig with responseModalities set to AUDIO and a SpeechConfig specifying a voice name and language code, then call generateContentStream on a generativeModel initialized via Firebase.ai with the Gemini Developer API backend. The response returns raw PCM audio chunks (24kHz, 1 channel, 16-bit) that can be appended to an audio buffer for immediate playback.

_daily.dev surfaces implementation guides like this for developers adding voice features to their apps._

### What can you control when generating speech with Gemini TTS models?

Speech output can be controlled through four elements: audio profile (the character's core identity and vocal characteristics), scene and vibe (environment, ambiance, mood), director's notes (speaking style, accent, pacing), and voice and language selection from over 30 multilingual voices with automatic language detection and switching.

_Developers evaluating voice AI options can track these controllable parameters on daily.dev._

### Which platforms support Gemini text-to-speech through Firebase AI Logic?

Gemini TTS models are available across Swift, Kotlin, Java, JavaScript, Dart, and Unity, letting the same natural voice generation capabilities be integrated into iOS, Android, web, and game apps without building a separate backend audio pipeline.

_Cross-platform teams comparing voice integration options can follow updates like this on daily.dev._

## Community discussion

Top comments from developers on daily.dev.

**@agustinbarrientos** · 0 upvotes

> Can one stream switch voices between speakers, or does each voice need a new connection? A new connection for every line could make the dialogue pretty choppy.

## Similar posts on daily.dev

- [Gemini 3.1 Flash TTS on Google Cloud](https://daily.dev/posts/gemini-3-1-flash-tts-on-google-cloud-pl4nonfnc) · Google Cloud · 0 upvotes · 0 comments
- [Gemini 3.1 Flash TTS: the next generation of expressive AI speech](https://daily.dev/posts/gemini-3-1-flash-tts-the-next-generation-of-expressive-ai-speech-1av40deos) · DeepMind · 9 upvotes · 0 comments
- [Build intelligent Android apps: On-device inference](https://daily.dev/posts/build-intelligent-android-apps-on-device-inference-kynhfi0rx) · Android Developers Blog · 0 upvotes · 0 comments

---

Tags: [#genai](https://daily.dev/tags/genai), [#kotlin](https://daily.dev/tags/kotlin), [#firebase](https://daily.dev/tags/firebase), [#google-gemini](https://daily.dev/tags/google-gemini), [#text-to-speech](https://daily.dev/tags/text-to-speech)

[View this post on daily.dev](https://daily.dev/posts/5-ways-to-use-gemini-text-to-speech-tts-in-your-apps-with-firebase-ai-logic-zem9xw3nl)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"5 ways to use Gemini text-to-speech (TTS) in your apps with Firebase AI Logic","url":"https://daily.dev/posts/5-ways-to-use-gemini-text-to-speech-tts-in-your-apps-with-firebase-ai-logic-zem9xw3nl","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/5-ways-to-use-gemini-text-to-speech-tts-in-your-apps-with-firebase-ai-logic-zem9xw3nl"},"datePublished":"2026-09-09T19:23:03.338Z","dateModified":"2026-09-14T06:45:10.844Z","description":"Firebase AI Logic now exposes Gemini's native audio generation text-to-speech models, letting mobile and web apps synthesize natural, context-aware speech...","image":"https://media.daily.dev/image/upload/s--foaA6JGU--/f_auto/v1722860399/public/Placeholder%2004","thumbnailUrl":"https://media.daily.dev/image/upload/s--foaA6JGU--/f_auto/v1722860399/public/Placeholder%2004","isAccessibleForFree":true,"articleSection":"Firebase","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Firebase","logo":"https://media.daily.dev/image/upload/s--i395oqZH--/f_auto,q_auto/v1787487448/logos/firebase-blog?_a=BAMAMicg0","url":"https://daily.dev/sources/firebase-blog"},"commentCount":1,"discussionUrl":"https://daily.dev/posts/5-ways-to-use-gemini-text-to-speech-tts-in-your-apps-with-firebase-ai-logic-zem9xw3nl","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":1}],"keywords":"genai,kotlin,firebase,google-gemini,text-to-speech","timeRequired":"PT6M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Firebase","item":"https://daily.dev/sources/firebase-blog"},{"@type":"ListItem","position":3,"name":"5 ways to use Gemini text-to-speech (TTS) in your apps with Firebase AI Logic"}]}
{"@context":"https://schema.org","@type":"WebPage","@id":"https://daily.dev/posts/5-ways-to-use-gemini-text-to-speech-tts-in-your-apps-with-firebase-ai-logic-zem9xw3nl","comment":[{"@type":"Comment","text":"Can one stream switch voices between speakers, or does each voice need a new connection? A new connection for every line could make the dialogue pretty choppy.","datePublished":"2026-09-10T23:46:51.421Z","url":"https://daily.dev/posts/ZeM9xw3NL#c-3VJ2VxyxD","author":{"@type":"Person","name":"Agustin Barrientos","url":"https://daily.dev/agustinbarrientos","image":"https://media.daily.dev/image/upload/s--5ayxQnqn--/f_auto/v1788281802/avatars/avatar_wQYYVe5Tbj0NJ7C7qPoa8?_a=BAMAMicg0"}}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/5-ways-to-use-gemini-text-to-speech-tts-in-your-apps-with-firebase-ai-logic-zem9xw3nl#faq","mainEntity":[{"@type":"Question","name":"How do I stream Gemini text-to-speech audio in a Kotlin app using Firebase AI Logic?","acceptedAnswer":{"@type":"Answer","text":"Configure a generationConfig with responseModalities set to AUDIO and a SpeechConfig specifying a voice name and language code, then call generateContentStream on a generativeModel initialized via Firebase.ai with the Gemini Developer API backend. The response returns raw PCM audio chunks (24kHz, 1 channel, 16-bit) that can be appended to an audio buffer for immediate playback. daily.dev surfaces implementation guides like this for developers adding voice features to their apps."}},{"@type":"Question","name":"What can you control when generating speech with Gemini TTS models?","acceptedAnswer":{"@type":"Answer","text":"Speech output can be controlled through four elements: audio profile (the character's core identity and vocal characteristics), scene and vibe (environment, ambiance, mood), director's notes (speaking style, accent, pacing), and voice and language selection from over 30 multilingual voices with automatic language detection and switching. Developers evaluating voice AI options can track these controllable parameters on daily.dev."}},{"@type":"Question","name":"Which platforms support Gemini text-to-speech through Firebase AI Logic?","acceptedAnswer":{"@type":"Answer","text":"Gemini TTS models are available across Swift, Kotlin, Java, JavaScript, Dart, and Unity, letting the same natural voice generation capabilities be integrated into iOS, Android, web, and game apps without building a separate backend audio pipeline. Cross-platform teams comparing voice integration options can follow updates like this on daily.dev."}}]}
```

