Improving the readmes for the webrtc examples.

This commit is contained in:
Filipi Fuchter
2025-03-27 16:32:46 -03:00
parent f884c93826
commit 91a69b7029
2 changed files with 77 additions and 41 deletions

View File

@@ -1,43 +1,59 @@
# Video transform # Video Transform
A Pipecat example demonstrating how to send and receive audio and video using SmallWebRTCTransport. A Pipecat example demonstrating how to send and receive audio and video using `SmallWebRTCTransport`. This project also applies image processing to video frames using OpenCV.
It also performs some image processing on the video frames using OpenCV.
## Quick Start ## 🚀 Quick Start
### First, start the bot server: ### 1⃣ Start the Bot Server
1. Navigate to the server directory: #### 📂 Navigate to the Server Directory
```bash ```bash
cd server cd server
``` ```
2. Create and activate a virtual environment:
#### 🔧 Set Up the Environment
1. Create and activate a virtual environment:
```bash ```bash
python3 -m venv venv python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate source venv/bin/activate # On Windows: venv\Scripts\activate
``` ```
3. Install requirements:
2. Install dependencies:
```bash ```bash
pip install -r requirements.txt pip install -r requirements.txt
``` ```
4. Copy env.example to .env and configure:
- Add your API keys
5. Start the server:
```bash
python server.py
```
### Next, connect using the client app: 3. Configure environment variables:
- Copy `env.example` to `.env`
```bash
cp env.example .env
```
- Add your API keys
#### ▶️ Run the Server
```bash
python server.py
```
### 2⃣ Connect Using the Client App
For client-side setup, refer to the [JavaScript Guide](client/typescript/README.md). For client-side setup, refer to the [JavaScript Guide](client/typescript/README.md).
## Important Note ## ⚠️ Important Note
Ensure the bot server is running before using any client implementations. Ensure the bot server is running before using any client implementations.
## Requirements ## 📌 Requirements
- Python 3.10+ - Python **3.10+**
- Node.js 16+ (for JavaScript) - Node.js **16+** (for JavaScript components)
- Google API key - Google API Key
- Modern web browser with WebRTC support - Modern web browser with WebRTC support
---
### 💡 Notes
- Ensure all dependencies are installed before running the server.
- Check the `.env` file for missing configurations.
- WebRTC requires a secure environment (HTTPS) for full functionality in production.
Happy coding! 🎉

View File

@@ -1,34 +1,54 @@
# Video transform # Voice Agent
A Pipecat example demonstrating the simplest way to create a voice agent with SmallWebRTCTransport. A Pipecat example demonstrating the simplest way to create a voice agent using `SmallWebRTCTransport`.
## Quick Start ## 🚀 Quick Start
### First, start the bot server: ### 1⃣ Start the Bot Server
#### 🔧 Set Up the Environment
1. Create and activate a virtual environment: 1. Create and activate a virtual environment:
```bash ```bash
python3 -m venv venv python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate source venv/bin/activate # On Windows: venv\Scripts\activate
``` ```
2. Install requirements:
2. Install dependencies:
```bash ```bash
pip install -r requirements.txt pip install -r requirements.txt
``` ```
3. Copy env.example to .env and configure:
- Add your API keys 3. Configure environment variables:
4. Start the server: - Copy `env.example` to `.env`
```bash ```bash
python server.py cp env.example .env
``` ```
- Add your API keys
### Next, connect using the client app: #### ▶️ Run the Server
```bash
python server.py
```
Visit http://localhost:7860 in your browser. ### 2⃣ Connect Using the Client App
## Requirements Open your browser and visit:
```
http://localhost:7860
```
- Python 3.10+ ## 📌 Requirements
- Node.js 16+ (for JavaScript)
- Google API key - Python **3.10+**
- Modern web browser with WebRTC support - Node.js **16+** (for JavaScript components)
- Google API Key
- Modern web browser with WebRTC support
---
### 💡 Notes
- Ensure all dependencies are installed before running the server.
- Check the `.env` file for missing configurations.
- WebRTC requires a secure environment (HTTPS) for full functionality in production.
Happy coding! 🎉