Skip to content

Commit 5d55926

Browse files
author
Florian Treml
committed
Using reasonable filenames for TTS result. Added some default configurations.
1 parent 3335120 commit 5d55926

File tree

16 files changed

+133
-12
lines changed

16 files changed

+133
-12
lines changed

Makefile

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,39 @@
11
TAG_COMMIT := $(shell git rev-list --abbrev-commit --tags --max-count=1)
22
VERSION := $(shell git describe --abbrev=0 --tags ${TAG_COMMIT} 2>/dev/null || true)
33

4-
docker_build:
4+
docker_build_develop:
5+
docker build -t botium/botium-speech-frontend:develop frontend
6+
docker build -t botium/botium-speech-watcher:develop watcher
7+
docker build -f stt/Dockerfile.kaldi.en -t botium/botium-speech-kaldi-en:develop) stt
8+
docker build -f stt/Dockerfile.kaldi.de -t botium/botium-speech-kaldi-de:develop stt
9+
docker build -f tts/Dockerfile.marytts -t botium/botium-speech-marytts:develop tts
10+
docker build -t botium/botium-speech-dictate:develop dictate
11+
12+
docker_publish_develop:
13+
docker push botium/botium-speech-frontend:develop
14+
docker push botium/botium-speech-watcher:develop
15+
docker push botium/botium-speech-kaldi-en:develop
16+
docker push botium/botium-speech-kaldi-de:develop
17+
docker push botium/botium-speech-marytts:develop
18+
docker push botium/botium-speech-dictate:develop
19+
20+
docker_build_release:
521
docker build -t botium/botium-speech-frontend:$(VERSION) frontend
622
docker build -t botium/botium-speech-watcher:$(VERSION) watcher
723
docker build -f stt/Dockerfile.kaldi.en -t botium/botium-speech-kaldi-en:$(VERSION) stt
824
docker build -f stt/Dockerfile.kaldi.de -t botium/botium-speech-kaldi-de:$(VERSION) stt
925
docker build -f tts/Dockerfile.marytts -t botium/botium-speech-marytts:$(VERSION) tts
1026
docker build -t botium/botium-speech-dictate:$(VERSION) dictate
1127

12-
docker_publish:
28+
docker_publish_release:
1329
docker push botium/botium-speech-frontend:$(VERSION)
1430
docker push botium/botium-speech-watcher:$(VERSION)
1531
docker push botium/botium-speech-kaldi-en:$(VERSION)
1632
docker push botium/botium-speech-kaldi-de:$(VERSION)
1733
docker push botium/botium-speech-marytts:$(VERSION)
1834
docker push botium/botium-speech-dictate:$(VERSION)
1935

20-
docker_latest:
36+
docker_latest_release:
2137
docker tag botium/botium-speech-frontend:$(VERSION) botium/botium-speech-frontend:latest
2238
docker push botium/botium-speech-frontend:latest
2339

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,12 @@ This project is standing on the shoulders of giants.
153153

154154
## Changelog
155155

156+
### 2020-12-18
157+
158+
* Adding support for Google Text-To-Speech
159+
* Adding support for listing and using available TTS voices
160+
* Added sample docker-compose configurations for PicoTTS and Google
161+
156162
### 2020-03-05
157163

158164
* Optional _start_/_end_ parameters for audio file conversion to trim an audio file by time codes formatted as mm:ss (_01:32_)

dictate/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,5 @@ RUN curl -L -o dicatejs.zip "https://github.com/Kaljurand/dictate.js/archive/mas
1111

1212
EXPOSE 56100
1313

14+
USER node
1415
CMD DICTATEDIR=/app/dictate.js-master npm start

docker-compose-dev.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,14 @@ services:
1010
frontend:
1111
build:
1212
context: frontend
13+
image: botium/botium-speech-frontend:develop
1314
restart: always
1415
volumes:
1516
- "./frontend/resources:/app/resources"
1617
# watcher:
1718
# build:
1819
# context: watcher
20+
# image: botium/botium-speech-watcher:develop
1921
# restart: always
2022
# volumes:
2123
# - "./watcher:/app/watch"
@@ -24,22 +26,26 @@ services:
2426
# build:
2527
# context: stt
2628
# dockerfile: Dockerfile.kaldi.en
29+
# image: botium/botium-speech-kaldi-en:develop
2730
# restart: always
2831
# volumes:
2932
# - "./logs/stt_en:/opt/logs"
3033
# stt_de:
3134
# build:
3235
# context: stt
3336
# dockerfile: Dockerfile.kaldi.de
37+
# image: botium/botium-speech-kaldi-de:develop
3438
# restart: always
3539
# volumes:
3640
# - "./logs/stt_de:/opt/logs"
3741
tts:
3842
build:
3943
context: tts
4044
dockerfile: Dockerfile.marytts
45+
image: botium/botium-speech-marytts:develop
4146
restart: always
4247
# dictate:
4348
# build:
4449
# context: dictate
50+
# image: botium/botium-speech-dictate:develop
4551
# restart: always

docker-compose-google.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
version: '3'
2+
services:
3+
nginx:
4+
image: nginx
5+
restart: always
6+
volumes:
7+
- ./nginx.conf:/etc/nginx/nginx.conf
8+
ports:
9+
- 80:80
10+
frontend:
11+
image: botium/botium-speech-frontend:latest
12+
restart: always
13+
environment:
14+
BOTIUM_API_TOKENS:
15+
BOTIUM_SPEECH_PROVIDER_TTS: google
16+
BOTIUM_SPEECH_PROVIDER_STT: google
17+
BOTIUM_SPEECH_GOOGLE_CLIENT_EMAIL:
18+
BOTIUM_SPEECH_GOOGLE_PRIVATE_KEY:
19+
volumes:
20+
- "./frontend/resources:/app/resources"
21+
watcher:
22+
image: botium/botium-speech-watcher:latest
23+
restart: always
24+
volumes:
25+
- "./watcher:/app/watch"
26+
- "./logs/watcher:/app/logs"

docker-compose-picotts.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
version: '3'
2+
services:
3+
nginx:
4+
image: nginx
5+
restart: always
6+
volumes:
7+
- ./nginx.conf:/etc/nginx/nginx.conf
8+
ports:
9+
- 80:80
10+
frontend:
11+
image: botium/botium-speech-frontend:latest
12+
restart: always
13+
environment:
14+
BOTIUM_API_TOKENS:
15+
BOTIUM_SPEECH_PROVIDER_TTS: picotts
16+
BOTIUM_SPEECH_PROVIDER_STT: kaldi
17+
volumes:
18+
- "./frontend/resources:/app/resources"
19+
watcher:
20+
image: botium/botium-speech-watcher:latest
21+
restart: always
22+
volumes:
23+
- "./watcher:/app/watch"
24+
- "./logs/watcher:/app/logs"
25+
stt_en:
26+
image: botium/botium-speech-kaldi-en:latest
27+
restart: always
28+
volumes:
29+
- "./logs/stt_en:/opt/logs"
30+
stt_de:
31+
image: botium/botium-speech-kaldi-de:latest
32+
restart: always
33+
volumes:
34+
- "./logs/stt_de:/opt/logs"
35+
dictate:
36+
image: botium/botium-speech-dictate:latest
37+
restart: always

docker-compose.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ services:
1010
frontend:
1111
image: botium/botium-speech-frontend:latest
1212
restart: always
13+
environment:
14+
BOTIUM_API_TOKENS:
15+
BOTIUM_SPEECH_PROVIDER_TTS: marytts
16+
BOTIUM_SPEECH_PROVIDER_STT: kaldi
17+
BOTIUM_SPEECH_GOOGLE_CLIENT_EMAIL:
18+
BOTIUM_SPEECH_GOOGLE_PRIVATE_KEY:
1319
volumes:
1420
- "./frontend/resources:/app/resources"
1521
watcher:

frontend/Dockerfile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,15 @@ RUN apt-get update && apt-get -y install curl gnupg && curl -sL https://deb.node
44
RUN apt-get install -y dos2unix sox libsox-fmt-mp3 libttspico-utils
55

66
WORKDIR /app
7-
COPY . /app
8-
RUN find . -type f -print0 | xargs -0 dos2unix
7+
COPY ./package.json /app/package.json
98
RUN npm install --no-optional --production
9+
COPY . /app
10+
RUN find . -type f ! -path '*/node_modules/*' -print0 | xargs -0 dos2unix
1011

1112
VOLUME /app/resources
1213

1314
EXPOSE 56000
1415

15-
CMD npm start
16+
RUN groupadd --gid 1000 node && useradd --uid 1000 --gid node --shell /bin/bash --create-home node
17+
USER node
18+
CMD npm run start-dist

frontend/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"eslint": "eslint src",
77
"eslint-fix": "eslint --fix src",
88
"start": "cross-env DOTENV_FLOW_PATH=./resources nodemon -w ./resources/.env -w ./resources/.env.local -w ./src/ -x \"node -r dotenv-flow/config\" ./src/server.js",
9+
"start-dist": "cross-env DOTENV_FLOW_PATH=./resources node -r dotenv-flow/config ./src/server.js",
910
"jsdoc": "swagger-jsdoc -d ./src/swaggerDef.json -o ./src/swagger.json src/routes.js"
1011
},
1112
"author": "Botium GmbH",

frontend/resources/.env

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ BOTIUM_SPEECH_UPLOAD_LIMIT=50mb
1010
# Cache Path
1111
BOTIUM_SPEECH_CACHE_DIR=./resources/.cache
1212

13+
# Temp Path
14+
BOTIUM_SPEECH_TMP_DIR=./resources/.tmp
15+
1316
# Provider for TTS (google or marytts or picotts)
1417
BOTIUM_SPEECH_PROVIDER_TTS=marytts
1518

0 commit comments

Comments
 (0)