Skip to content

Commit 9ab2af0

Browse files
author
Botium
authored
Merge pull request #12 from codeforequity-at/feature/BOT-1986-voice-extend-botium-speech-proc
feature/BOT-1986-voice-extend-botium-speech-proc
2 parents a9d1282 + fe594f8 commit 9ab2af0

21 files changed

+660
-196
lines changed

Makefile

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
TAG_COMMIT := $(shell git rev-list --abbrev-commit --tags --max-count=1)
2+
VERSION := $(shell git describe --abbrev=0 --tags ${TAG_COMMIT} 2>/dev/null || true)
3+
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:
21+
docker build -t botium/botium-speech-frontend:$(VERSION) frontend
22+
docker build -t botium/botium-speech-watcher:$(VERSION) watcher
23+
docker build -f stt/Dockerfile.kaldi.en -t botium/botium-speech-kaldi-en:$(VERSION) stt
24+
docker build -f stt/Dockerfile.kaldi.de -t botium/botium-speech-kaldi-de:$(VERSION) stt
25+
docker build -f tts/Dockerfile.marytts -t botium/botium-speech-marytts:$(VERSION) tts
26+
docker build -t botium/botium-speech-dictate:$(VERSION) dictate
27+
28+
docker_publish_release:
29+
docker push botium/botium-speech-frontend:$(VERSION)
30+
docker push botium/botium-speech-watcher:$(VERSION)
31+
docker push botium/botium-speech-kaldi-en:$(VERSION)
32+
docker push botium/botium-speech-kaldi-de:$(VERSION)
33+
docker push botium/botium-speech-marytts:$(VERSION)
34+
docker push botium/botium-speech-dictate:$(VERSION)
35+
36+
docker_latest_release:
37+
docker tag botium/botium-speech-frontend:$(VERSION) botium/botium-speech-frontend:latest
38+
docker push botium/botium-speech-frontend:latest
39+
40+
docker tag botium/botium-speech-watcher:$(VERSION) botium/botium-speech-watcher:latest
41+
docker push botium/botium-speech-watcher:latest
42+
43+
docker tag botium/botium-speech-kaldi-en:$(VERSION) botium/botium-speech-kaldi-en:latest
44+
docker push botium/botium-speech-kaldi-en:latest
45+
46+
docker tag botium/botium-speech-kaldi-de:$(VERSION) botium/botium-speech-kaldi-de:latest
47+
docker push botium/botium-speech-kaldi-de:latest
48+
49+
docker tag botium/botium-speech-marytts:$(VERSION) botium/botium-speech-marytts:latest
50+
docker push botium/botium-speech-marytts:latest
51+
52+
docker tag botium/botium-speech-dictate:$(VERSION) botium/botium-speech-dictate:latest
53+
docker push botium/botium-speech-dictate:latest

README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,6 @@
66

77
Botium Speech Processing is a unified, developer-friendly API to the best available free and Open-Source Speech-To-Text and Text-To-Speech services.
88

9-
**UPDATE 2020/06/15:** As Chatbots grow in importance, automated testing solutions will remain critical for ensuring that Chatbots actually do what their designers intend. We've been busy working on a product that allows testers to have visual insights and deeper understanding in their Chatbot's performance, offering several solutions to boost their interaction!
10-
[Botium Coach will be introduced to the market as part of our online event on the 24th of June.](https://www.botium.ai/coach/)
11-
12-
[![](http://img.youtube.com/vi/WsNaDfZ7WHk/0.jpg)](http://www.youtube.com/watch?v=WsNaDfZ7WHk "Botium Coach is coming on 24th of June")
13-
149
## What is it ?
1510

1611
Botium Speech Processing is a *get-shit-done*-style Open-Source software stack, the configuration options are rudimentary: it is highly opinionated about the included tools, just get the shit done.
@@ -158,6 +153,12 @@ This project is standing on the shoulders of giants.
158153

159154
## Changelog
160155

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+
161162
### 2020-03-05
162163

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

build_and_push.sh

Lines changed: 0 additions & 19 deletions
This file was deleted.

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: 8 additions & 2 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:
@@ -29,8 +35,8 @@ services:
2935
volumes:
3036
- "./logs/stt_de:/opt/logs"
3137
tts:
32-
image: botium/botium-speech-marytts
38+
image: botium/botium-speech-marytts:latest
3339
restart: always
3440
dictate:
35-
image: botium/botium-speech-dictate
41+
image: botium/botium-speech-dictate:latest
3642
restart: always

frontend/Dockerfile

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
11
FROM ubuntu:18.04
22

33
RUN apt-get update && apt-get -y install curl gnupg && curl -sL https://deb.nodesource.com/setup_14.x | bash - && apt-get -y install nodejs
4-
RUN apt-get install -y dos2unix sox libsox-fmt-mp3 libttspico-utils
4+
RUN apt-get install -y dos2unix sox libsox-fmt-mp3 libttspico-utils ffmpeg
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: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -6,38 +6,40 @@
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",
1213
"license": "MIT",
1314
"dependencies": {
14-
"@google-cloud/speech": "^3.6.0",
15-
"@google-cloud/storage": "^4.3.0",
15+
"@google-cloud/speech": "^4.1.5",
16+
"@google-cloud/storage": "^5.7.0",
17+
"@google-cloud/text-to-speech": "^3.1.3",
1618
"body-parser": "^1.19.0",
17-
"cross-env": "^7.0.0",
18-
"debug": "^4.1.1",
19-
"dotenv-flow": "^3.1.0",
19+
"cross-env": "^7.0.3",
20+
"debug": "^4.3.1",
21+
"dotenv-flow": "^3.2.0",
2022
"express": "^4.17.1",
21-
"express-winston": "^4.0.1",
22-
"lodash": "^4.17.15",
23-
"mkdirp": "^0.5.1",
24-
"mustache": "^3.1.0",
25-
"nodemon": "^2.0.1",
26-
"request": "^2.88.0",
27-
"request-promise-native": "^1.0.8",
23+
"express-winston": "^4.0.5",
24+
"lodash": "^4.17.20",
25+
"mkdirp": "^1.0.4",
26+
"mustache": "^4.1.0",
27+
"nodemon": "^2.0.6",
28+
"request": "^2.88.2",
29+
"request-promise-native": "^1.0.9",
2830
"sanitize-filename": "^1.6.3",
29-
"swagger-jsdoc": "^3.5.0",
30-
"swagger-ui-express": "^4.1.2",
31-
"uuid": "^3.3.3",
32-
"winston": "^3.2.1",
33-
"word-error-rate": "0.0.7"
31+
"swagger-jsdoc": "^6.0.0-rc.5",
32+
"swagger-ui-express": "^4.1.5",
33+
"uuid": "^8.3.2",
34+
"winston": "^3.3.3",
35+
"word-error-rate": "^0.0.7"
3436
},
3537
"devDependencies": {
36-
"eslint": "^6.7.2",
37-
"eslint-config-standard": "^14.1.0",
38-
"eslint-plugin-import": "^2.19.1",
39-
"eslint-plugin-node": "^10.0.0",
38+
"eslint": "^7.15.0",
39+
"eslint-config-standard": "^16.0.2",
40+
"eslint-plugin-import": "^2.22.1",
41+
"eslint-plugin-node": "^11.1.0",
4042
"eslint-plugin-promise": "^4.2.1",
41-
"eslint-plugin-standard": "^4.0.1"
43+
"eslint-plugin-standard": "^5.0.0"
4244
}
4345
}

0 commit comments

Comments
 (0)