Spaces:
Running
on
Zero
Running
on
Zero
Add required `espeak`
Browse files- README.md +23 -2
- packages.txt +1 -0
README.md
CHANGED
|
@@ -46,9 +46,21 @@ This application provides the following AI building blocks:
|
|
| 46 |
source .venv/bin/activate # On Windows: .venv\Scripts\activate
|
| 47 |
```
|
| 48 |
|
| 49 |
-
3. Install
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 50 |
|
| 51 |
-
|
| 52 |
```bash
|
| 53 |
pip install -r requirements.txt
|
| 54 |
```
|
|
@@ -151,6 +163,7 @@ ai-building-blocks/
|
|
| 151 |
βββ chatbot.py # Chatbot module
|
| 152 |
βββ utils.py # Utility functions
|
| 153 |
βββ requirements.txt # Python dependencies
|
|
|
|
| 154 |
βββ .env # Environment variables (create this)
|
| 155 |
βββ README.md # This file
|
| 156 |
```
|
|
@@ -181,6 +194,14 @@ If PyTorch is not detecting your GPU:
|
|
| 181 |
|
| 182 |
Ensure all required environment variables are set in your `.env` file. Missing variables will cause the application to fail when trying to use the corresponding feature.
|
| 183 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 184 |
### Model Loading Errors
|
| 185 |
|
| 186 |
If you encounter errors loading models:
|
|
|
|
| 46 |
source .venv/bin/activate # On Windows: .venv\Scripts\activate
|
| 47 |
```
|
| 48 |
|
| 49 |
+
3. Install system dependencies (required for text-to-speech):
|
| 50 |
+
```bash
|
| 51 |
+
# On Ubuntu/Debian:
|
| 52 |
+
sudo apt-get update && sudo apt-get install -y espeak-ng
|
| 53 |
+
|
| 54 |
+
# On macOS:
|
| 55 |
+
brew install espeak-ng
|
| 56 |
+
|
| 57 |
+
# On Fedora/RHEL:
|
| 58 |
+
sudo dnf install espeak-ng
|
| 59 |
+
```
|
| 60 |
+
|
| 61 |
+
4. Install PyTorch with CUDA support (see [PyTorch Installation](#pytorch-installation) below).
|
| 62 |
|
| 63 |
+
5. Install the remaining dependencies:
|
| 64 |
```bash
|
| 65 |
pip install -r requirements.txt
|
| 66 |
```
|
|
|
|
| 163 |
βββ chatbot.py # Chatbot module
|
| 164 |
βββ utils.py # Utility functions
|
| 165 |
βββ requirements.txt # Python dependencies
|
| 166 |
+
βββ packages.txt # System dependencies (for Hugging Face Spaces)
|
| 167 |
βββ .env # Environment variables (create this)
|
| 168 |
βββ README.md # This file
|
| 169 |
```
|
|
|
|
| 194 |
|
| 195 |
Ensure all required environment variables are set in your `.env` file. Missing variables will cause the application to fail when trying to use the corresponding feature.
|
| 196 |
|
| 197 |
+
### espeak Not Installed (Text-to-Speech)
|
| 198 |
+
|
| 199 |
+
If you encounter a `RuntimeError: espeak not installed on your system` error:
|
| 200 |
+
|
| 201 |
+
1. Install `espeak-ng` using your system package manager (see [Installation](#installation) step 3).
|
| 202 |
+
2. On Hugging Face Spaces, ensure `packages.txt` exists with `espeak-ng` listed (this file is automatically used by Spaces).
|
| 203 |
+
3. Verify installation: `espeak --version` or `espeak-ng --version`
|
| 204 |
+
|
| 205 |
### Model Loading Errors
|
| 206 |
|
| 207 |
If you encounter errors loading models:
|
packages.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
espeak-ng
|