Inspiration
Most first-time engineering managers and team leads are promoted for technical excellence, then handed a team with zero preparation for emotional conflict, underperformance, or delicate 1-on-1s. When critical moments arrive — delivering difficult feedback, handling compensation disputes, or mediating peer tension — leaders freeze or default to avoidance.
Traditional corporate training relies on passive slide decks or static video courses. But leadership isn't something you know — it's something you practice. We built Stance as a high-stakes, safe flight simulator where emerging leaders can build visceral conversational muscle memory out loud before stepping into the room with their real teams.
What it does
Stance is an executive-grade, native iOS leadership coach that turns difficult workplace encounters into repeatable rehearsal loops:
- Upcoming Moments Anchor: Leaders log real, upcoming high-stakes conversations (e.g., "1-on-1 with Alex about missed delivery dates"). Local notifications gently nudge them ahead of time so they never walk into hard conversations unprepared.
- Agentic Strategic Coach: Represented by an ambient, animated Living Orb, Stance acts as a strategic thought partner grounded in proven management frameworks — including Radical Candor, the Center for Creative Leadership SBI model, and Thomas-Kilmann conflict modes.
- "Rehearse It" Sparring Engine: Instead of just generating scripts, Stance lets leaders roleplay the confrontation either via silent text or real-time, full-duplex spoken voice sparring. The AI acts strictly as the counterparty, delivering authentic emotional pushback and realistic workplace friction.
- Deterministic Speech Telemetry & Debrief: Post-rehearsal, Stance scores assertiveness, clarity, and composure under fire. It calculates objective speech telemetry — speaking rate (WPM), hesitation pauses, and filler-word frequency ("um", "like", "actually") — helping leaders lock in their stance.
- 12 Leadership Archetypes: An onboarding assessment categorizes leaders into one of 12 distinct archetypes (The Anchor, The Catalyst, The Truth-Teller, The Pace-Setter, etc.), complete with interactive 3D trading cards, superpowers, and radar telemetry charts.
How we built it
- Bidirectional Gemini Live Audio Pipeline: Engineered a full-duplex voice sparring engine (
GeminiLiveAudioEngine) communicating over WebSockets directly with Gemini'sBidiGenerateContentendpoint. It captures mic input viaAVAudioEngine.inputNode, downsamples on the fly to 16kHz mono 16-bit PCM for streaming, and downstreams 24kHz PCM chunks with dynamic gain intoAVAudioPlayerNode. - Dual Speech Architecture: Integrated Apple’s on-device
SFSpeechRecognizeralongside Gemini Live, utilizing a custom thread-safeLiveSpeechTranscriberbuffer bridge with segment locking to enable seamless push-to-dictate in chat with sub-50ms latency. - Zero-Backend, Local-First Privacy Engine: Built on SwiftData (
VersionedSchemaandSchemaMigrationPlan) with a decoupled repository pattern. All coaching sessions, transcripts, practice records, and upcoming moments stay strictly on-device in local SQLite storage. Meeting notifications run 100% locally viaUNUserNotificationCenter, and sensitive text is scrubbed client-side prior to model calls. - Interactive 3D & Native Fluid UI: Crafted in SwiftUI using Apple’s modern Liquid Glass materials (
.glassEffect), a dual-capsule floating dock, gyroscope-driven 3D attitude tilt (CoreMotion), procedural Canvas guilloche seals, and a 180° card-flip spring animation with dynamic drop-shadow leaning.
Challenges we ran into
- Full-Duplex Audio & Real-Time Barge-In: Coordinating live microphone streaming and concurrent AI audio playback without echo loops, feedback squeal, or latency lag required delicate handling of
AVAudioEngineandAVAudioSessionpriorities. We also had to build custom format failovers to prevent Core Audio crashes across physical hardware and simulator environments. - Dual Audio Graph Collision: Running Apple’s push-to-dictate speech recognizer in the text composer alongside the high-throughput Gemini Live PCM audio stream frequently triggered audio tap collisions. Building an isolated, thread-safe
NSLockbuffer bridge was essential to decouple the two pipelines cleanly. - Realistic Counterparty Nuance: Raw LLMs naturally default to polite acquiescence or offer generic coaching tips mid-roleplay. We had to enforce strict prompt-containment guardrails so Gemini stayed 100% in-character as the defensive, overwhelmed, or skeptical employee without breaking the simulation fourth wall.
Accomplishments that we're proud of
- Sub-Second Spoken Sparring: Achieving fluid, natural voice roleplay with real-time interruption (barge-in) and deterministic speech telemetry running simultaneously on a single mobile device.
- Zero-Cloud Data Footprint: Delivering an enterprise-grade AI coaching experience with no custom backend servers — ensuring company-confidential employee issues and manager reflections never touch a third-party application database.
- 60/120fps Native Craft: Merging physical device gyroscope tilt, procedural Canvas vector graphics, 3D card flips, and Apple’s interactive Liquid Glass shaders into an ultra-smooth, responsive executive interface.
What we learned
- Spoken simulation unlocks a completely different psychological state than text chat. Rehearsing out loud exposes real hesitation pauses and filler-word spikes that managers never realize they have until they hear themselves pushed back against.
- Concrete phrasing deltas beat abstract advice. When debriefing after a tough rehearsal, leaders learn ten times faster when shown the exact sentence where they conceded ground and given a stronger verbal alternative to practice immediately.
What's next for Stance: Leadership Coach
- Live Meeting Telemetry Overlay: Expanding from pre-meeting rehearsal into live meeting awareness, providing unobtrusive composure, talk-time ratio, and active-listening reminders.
- Custom Scenario Ingestion: Allowing leaders and HR teams to import actual company competencies, performance review rubrics, or anonymized incident post-mortems to generate tailored sparring scenarios.
- Multi-Party Meeting Dynamics: Extending beyond 1-on-1s to simulate multi-stakeholder friction, executive cross-examination, and contentious cross-functional roadmap negotiations.
Built With
- avaudioengine
- avfoundation
- core-audio
- coremotion
- gemini-api
- gemini-live-api
- generative-ai
- ios
- pcm-audio
- prompt-engineering
- revenuecat
- sfspeechrecognizer
- speech-to-speech
- sqlite
- storekit-2
- swift
- swiftdata
- swiftui
- user-notifications
- voice-ai
- websockets
Log in or sign up for Devpost to join the conversation.