t
This commit is contained in:
31
websocket_server/README.md
Normal file
31
websocket_server/README.md
Normal file
@@ -0,0 +1,31 @@
|
||||
# WebSocket Audio Server
|
||||
|
||||
This is a FastAPI server that receives audio from an ESP32 via WebSocket, saves it, processes it (converts 32-bit to 16-bit), and sends it back for playback.
|
||||
|
||||
## Installation
|
||||
|
||||
1. Install dependencies:
|
||||
```bash
|
||||
pip install -r requirements.txt
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
1. Start the server:
|
||||
```bash
|
||||
python server.py
|
||||
```
|
||||
Or:
|
||||
```bash
|
||||
uvicorn server:app --host 0.0.0.0 --port 8000
|
||||
```
|
||||
|
||||
2. Update the IP address in `main.py` on your ESP32 to match your computer's IP address.
|
||||
Look for `SERVER_IP` variable.
|
||||
|
||||
## Features
|
||||
|
||||
- Receives raw audio stream from ESP32.
|
||||
- Saves raw audio to `received_audio.raw`.
|
||||
- Converts 32-bit audio (from ICS-43434) to 16-bit audio (for MAX98357A).
|
||||
- Streams processed audio back to ESP32 for playback.
|
||||
Reference in New Issue
Block a user