Project Story: AI Prayer App (Gemini Live Agent Challenge)

Inspiration

The digital world is often noisy and overwhelming. Our inspiration was to create a "Multimodal Sanctuary"—a digital space where technology doesn't just process data but genuinely listens to the human soul. We wanted to build a bridge between advanced AI reasoning and spiritual comfort, helping people find the right words and the right atmosphere for their moments of reflection.

What it does

The AI Prayer App transforms a user's raw thoughts and emotions into a deeply personal, multimodal experience. It doesn't just generate text; it analyzes the "Internal State" of the user to create:

  1. A Personalized Prayer: Written with empathy and spiritual depth.
  2. Adaptive Visuals: Breathtaking, cinematic landscapes generated by Pollinations AI that reflect the user's emotional tone.
  3. Spoken Word: Comforting voice narration of the prayer for a truly immersive experience. Altogether, it provides an interleaved output that serves as a modern spiritual companion.

How we built it

The application is a sophisticated multimodal pipeline built with Python and Streamlit.

  • Brain (Gemini AI): We used the google-genai SDK to leverage Gemini 2.5 Pro. The pipeline starts with a "Deep Emotional Analysis" phase using structured JSON output.
  • Visual Narrative: We dynamically generate unique prompt strings for Pollinations AI (using the Flux model) to create landscapes that visually resonate with the user.
  • Audio Synthesis: We integrated gTTS to convert the generated text into comforting narration.
  • Design: A custom CSS-injected "Deep Night" mode ensures the UI feels like a peaceful sanctuary.

Challenges we ran into

The journey had its "Resource Exhausted" moments! Our biggest hurdles were:

  1. Quota Limits ($429$): Managing API rate limits required a dynamic model-switching strategy to keep the service stable.
  2. Multimodal Sync: Ensuring that images and audio generated correctly during peak traffic meant building a robust validation layer with automatic fallbacks.
  3. Visual Consistency: Turning abstract emotions into high-quality landscapes without "AI artifacts" or anachronistic text in the images required extensive prompt engineering.

Accomplishments that we're proud of

We are incredibly proud of achieving a true interleaved output. Successfully combining text, sight, and sound in a way that feels organic and spiritually grounding—rather than just "generated"—is our biggest win. We also managed to maintain a high-performance profile despite the heavy multimodal payload.

What we learned

We mastered the art of structured reasoning with Gemini. We learned that the secret to great AI output is a rigorous analysis phase: $$R_{spirit} = \int_{intent}^{peace} \text{Gemini}(E_{mood}) \, dt$$ We also gained deep experience in modern frontend-backend styling with Streamlit and CSS to create immersive dark mode environments.

What's next for AI prayer app

The future of the AI Prayer App is even more interactive:

  • Real-time Voice (Live Agent): Implementing full-duplex voice conversation for a live spiritual dialogue.
  • Multilingual Support expansion: Moving beyond Turkish and English to more global spiritual languages.
  • Social Sharing: Allowing users to export their prayer-landscapes as personalized cards to share hope with others.

Built With

  • css
  • docker
  • gemini-2.0-flash
  • gemini-2.5-pro
  • google-cloud-platform-(gcp)
  • google-cloud-run
  • google-genai-sdk
  • gtts
  • interleaved
  • multimodal-api
  • pollinations-ai
  • pydantic
  • python
  • requests
  • streamlit
Share this project:

Updates