|
| 1 | +# 🚀 Quick Start Guide - Get Your AI Study Buddy Running in 5 Minutes |
| 2 | + |
| 3 | +## Step 1: Get Your Vapi Account (2 min) |
| 4 | + |
| 5 | +1. Open [https://vapi.ai](https://vapi.ai) |
| 6 | +2. Click "Sign Up" |
| 7 | +3. Verify your email |
| 8 | +4. You now have $10 free credit! 💰 |
| 9 | + |
| 10 | +## Step 2: Get Your API Key (1 min) |
| 11 | + |
| 12 | +1. In Vapi Dashboard, click your profile (top right) |
| 13 | +2. Go to "Settings" → "API Keys" |
| 14 | +3. Copy your **Public Key** (starts with `pk_`) |
| 15 | +4. Keep this tab open! |
| 16 | + |
| 17 | +## Step 3: Set Up the Project (2 min) |
| 18 | + |
| 19 | +### Clone and Install |
| 20 | + |
| 21 | +```bash |
| 22 | +# Clone this repo (or download ZIP) |
| 23 | +git clone [workshop-repo-url] |
| 24 | +cd vapi-workshop |
| 25 | + |
| 26 | +# Install dependencies |
| 27 | +npm install |
| 28 | +``` |
| 29 | + |
| 30 | +### Set Up Environment Variables |
| 31 | + |
| 32 | +1. Copy the example env file: |
| 33 | + |
| 34 | + ```bash |
| 35 | + cp env.example .env |
| 36 | + ``` |
| 37 | + |
| 38 | +2. Open `.env` in your text editor |
| 39 | +3. Replace `your_vapi_public_key_here` with your actual Vapi public key: |
| 40 | + |
| 41 | + ``` |
| 42 | + VITE_VAPI_PUBLIC_KEY=pk_your_actual_key_here |
| 43 | + ``` |
| 44 | + |
| 45 | +4. Save the file! |
| 46 | + |
| 47 | +## Step 4: Start the Development Server |
| 48 | + |
| 49 | +```bash |
| 50 | +npm run dev |
| 51 | +``` |
| 52 | + |
| 53 | +The app will automatically open at <http://localhost:3000> |
| 54 | + |
| 55 | +## Step 5: Test It! 🎉 |
| 56 | + |
| 57 | +### First Call |
| 58 | + |
| 59 | +1. Click "Start Conversation" |
| 60 | +2. Allow microphone access when prompted |
| 61 | +3. Say "Hello!" to your Study Buddy |
| 62 | +4. Watch your conversation appear in real-time on the right! |
| 63 | + |
| 64 | +### Try These Features |
| 65 | + |
| 66 | +#### 🎤 Voice Commands |
| 67 | + |
| 68 | +- "Help me study for my math exam" |
| 69 | +- "Start a Pomodoro session" |
| 70 | +- "I'm feeling stressed about finals" |
| 71 | +- "Give me a study tip" |
| 72 | +- "Goodbye" (ends the call) |
| 73 | + |
| 74 | +#### 🔇 Mute Button |
| 75 | + |
| 76 | +- Click the Mute button to temporarily disable your mic |
| 77 | +- Great for noisy environments |
| 78 | +- The AI will wait for you to unmute |
| 79 | + |
| 80 | +#### 💬 Preset Messages |
| 81 | + |
| 82 | +- Click any preset button to make the AI say that phrase |
| 83 | +- Use these for quick testing |
| 84 | +- Great for demonstrating specific scenarios |
| 85 | + |
| 86 | +#### ✍️ Custom Messages |
| 87 | + |
| 88 | +- Type anything in the input field |
| 89 | +- Press Enter or click Send |
| 90 | +- The AI will say exactly what you typed! |
| 91 | + |
| 92 | +#### 📊 Live Indicators |
| 93 | + |
| 94 | +- **Volume Bar**: Shows your speaking volume |
| 95 | +- **Status**: Shows if AI is listening or speaking |
| 96 | +- **Mic Status**: Shows if microphone is active or muted |
| 97 | + |
| 98 | +## ⚡ Pro Tips |
| 99 | + |
| 100 | +### Testing Voice Quality |
| 101 | + |
| 102 | +1. Try different distances from your microphone |
| 103 | +2. Speak at a normal conversation pace |
| 104 | +3. The AI handles interruptions naturally - try it! |
| 105 | + |
| 106 | +### Exploring Features |
| 107 | + |
| 108 | +1. **Conversation History**: All messages are saved on the right |
| 109 | +2. **System Messages**: Yellow messages show system events |
| 110 | +3. **Timestamps**: Each message shows when it was sent |
| 111 | +4. **Auto-scroll**: Chat scrolls automatically with new messages |
| 112 | + |
| 113 | +### Best Practices |
| 114 | + |
| 115 | +- Use headphones to prevent echo |
| 116 | +- Speak clearly but naturally |
| 117 | +- Try interrupting the AI mid-sentence |
| 118 | +- Test edge cases like silence and long responses |
| 119 | + |
| 120 | +## ⚡ Troubleshooting |
| 121 | + |
| 122 | +### "Please add your Vapi API key to .env file" |
| 123 | + |
| 124 | +- Make sure you created the `.env` file (not just edited `env.example`) |
| 125 | +- Check that your key starts with `pk_` |
| 126 | +- Restart the dev server after adding the key |
| 127 | + |
| 128 | +### "No audio / Can't hear anything" |
| 129 | + |
| 130 | +- Check your browser allows microphone access |
| 131 | +- Make sure your volume is up |
| 132 | +- Try the Mute/Unmute button |
| 133 | +- Use Chrome or Edge browser for best results |
| 134 | + |
| 135 | +### "Failed to connect" |
| 136 | + |
| 137 | +- Verify your API key is correct |
| 138 | +- Check your internet connection |
| 139 | +- Make sure you have credits in your Vapi account |
| 140 | +- Check browser console (F12) for detailed errors |
| 141 | + |
| 142 | +### "Messages not appearing" |
| 143 | + |
| 144 | +- Refresh the page |
| 145 | +- Check if JavaScript is enabled |
| 146 | +- Look for errors in browser console |
| 147 | + |
| 148 | +## 🎨 Customization Options |
| 149 | + |
| 150 | +### Change the Voice |
| 151 | + |
| 152 | +In `src/App.jsx`, find the voice configuration: |
| 153 | + |
| 154 | +```javascript |
| 155 | +voice: { |
| 156 | + provider: "elevenlabs", |
| 157 | + voiceId: "rachel" // Try "josh", "adam", "bella", or others! |
| 158 | +} |
| 159 | +``` |
| 160 | + |
| 161 | +### Modify the Personality |
| 162 | + |
| 163 | +Update the system prompt in `src/App.jsx` to change how your Study Buddy behaves: |
| 164 | + |
| 165 | +- Make it more formal/casual |
| 166 | +- Add specific subject expertise |
| 167 | +- Change the language style |
| 168 | + |
| 169 | +### Adjust Timing |
| 170 | + |
| 171 | +```javascript |
| 172 | +silenceTimeoutSeconds: 30, // How long before timeout |
| 173 | +maxDurationSeconds: 600 // Max call length (10 min) |
| 174 | +``` |
| 175 | + |
| 176 | +### Style Changes |
| 177 | + |
| 178 | +- Colors in `tailwind.config.js` |
| 179 | +- Layout in the component JSX |
| 180 | +- Animations with Tailwind classes |
| 181 | + |
| 182 | +## 📁 What You're Looking At |
| 183 | + |
| 184 | +When the app runs, you'll see: |
| 185 | + |
| 186 | +- **Left Panel**: All controls and settings |
| 187 | +- **Right Panel**: Live conversation history |
| 188 | +- **Bottom Bar**: Instructions and tips |
| 189 | + |
| 190 | +## 🚀 Next Steps |
| 191 | + |
| 192 | +1. **Experiment**: Try all the buttons and features |
| 193 | +2. **Customize**: Change the voice and personality |
| 194 | +3. **Extend**: Add new features for your hackathon |
| 195 | +4. **Deploy**: Use `npm run build` when ready |
| 196 | +5. **Share**: Show off your creation! |
| 197 | + |
| 198 | +## 🎯 Challenge Yourself |
| 199 | + |
| 200 | +- Can you make the AI speak in a different accent? |
| 201 | +- Add a button that makes the AI tell a joke |
| 202 | +- Create a study timer that announces breaks |
| 203 | +- Add a feature to save conversation history |
| 204 | + |
| 205 | +--- |
| 206 | + |
| 207 | +**Need help?** Check the browser console (F12) for detailed logs, or ask in the workshop! |
| 208 | + |
| 209 | +**Happy Hacking! 🚀** |
0 commit comments