A React web app that demonstrates real-time voice conversations using Outspeed's API.
python
anduv
for servernode
andnpm
for client (React)- Outspeed API key
- OpenWeatherMap API key (for weather functionality)
Create a .env
file in the server
directory:
OUTSPEED_API_KEY=your_outspeed_api_key_here
Copy the example environment file and configure your API keys:
cp .env.example .env
Update the .env
file in the root directory with your API keys:
VITE_OPEN_WEATHER_MAP_API_KEY=your_openweathermap_api_key_here
The VITE_OPEN_WEATHER_MAP_API_KEY
is required for the get_weather
client tool to function properly. You can get your API key from OpenWeatherMap.
Go to server directory:
cd server
Install dependencies:
uv sync
Run the server:
uv run fastapi dev server.py
The server will start on http://127.0.0.1:8000
Install dependencies:
npm install
Note
This will install @outspeed/client
and @outspeed/react
.
Start the React app:
npm run dev
- Make sure the server is running on port 8000
- Open the React app in your browser
- Click "Start Session" to begin a voice conversation
- Speak with the AI assistant (configured as a helpful but witty assistant with "sophie" voice)
- Click "Stop Session" to end the conversation
The app uses semantic voice activity detection, which intelligently detects when you've finished speaking (vs. just pausing) to minimize interruptions. For example, it won't interrupt you when you say "uh" or pause briefly while thinking.