An interactive map-based application that allows you to navigate the world and explore cities using voice commands. The application combines real-time voice processing with beautiful visualizations, points of interest (POIs), and city statistics.
- Voice Navigation: Speak to navigate to any location in the world
- Interactive Map: Beautiful interactive map with:
- Multiple map styles (Colorful Light, Vibrant Dark, Midnight, Clean Light, Street Map)
- Custom markers for current location and POIs
- Smooth animations and transitions
- Layer controls
- Points of Interest visualization
- City Statistics: Real-time city information including:
- Population trends over time
- Climate data (temperature and rainfall)
- Key historical and cultural facts
- Beautiful charts and visualizations
- Points of Interest: Search nearby locations such as:
- Restaurants and cafes
- Shops and supermarkets
- Parks and leisure spots
- Hotels and accommodations
- Public services (hospitals, schools, etc.)
- Real-time Updates: All data is displayed instantly as you navigate
- Responsive Design: Works on all screen sizes
- Dark Mode Interface: Easy on the eyes with glass-morphism effects
-
FastAPI Backend
- Handles API requests
- Manages WebRTC connections
- Provides geocoding services via OpenStreetMap
- Handles POI searches via Overpass API
- Routes static files
-
WebRTC Integration
- Real-time voice communication
- Data channel for commands and responses
- Ephemeral token management
- Automatic reconnection handling
-
Map Visualization
- Built with Leaflet.js
- Multiple map layer options
- Custom markers and popups
- POI visualization
- Smooth animations
-
Statistics Display
- Chart.js for data visualization
- Population trends
- Climate data
- Key facts panel
- User clicks "Start Voice Navigation"
- WebRTC connection is established
- Voice input is processed in real-time
- Commands are interpreted and executed
- Map navigates to requested location
- City statistics and POIs are automatically displayed
- Python 3.7 or higher
- Modern web browser with WebRTC support
- Microphone access
- OpenAI API key
- Install Python dependencies:
pip install fastapi uvicorn httpx termcolor jinja2- Set up environment variable:
export OPENAI_API_KEY=your_api_key_here- Run the application:
python main.py- Open your browser and navigate to:
http://127.0.0.1:8000
-
Starting Navigation
- Click "Start Voice Navigation"
- Grant microphone permissions when prompted
- Wait for connection confirmation
-
Voice Commands
- "Take me to [location name]"
- "Show me [location name]"
- "Navigate to [location name]"
- "Search for [POI category] nearby"
-
Viewing Statistics
- Statistics automatically appear after navigation
- Population chart shows trends
- Climate chart shows temperature and rainfall
- Key facts display important location information
-
Interface Elements
- Top left: Connection status
- Top right: Layer controls
- Bottom left: Navigation controls
- Bottom center: Current location
- Right side: Location statistics
/: Serves the main application/session: Creates WebRTC sessions/geocode/{location}: Provides location coordinates/search/pois: Searches for nearby points of interest
- FastAPI for backend
- WebRTC for real-time communication
- Leaflet.js for map visualization
- Chart.js for statistics
- OpenStreetMap for geocoding
- Overpass API for POI search
- DaisyUI for UI components
- Tailwind CSS for styling
- Anime.js for animations
- Comprehensive try-catch blocks
- Colored terminal output for debugging
- Clear error messages to users
- Automatic resource cleanup
- Connection recovery mechanisms
- Efficient POI searching with radius limits
- Smooth map animations
- Responsive chart updates
- Memory management for audio streams
- Automatic cleanup of WebRTC resources
The application provides an intuitive voice-controlled interface for exploring locations worldwide, combining real-time mapping, POI discovery, and statistical visualization in a modern, responsive design.