A simple real-time voice chat application built with Flask and WebSocket that allows two users to communicate via voice.
- Real-time voice communication
- Simple and intuitive interface
- WebSocket-based audio streaming
- Low latency audio processing
- Clone the repository:
git clone <your-repo-url>
cd voice-chat- Create and activate a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Install dependencies:
pip install -r requirements.txt- Run the application:
python app.py- Open your browser and navigate to
http://localhost:5000
-
Push your code to GitHub
-
Go to Render.com and:
- Sign up for a free account
- Click "New +" and select "Web Service"
- Connect your GitHub repository
- Use these settings:
- Name: voice-chat
- Environment: Python
- Build Command:
pip install -r requirements.txt - Start Command:
python app.py
- Click "Create Web Service"
-
Wait for deployment to complete
- Open the application in two different browser windows
- Click "Start Chat" in both windows
- Allow microphone access when prompted
- Start speaking - the other user will hear you in real-time
- Click "Stop Chat" when done
- Built with Flask and Flask-SocketIO
- Uses Web Audio API for real-time audio processing
- WebSocket for low-latency communication
- Base64 encoding for audio data transmission
- The free tier of Render will spin down after 15 minutes of inactivity
- First request after inactivity might take 30-60 seconds
- 750 free hours per month included in free tier