StyleWizard — Your AI Personal Stylist

Inspiration

Getting dressed should be the easiest part of your day. But for most people, it isn't. Standing in front of a full closet feeling like you have "nothing to wear" is one of the most universal frustrations — and it happens every single morning.

I wanted to build something that solved this in the most natural way possible: just talk to an AI that can actually see your wardrobe, understand your occasion, and show you how the outfit looks on you — before you ever try it on.

The launch of Google's Gemini Live API made this vision suddenly achievable. Real-time bidirectional voice, multimodal vision, and low-latency audio — all in a mobile app. That was the spark.


What StyleWizard Does

StyleWizard is a live AI personal stylist that runs entirely on your iPhone. The experience works in four steps:

  1. Live conversation — You talk to StyleWizard through Gemini Live API. It asks about your occasion, your style preferences, and what vibe you're going for. The conversation is natural, interruptible, and context-aware.

  2. Live wardrobe scanning — You flip the camera to your closet. Gemini's multimodal vision detects your clothing items in real time, drawing bounding boxes around each piece and labeling them. You tap the items you want to consider.

  3. Mix & Match — StyleWizard's styling engine creates 3 distinct outfit combinations from your selected items — each with a different vibe suited to your occasion. It sends them to Vertex AI's virtual try-on model, which generates images of you wearing each outfit.

  4. My OOTD — You save your favourite look to a personal style journal, tagged by date and occasion. Every logged clothing item lives in My Closet for future sessions.


How I Built It

Tech Stack

Layer Technology
Mobile frontend Flutter (Dart) — iPhone
Live AI conversation Gemini Live API via Firebase AI Logic
Clothing detection Gemini 2.5 Flash (multimodal vision)
Virtual try-on virtual-try-on-001 via Vertex AI REST API
Image generation Gemini 2.5 Flash Image (Nano Banana)
Backend Python FastAPI on Google Cloud Run
Auth & security Firebase AI Logic (no API keys in app)
Storage Google Cloud Storage

Key Implementation Details

Real-time audio streaming was the most technically complex part. The Gemini Live API uses WebSockets to stream raw PCM audio bidirectionally. Getting low-latency playback on iOS required configuring AVAudioSession with .voiceProcessing mode to enable Apple's built-in Acoustic Echo Cancellation (AEC) — the same technology used by FaceTime.

Object detection with bounding boxes uses Gemini's vision capability to analyze camera frames and return normalized coordinates $[y_{min}, x_{min}, y_{max}, x_{max}]$ in the range $[0, 1000]$. These are scaled to the actual camera preview dimensions using:

$$x_{screen} = \frac{x_{norm}}{1000} \times w_{preview}$$ $$y_{screen} = \frac{y_{norm}}{1000} \times h_{preview}$$

A Flutter CustomPainter renders the bounding boxes on top of the live camera feed in real time.

Mix & Match logic takes the user's selected items, separates them by category (top, bottom, dress, jacket, shoes, bag), and generates 3 distinct outfit combinations — each with a different styling direction (polished, layered, bold). All 3 virtual try-on calls run in parallel using Future.wait(), so the total wait time equals the slowest single call rather than the sum of all three.

Preset clothing dataset of 24 carefully curated items with rich metadata (colors, tags, occasion suitability) enables the styling engine to make intelligent outfit recommendations even when detection confidence is low. Each item is matched to detected clothing using fuzzy category and color matching.


Challenges

1. Gemini Live API Audio Echo

The hardest bug to crack. When using the iPhone speaker, Gemini was picking up its own audio output through the microphone and responding to itself — creating an infinite feedback loop. The fix required configuring iOS AVAudioSession with .voiceProcessing mode, which activates Apple's built-in echo cancellation at the hardware level.

2. WebSocket Session Stability

The Gemini Live API WebSocket would sometimes close unexpectedly during long sessions (especially during the 30-40 second virtual try-on generation). Implemented automatic stream recreation with staleness detection — if the audio stream handle hasn't received data for more than 10 seconds, it's automatically recreated before the next response arrives.

3. Model Availability and Rate Limits

Navigating the rapidly evolving Gemini model ecosystem was challenging — several models were deprecated mid-development (gemini-2.5-flash-image-preview was shut down January 15, 2026). Implemented a retry system with exponential backoff for rate limit errors, and maintained a fallback pipeline between Nano Banana and Imagen for resilience.

4. Real-Time Detection Latency

Initial object detection took 10-15 seconds per frame. Reduced latency to under 3 seconds by compressing frames to 512px before sending, switching to gemini-2.5-flash-lite for detection (64% faster than gemini-2.5-flash), and implementing a scan frequency cap of one frame every 2 seconds with persistent bounding box display between scans.


What I Learned

  • Gemini Live API is genuinely impressive for real-time multimodal applications — the native audio pipeline eliminates the STT → LLM → TTS latency that makes most voice AI feel unnatural.

  • Mobile AI development requires thinking carefully about the boundary between on-device SDK calls and server-side compute. Firebase AI Logic made the Flutter → Gemini integration remarkably clean, while Cloud Run handled the heavier Vertex AI workloads.

  • The gap between a working prototype and a polished demo is mostly about audio — getting echo cancellation, latency, and playback continuity right took more iteration than any other feature.

  • Rapid model evolution is both exciting and challenging. Building on preview models means staying close to release notes and being ready to migrate quickly.


What's Next

  • Wardrobe memory — persistent closet across sessions with Cloud Firestore
  • Style profile — AI learns your preferences over time
  • Shopping integration — suggest missing pieces to complete looks
  • Social sharing — share your OOTD looks directly from the app
  • Android support — currently iPhone only, Android next

Built With

  • dart
  • fastapi
  • firebase-ai-logic
  • firebase-app-check
  • flutter
  • gemini-2.5-flash
  • gemini-2.5-flash-image-(nano-banana)
  • gemini-live-api
  • google-cloud
  • google-cloud-run
  • ios
  • python
  • vertex-ai-virtual-try-on
Share this project:

Updates

Submission history