Spaces:
Runtime error
Runtime error
imseldrith
commited on
Upload 6 files
Browse files- .dockerignore +3 -0
- .gitignore +11 -0
- Dockerfile +8 -0
- Dockerfile_with_model +11 -0
- README.md +39 -11
- requirements.txt +5 -0
.dockerignore
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
.gitignore
|
2 |
+
.DS_Store
|
3 |
+
.dockerignore
|
.gitignore
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Byte-compiled / optimized / DLL files
|
2 |
+
__pycache__/
|
3 |
+
|
4 |
+
# Environments
|
5 |
+
.env
|
6 |
+
.venv
|
7 |
+
|
8 |
+
# PyCharm
|
9 |
+
.idea/
|
10 |
+
|
11 |
+
.DS_Store
|
Dockerfile
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM continuumio/miniconda3
|
2 |
+
RUN apt update && apt install espeak-ng ffmpeg -y
|
3 |
+
WORKDIR /root
|
4 |
+
ADD ./requirements.txt .
|
5 |
+
RUN pip install -r requirements.txt
|
6 |
+
ADD ./src .
|
7 |
+
RUN python -m nltk.downloader punkt
|
8 |
+
CMD ["python", "main.py"]
|
Dockerfile_with_model
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM continuumio/miniconda3
|
2 |
+
RUN apt update && apt install espeak-ng ffmpeg -y
|
3 |
+
WORKDIR /root
|
4 |
+
ADD ./requirements.txt .
|
5 |
+
RUN pip install -r requirements.txt
|
6 |
+
ADD ./src .
|
7 |
+
RUN python -m nltk.downloader punkt
|
8 |
+
RUN echo 'from bark import preload_models \n\
|
9 |
+
preload_models()' >> install_bark.py
|
10 |
+
RUN python install_bark.py
|
11 |
+
CMD ["python", "main.py"]
|
README.md
CHANGED
@@ -1,11 +1,39 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
### Manual installation using Conda
|
2 |
+
|
3 |
+
#### 1. Create a new conda environment
|
4 |
+
|
5 |
+
```
|
6 |
+
conda create -n tts python=3.10.10
|
7 |
+
conda activate tts
|
8 |
+
```
|
9 |
+
|
10 |
+
#### 2. Install requirements
|
11 |
+
|
12 |
+
```
|
13 |
+
pip install -r requirements.txt
|
14 |
+
```
|
15 |
+
|
16 |
+
#### 3. Download nltk
|
17 |
+
```
|
18 |
+
python -m nltk.downloader punkt
|
19 |
+
```
|
20 |
+
|
21 |
+
#### 4. Run Server
|
22 |
+
```
|
23 |
+
cd src
|
24 |
+
python main.py
|
25 |
+
```
|
26 |
+
|
27 |
+
### How to run in docker
|
28 |
+
#### Build image by yourself
|
29 |
+
```
|
30 |
+
docker build -t opendan-tts-server -f Dockerfile_with_model.
|
31 |
+
docker run -d --name tts-server -p 6006:6006 opendan-tts-server
|
32 |
+
```
|
33 |
+
If you don't want to build image, you can use public image `synthintel2/opendan-tts-server:with_model`.
|
34 |
+
|
35 |
+
#### User public image
|
36 |
+
```
|
37 |
+
docker pull synthintel2/opendan-tts-server::with_model
|
38 |
+
docker run -d --name tts-server -p 6006:6006 synthintel2/opendan-tts-server:with_model
|
39 |
+
```
|
requirements.txt
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
fastapi==0.95.2
|
2 |
+
bark==0.1.5
|
3 |
+
uvicorn==0.22.0
|
4 |
+
nltk==3.8.1
|
5 |
+
soundfile==0.12.1
|