imseldrith commited on
Commit
43a8e28
·
verified ·
1 Parent(s): 154a274

Upload 6 files

Browse files
Files changed (6) hide show
  1. .dockerignore +3 -0
  2. .gitignore +11 -0
  3. Dockerfile +8 -0
  4. Dockerfile_with_model +11 -0
  5. README.md +39 -11
  6. 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
- title: Dantts
3
- emoji: 🐨
4
- colorFrom: indigo
5
- colorTo: indigo
6
- sdk: docker
7
- pinned: false
8
- license: mit
9
- ---
10
-
11
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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