This post is my submission for DEV Education Track: Build Apps with Google AI Studio.
What I Built
I built Somnium, a mystical, voice-first dream journal that acts as a bridge to your subconscious. Instead of typing out dreams in the middle of the night, users simply record their voice. The app uses Google's Gemini API to transcribe the audio, analyze the dream using Jungian psychology, detect emotional themes, and even generate a surrealist image representing the dreamscape.
Key Prompts & Features:
I utilized the multimodal capabilities of the gemini-3-flash-preview model to process raw audio blobs directly.
Analysis Prompt: "You are an expert Jungian dream analyst... Transcribe the audio... Analyze for hidden meanings... Identify archetypes... Rate the intensity of primary emotions."
Visual Generation: I used the analysis output to construct a dynamic prompt for gemini-2.5-flash-image, requesting "Abstract Expressionism mixed with Dreamcore" based on the specific emotions and themes found in the dream.
The app features a real-time audio visualizer, an emotion radar chart (Recharts), and an auto-tagging system where the AI suggests relevant keywords for the journal.
Demo
https://somnium-audio-dream-journal-937160735221.us-west1.run.app
My Experience
Building with the Google GenAI SDK was surprisingly intuitive, specifically regarding Structured Output.
Multimodal Ease: I was amazed that I didn't need a separate library for speech-to-text. Passing the audio blob directly to Gemini with a prompt to "transcribe and analyze" handled both tasks in a single request, significantly reducing latency and code complexity.
JSON Schema: Using the responseSchema configuration was a game-changer. It ensured that Gemini always returned data (like emotion scores and archetype lists) in a perfect JSON format that my React components could render immediately without parsing errors.
**
The ability to chain the text analysis output into an image generation prompt allowed for a really cohesive user experience where the visuals truly matched the "vibe" of the dream interpretation.
Top comments (0)