Spaces:
Sleeping
Sleeping
Update README.md
Browse files
README.md
CHANGED
|
@@ -9,5 +9,78 @@ app_file: app.py
|
|
| 9 |
pinned: false
|
| 10 |
license: mit
|
| 11 |
---
|
|
|
|
| 12 |
|
| 13 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
pinned: false
|
| 10 |
license: mit
|
| 11 |
---
|
| 12 |
+
# Nova Conversation Partner
|
| 13 |
|
| 14 |
+
A real-time, natural-sounding AI conversation partner powered by AWS NovaSonic.
|
| 15 |
+
|
| 16 |
+
## Core Features
|
| 17 |
+
|
| 18 |
+
- **Live, Natural-Sounding AI Conversation**: Nova acts as a friendly, responsive conversation partner.
|
| 19 |
+
- **Low-Latency Real-Time Streaming**: Audio streams directly to NovaSonic's bidirectional API.
|
| 20 |
+
- **Speech Coaching**: Analyzes speech patterns and subtly helps improve fluency.
|
| 21 |
+
- **Session Memory**: Continues conversations from where they left off.
|
| 22 |
+
- **Minimal UI**: Simple interface with just a Repeat button and status information.
|
| 23 |
+
|
| 24 |
+
## Setup
|
| 25 |
+
|
| 26 |
+
1. **Install Dependencies**:
|
| 27 |
+
```
|
| 28 |
+
pip install -r requirements.txt
|
| 29 |
+
```
|
| 30 |
+
|
| 31 |
+
2. **AWS Credentials**:
|
| 32 |
+
Ensure you have AWS credentials configured with access to the Amazon Bedrock service.
|
| 33 |
+
|
| 34 |
+
## Usage
|
| 35 |
+
|
| 36 |
+
### UI Mode (Default)
|
| 37 |
+
|
| 38 |
+
```
|
| 39 |
+
python app.py
|
| 40 |
+
```
|
| 41 |
+
|
| 42 |
+
This launches a Gradio web interface with:
|
| 43 |
+
- Start/Stop conversation buttons
|
| 44 |
+
- Replay last message button
|
| 45 |
+
- Status indicator
|
| 46 |
+
|
| 47 |
+
### Command Line Mode
|
| 48 |
+
|
| 49 |
+
```
|
| 50 |
+
python app.py --cli
|
| 51 |
+
```
|
| 52 |
+
|
| 53 |
+
In CLI mode, the conversation runs in the terminal with:
|
| 54 |
+
- Automatic audio recording/playback
|
| 55 |
+
- Press Ctrl+C to exit
|
| 56 |
+
|
| 57 |
+
### Resume a Session
|
| 58 |
+
|
| 59 |
+
To continue a previous conversation:
|
| 60 |
+
|
| 61 |
+
```
|
| 62 |
+
python app.py --session SESSION_ID
|
| 63 |
+
```
|
| 64 |
+
|
| 65 |
+
Replace `SESSION_ID` with the ID of a previous session.
|
| 66 |
+
|
| 67 |
+
## Configuration
|
| 68 |
+
|
| 69 |
+
Edit `config.py` to customize:
|
| 70 |
+
- Audio settings
|
| 71 |
+
- Greeting message
|
| 72 |
+
- Memory limit
|
| 73 |
+
- UI text
|
| 74 |
+
|
| 75 |
+
## Development
|
| 76 |
+
|
| 77 |
+
The application architecture includes:
|
| 78 |
+
- `nova_sonic.py`: AWS NovaSonic API client
|
| 79 |
+
- `audio_utils.py`: Audio recording and playback
|
| 80 |
+
- `language_coach.py`: Speech pattern analysis
|
| 81 |
+
- `session_manager.py`: Conversation persistence
|
| 82 |
+
- `app.py`: Main application logic
|
| 83 |
+
|
| 84 |
+
## License
|
| 85 |
+
|
| 86 |
+
MIT
|