Spaces:
Sleeping
Sleeping
Update README.md
Browse files
README.md
CHANGED
|
@@ -10,7 +10,6 @@ app_file: app.py
|
|
| 10 |
pinned: false
|
| 11 |
license: mit
|
| 12 |
---
|
| 13 |
-
---
|
| 14 |
# Nova Conversation Partner
|
| 15 |
|
| 16 |
A real-time, natural-sounding AI conversation partner powered by AWS NovaSonic.
|
|
@@ -22,6 +21,7 @@ A real-time, natural-sounding AI conversation partner powered by AWS NovaSonic.
|
|
| 22 |
- **Speech Coaching**: Analyzes speech patterns and subtly helps improve fluency.
|
| 23 |
- **Session Memory**: Continues conversations from where they left off.
|
| 24 |
- **Minimal UI**: Simple interface with just a Repeat button and status information.
|
|
|
|
| 25 |
|
| 26 |
## Setup
|
| 27 |
|
|
@@ -31,7 +31,21 @@ A real-time, natural-sounding AI conversation partner powered by AWS NovaSonic.
|
|
| 31 |
```
|
| 32 |
|
| 33 |
2. **AWS Credentials**:
|
| 34 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 35 |
|
| 36 |
## Usage
|
| 37 |
|
|
@@ -54,7 +68,15 @@ python app.py --cli
|
|
| 54 |
|
| 55 |
In CLI mode, the conversation runs in the terminal with:
|
| 56 |
- Automatic audio recording/playback
|
| 57 |
-
- Press
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 58 |
|
| 59 |
### Resume a Session
|
| 60 |
|
|
@@ -66,6 +88,17 @@ python app.py --session SESSION_ID
|
|
| 66 |
|
| 67 |
Replace `SESSION_ID` with the ID of a previous session.
|
| 68 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 69 |
## Configuration
|
| 70 |
|
| 71 |
Edit `config.py` to customize:
|
|
@@ -74,14 +107,32 @@ Edit `config.py` to customize:
|
|
| 74 |
- Memory limit
|
| 75 |
- UI text
|
| 76 |
|
| 77 |
-
##
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 78 |
|
| 79 |
The application architecture includes:
|
| 80 |
-
- `
|
| 81 |
-
- `
|
| 82 |
-
- `
|
| 83 |
-
- `
|
| 84 |
-
- `
|
| 85 |
|
| 86 |
## License
|
| 87 |
|
|
|
|
| 10 |
pinned: false
|
| 11 |
license: mit
|
| 12 |
---
|
|
|
|
| 13 |
# Nova Conversation Partner
|
| 14 |
|
| 15 |
A real-time, natural-sounding AI conversation partner powered by AWS NovaSonic.
|
|
|
|
| 21 |
- **Speech Coaching**: Analyzes speech patterns and subtly helps improve fluency.
|
| 22 |
- **Session Memory**: Continues conversations from where they left off.
|
| 23 |
- **Minimal UI**: Simple interface with just a Repeat button and status information.
|
| 24 |
+
- **Fallback Mode**: Works even on systems without audio devices.
|
| 25 |
|
| 26 |
## Setup
|
| 27 |
|
|
|
|
| 31 |
```
|
| 32 |
|
| 33 |
2. **AWS Credentials**:
|
| 34 |
+
Configure your AWS credentials using environment variables:
|
| 35 |
+
|
| 36 |
+
```bash
|
| 37 |
+
export AWS_ACCESS_KEY_ID=your_access_key
|
| 38 |
+
export AWS_SECRET_ACCESS_KEY=your_secret_key
|
| 39 |
+
export AWS_DEFAULT_REGION=us-east-1
|
| 40 |
+
```
|
| 41 |
+
|
| 42 |
+
Alternatively, create a `.env` file in the project root:
|
| 43 |
+
|
| 44 |
+
```
|
| 45 |
+
AWS_ACCESS_KEY_ID=your_access_key
|
| 46 |
+
AWS_SECRET_ACCESS_KEY=your_secret_key
|
| 47 |
+
AWS_DEFAULT_REGION=us-east-1
|
| 48 |
+
```
|
| 49 |
|
| 50 |
## Usage
|
| 51 |
|
|
|
|
| 68 |
|
| 69 |
In CLI mode, the conversation runs in the terminal with:
|
| 70 |
- Automatic audio recording/playback
|
| 71 |
+
- Press Enter to stop the conversation
|
| 72 |
+
|
| 73 |
+
### Debug Mode
|
| 74 |
+
|
| 75 |
+
```
|
| 76 |
+
python app.py --debug
|
| 77 |
+
```
|
| 78 |
+
|
| 79 |
+
Enables detailed logging of API calls and audio processing.
|
| 80 |
|
| 81 |
### Resume a Session
|
| 82 |
|
|
|
|
| 88 |
|
| 89 |
Replace `SESSION_ID` with the ID of a previous session.
|
| 90 |
|
| 91 |
+
## Hugging Face Spaces Integration
|
| 92 |
+
|
| 93 |
+
To use this application in Hugging Face Spaces:
|
| 94 |
+
|
| 95 |
+
1. Add the following secrets in your Hugging Face Space settings:
|
| 96 |
+
- `AWS_ACCESS_KEY_ID`
|
| 97 |
+
- `AWS_SECRET_ACCESS_KEY`
|
| 98 |
+
- `AWS_DEFAULT_REGION` (optional, defaults to us-east-1)
|
| 99 |
+
|
| 100 |
+
2. The application will automatically use fallback mode if no audio devices are available.
|
| 101 |
+
|
| 102 |
## Configuration
|
| 103 |
|
| 104 |
Edit `config.py` to customize:
|
|
|
|
| 107 |
- Memory limit
|
| 108 |
- UI text
|
| 109 |
|
| 110 |
+
## Troubleshooting
|
| 111 |
+
|
| 112 |
+
### Audio Device Issues
|
| 113 |
+
|
| 114 |
+
If you encounter the error "Invalid input device (no default output device)":
|
| 115 |
+
|
| 116 |
+
- The application will automatically switch to fallback mode
|
| 117 |
+
- You can still interact with Nova, but no actual audio will be played or recorded
|
| 118 |
+
- This is normal in cloud environments and containers without audio hardware
|
| 119 |
+
|
| 120 |
+
### AWS Authentication Issues
|
| 121 |
+
|
| 122 |
+
If you see authentication errors:
|
| 123 |
+
|
| 124 |
+
- Ensure your AWS credentials have access to Bedrock services
|
| 125 |
+
- Check that you've set the environment variables correctly
|
| 126 |
+
- Verify that the region you've specified has access to the Nova Sonic model
|
| 127 |
+
|
| 128 |
+
## Components
|
| 129 |
|
| 130 |
The application architecture includes:
|
| 131 |
+
- `nova_sonic_tool_use.py`: AWS Bedrock bidirectional streaming implementation
|
| 132 |
+
- `language_coach.py`: Speech pattern analysis and coaching
|
| 133 |
+
- `session_manager.py`: Conversation persistence and history management
|
| 134 |
+
- `app.py`: Main application logic and UI
|
| 135 |
+
- `config.py`: Configuration settings
|
| 136 |
|
| 137 |
## License
|
| 138 |
|