Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FitnessCoachAI

iOS fitness coach app with OpenAI Realtime API voice conversation.

Features

  • ✅ Real-time voice conversation with AI fitness coach
  • ✅ AudioUnit with VoiceProcessingIO for echo cancellation
  • ✅ Server-side VAD (Voice Activity Detection)
  • ✅ Natural interruption support (barge-in)
  • ✅ Animated ring UI (glistens when listening, pulses when speaking)
  • ✅ Auto-start recording when ready

Setup

1. Clone the repository

git clone https://github.com/nidzae/FitnessCoachVoice-iOS.git
cd FitnessCoachVoice-iOS/FitnessCoachAI

2. Configure API Key

# Copy the template config file
cp Config.template.xcconfig Config.xcconfig

# Edit Config.xcconfig and add your OpenAI API key
# Replace YOUR_OPENAI_API_KEY_HERE with your actual key

3. Open in Xcode

open FitnessCoachAI.xcodeproj

4. Run the app

  • Select your target device/simulator
  • Press ⌘R to build and run

Architecture

FitnessCoachAI/
├── Models/
│   └── VoiceAgentState.swift       # App state model
├── Services/
│   ├── AudioManager.swift          # AudioUnit recording + AVAudioEngine playback
│   └── OpenAIVoiceService.swift    # WebSocket connection to OpenAI Realtime API
├── ViewModels/
│   └── VoiceCoachViewModel.swift   # Business logic and state management
└── Views/
    ├── HomeView.swift              # Main screen
    ├── VoiceRingView.swift         # Animated ring component
    └── VoiceAvatarView.swift       # (Legacy, replaced by VoiceRingView)

Key Technologies

  • AudioUnit with VoiceProcessingIO: Hardware-level echo cancellation
  • OpenAI Realtime API: GPT-based voice conversation
  • Server VAD: Automatic speech detection and turn management
  • SwiftUI: Modern UI with custom animations

Configuration Files

  • Config.xcconfig - Your actual API keys (ignored by git)
  • Config.template.xcconfig - Template for new developers (committed to git)
  • .gitignore - Ensures sensitive files aren't committed

Notes

  • Working voice conversation with realtime only
  • No video or camera implementation
  • Mic auto-starts when session is ready
  • Echo cancellation prevents the agent from hearing itself

License

Private project

About

iOS fitness coach app with OpenAI Realtime API voice conversation and pose detection model

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages