Build Real-Time Client-Side TTS in Angular Using Firebase AI Logic and Gemini A new tutorial by a developer on Dev.to demonstrates building real-time client-side text-to-speech in Angular 22 using Firebase AI Logic and the Gemini model, eliminating custom backend code and automating deployment via Git integration. The project uses Firebase Remote Config, App Check, and App Hosting, and converts L16 audio to WAV for playback, with the full codebase available in the ng-firebase-tts repository. Build Real-Time Client-Side TTS in Angular Using Firebase AI Logic and Gemini In my previous article on Dev.to, I showed how to build expressive text-to-speech using Gemini and Firebase Cloud Functions. While that setup worked beautifully, it required building and deploying custom backend endpoints. Firebase AI Logic enables running Gemini TTS client-side with production secu In my previous article on Dev.to, I showed how to build expressive text-to-speech using Gemini and Firebase Cloud Functions. While that setup worked beautifully, it required building and deploying custom backend endpoints. Firebase AI Logic enables running Gemini TTS client-side with production security, eliminating custom backend code and automating deployment via Git integration. Project technical stack: Angular 22: The latest version as of August 2026. Node.js LTS: The LTS version as of May 2026. Firebase Remote Config: Manages dynamic parameters, such as TTS model names, and conditionally configures limited-use tokens. Firebase AI Logic: Interfaces with Gemini generative models. Firebase App Check: Prevents abuse and verifies token authenticity. Firebase App Hosting: Streamlined deployment to the Firebase App Hosting environment. With a single code push, the latest changes deploy to the production environment. The public Google Gemini Developer API is restricted in my region Hong Kong . However, the Agent Platform Gemini API Google Cloud offers enterprise access that works reliably here, so I chose the Agent Platform Gemini API for this Firebase AI Logic demo. npm install -g firebase-tools Install or update firebase-tools globally using npm. firebase logout firebase login Log out and re-authenticate with Firebase. npm i --save-exact firebase npm i --save-exact --save-dev firebase-tools serve Install the dependencies to call the Firebase AI Logic API, use the Firebase CLI to generate files, and serve the production build. firebase init Execute firebase init and follow the prompts to set up the Firebase AI Logic, Emulators, App Hosting, and Remote Config. If you have an existing project or multiple projects, you can specify the project ID on the command line. firebase init --project