A voice-enabled workout timer application that uses ElevenLabs voice agents and Gemini AI to create and run personalized workout routines with audio guidance.



- Voice conversation with ElevenLabs agent to create custom workouts
- AI-generated workout plans using Google's Gemini API
- Voice-guided workout routines with timers and exercise descriptions
- Customizable workout settings (type, duration, intensity)
- Responsive design with shadcn/ui components
- Exercise form cues and motivational messages
- Node.js (v16 or higher)
- npm package manager
- ElevenLabs API key (get one at ElevenLabs)
- ElevenLabs voice agent ID (create one at ElevenLabs Voice Agents)
- Google Gemini API key (get one at Google AI Studio)
- Clone the repository:
git clone https://github.com/GitlyHallows/ai-voice-trainer.git
cd ai-voice-trainer
- Install dependencies:
npm install
- Configure environment variables:
- Copy
.env.example
to.env
:cp .env.example .env
- Edit
.env
and add your ElevenLabs and Gemini API keys:VITE_ELEVENLABS_API_KEY=your_elevenlabs_api_key_here VITE_GEMINI_API_KEY=your_gemini_api_key_here
- Copy
Run the server:
npm run dev
The application will be available at http://localhost:8080
-
Voice Selection:
- Enter your ElevenLabs API key if not already set in
.env
- Select a voice from the dropdown to use for the workout audio
- Enter your ElevenLabs API key if not already set in
-
Creating a Workout:
- Click the microphone button in the bottom-right corner to start a conversation
- Tell the voice agent what kind of workout you want (e.g., "I want a 25-minute leg workout")
- The agent will use Gemini AI to generate a personalized workout plan
- When you're ready to start, tell the agent "I'm ready to begin" or manually disconnect
-
Workout Player:
- After the workout is generated, use the play button to start the workout
- The player will automatically guide you through each exercise with voice instructions
- You can use the controls if you'd like to pause, resume, or skip to the next exercise/phase
src/
├── components/ # React components including VoiceChat and WorkoutPlayer
├── contexts/ # React contexts
├── data/ # Sample workout data
├── hooks/ # Custom React hooks including useWorkoutAudio
├── lib/ # Utility functions including workout parser and generator
└── pages/ # Application pages
The built files will be in the dist
directory.
- Vite + React + TypeScript
- shadcn-ui + Tailwind CSS
- ElevenLabs API for voice synthesis and agent conversation
- Google Gemini API for workout plan generation
- Web Speech API for audio playback
You can deploy this project using platforms like Netlify, Vercel, or GitHub Pages.
MIT
Contributions are welcome! Please feel free to submit a Pull Request.