Skip to content

Commit

Permalink
Merge pull request #13 from codeforequity-at/develop
Browse files Browse the repository at this point in the history
Version 1.0.0
  • Loading branch information
Botium authored Dec 21, 2020
2 parents a9d1282 + ea0659d commit 8d38acd
Show file tree
Hide file tree
Showing 25 changed files with 681 additions and 204 deletions.
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
COMPOSE_PROJECT_NAME=botiumspeechprocessing
TAG=latest
2 changes: 2 additions & 0 deletions .env.develop
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
COMPOSE_PROJECT_NAME=botiumspeechprocessing
TAG=develop
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
logs
logs
docker-compose.override.yml
53 changes: 53 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
TAG_COMMIT := $(shell git rev-list --abbrev-commit --tags --max-count=1)
VERSION := $(shell git describe --abbrev=0 --tags ${TAG_COMMIT} 2>/dev/null || true)

docker_build_develop:
docker build -t botium/botium-speech-frontend:develop frontend
docker build -t botium/botium-speech-watcher:develop watcher
docker build -f stt/Dockerfile.kaldi.en -t botium/botium-speech-kaldi-en:develop stt
docker build -f stt/Dockerfile.kaldi.de -t botium/botium-speech-kaldi-de:develop stt
docker build -f tts/Dockerfile.marytts -t botium/botium-speech-marytts:develop tts
docker build -t botium/botium-speech-dictate:develop dictate

docker_publish_develop:
docker push botium/botium-speech-frontend:develop
docker push botium/botium-speech-watcher:develop
docker push botium/botium-speech-kaldi-en:develop
docker push botium/botium-speech-kaldi-de:develop
docker push botium/botium-speech-marytts:develop
docker push botium/botium-speech-dictate:develop

docker_build_release:
docker build -t botium/botium-speech-frontend:$(VERSION) frontend
docker build -t botium/botium-speech-watcher:$(VERSION) watcher
docker build -f stt/Dockerfile.kaldi.en -t botium/botium-speech-kaldi-en:$(VERSION) stt
docker build -f stt/Dockerfile.kaldi.de -t botium/botium-speech-kaldi-de:$(VERSION) stt
docker build -f tts/Dockerfile.marytts -t botium/botium-speech-marytts:$(VERSION) tts
docker build -t botium/botium-speech-dictate:$(VERSION) dictate

docker_publish_release:
docker push botium/botium-speech-frontend:$(VERSION)
docker push botium/botium-speech-watcher:$(VERSION)
docker push botium/botium-speech-kaldi-en:$(VERSION)
docker push botium/botium-speech-kaldi-de:$(VERSION)
docker push botium/botium-speech-marytts:$(VERSION)
docker push botium/botium-speech-dictate:$(VERSION)

docker_latest_release:
docker tag botium/botium-speech-frontend:$(VERSION) botium/botium-speech-frontend:latest
docker push botium/botium-speech-frontend:latest

docker tag botium/botium-speech-watcher:$(VERSION) botium/botium-speech-watcher:latest
docker push botium/botium-speech-watcher:latest

docker tag botium/botium-speech-kaldi-en:$(VERSION) botium/botium-speech-kaldi-en:latest
docker push botium/botium-speech-kaldi-en:latest

docker tag botium/botium-speech-kaldi-de:$(VERSION) botium/botium-speech-kaldi-de:latest
docker push botium/botium-speech-kaldi-de:latest

docker tag botium/botium-speech-marytts:$(VERSION) botium/botium-speech-marytts:latest
docker push botium/botium-speech-marytts:latest

docker tag botium/botium-speech-dictate:$(VERSION) botium/botium-speech-dictate:latest
docker push botium/botium-speech-dictate:latest
16 changes: 9 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@

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.

**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!
[Botium Coach will be introduced to the market as part of our online event on the 24th of June.](https://www.botium.ai/coach/)

[![](http://img.youtube.com/vi/WsNaDfZ7WHk/0.jpg)](http://www.youtube.com/watch?v=WsNaDfZ7WHk "Botium Coach is coming on 24th of June")

## What is it ?

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.
Expand Down Expand Up @@ -49,10 +44,11 @@ Clone or download this repository and start with docker-compose:

> docker-compose up -d

This will download the prebuilt images from Dockerhub.
This will download the latest released prebuilt images from Dockerhub. To download the latest developer images from Dockerhub:

Point your browser to http://127.0.0.1 to open the [Swagger UI](https://swagger.io/tools/swagger-ui/) and browse/use the API definition.
> docker-compose --env-file .env.develop up

Point your browser to http://127.0.0.1 to open the [Swagger UI](https://swagger.io/tools/swagger-ui/) and browse/use the API definition.

### Optional: Build Docker Images

Expand Down Expand Up @@ -158,6 +154,12 @@ This project is standing on the shoulders of giants.

## Changelog

### 2020-12-18

* Adding support for Google Text-To-Speech
* Adding support for listing and using available TTS voices
* Added sample docker-compose configurations for PicoTTS and Google

### 2020-03-05

* Optional _start_/_end_ parameters for audio file conversion to trim an audio file by time codes formatted as mm:ss (_01:32_)
Expand Down
19 changes: 0 additions & 19 deletions build_and_push.sh

This file was deleted.

1 change: 1 addition & 0 deletions dictate/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ RUN curl -L -o dicatejs.zip "https://github.com/Kaljurand/dictate.js/archive/mas

EXPOSE 56100

USER node
CMD DICTATEDIR=/app/dictate.js-master npm start
6 changes: 6 additions & 0 deletions docker-compose-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,14 @@ services:
frontend:
build:
context: frontend
image: botium/botium-speech-frontend:develop
restart: always
volumes:
- "./frontend/resources:/app/resources"
watcher:
build:
context: watcher
image: botium/botium-speech-watcher:develop
restart: always
volumes:
- "./watcher:/app/watch"
Expand All @@ -24,22 +26,26 @@ services:
build:
context: stt
dockerfile: Dockerfile.kaldi.en
image: botium/botium-speech-kaldi-en:develop
restart: always
volumes:
- "./logs/stt_en:/opt/logs"
stt_de:
build:
context: stt
dockerfile: Dockerfile.kaldi.de
image: botium/botium-speech-kaldi-de:develop
restart: always
volumes:
- "./logs/stt_de:/opt/logs"
tts:
build:
context: tts
dockerfile: Dockerfile.marytts
image: botium/botium-speech-marytts:develop
restart: always
dictate:
build:
context: dictate
image: botium/botium-speech-dictate:develop
restart: always
26 changes: 26 additions & 0 deletions docker-compose-google.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
version: '3'
services:
nginx:
image: nginx
restart: always
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
ports:
- 80:80
frontend:
image: botium/botium-speech-frontend:latest
restart: always
environment:
BOTIUM_API_TOKENS:
BOTIUM_SPEECH_PROVIDER_TTS: google
BOTIUM_SPEECH_PROVIDER_STT: google
BOTIUM_SPEECH_GOOGLE_CLIENT_EMAIL:
BOTIUM_SPEECH_GOOGLE_PRIVATE_KEY:
volumes:
- "./frontend/resources:/app/resources"
watcher:
image: botium/botium-speech-watcher:latest
restart: always
volumes:
- "./watcher:/app/watch"
- "./logs/watcher:/app/logs"
37 changes: 37 additions & 0 deletions docker-compose-picotts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
version: '3'
services:
nginx:
image: nginx
restart: always
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
ports:
- 80:80
frontend:
image: botium/botium-speech-frontend:latest
restart: always
environment:
BOTIUM_API_TOKENS:
BOTIUM_SPEECH_PROVIDER_TTS: picotts
BOTIUM_SPEECH_PROVIDER_STT: kaldi
volumes:
- "./frontend/resources:/app/resources"
watcher:
image: botium/botium-speech-watcher:latest
restart: always
volumes:
- "./watcher:/app/watch"
- "./logs/watcher:/app/logs"
stt_en:
image: botium/botium-speech-kaldi-en:latest
restart: always
volumes:
- "./logs/stt_en:/opt/logs"
stt_de:
image: botium/botium-speech-kaldi-de:latest
restart: always
volumes:
- "./logs/stt_de:/opt/logs"
dictate:
image: botium/botium-speech-dictate:latest
restart: always
7 changes: 7 additions & 0 deletions docker-compose.override.template.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: '3'
services:
dictate:
image: botium/botium-speech-dictate:develop
environment:
STT_URL_DE: wss://speech.botiumbox.com/stt_de
STT_URL_EN: wss://speech.botiumbox.com/stt_en
18 changes: 12 additions & 6 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,35 @@ services:
ports:
- 80:80
frontend:
image: botium/botium-speech-frontend:latest
image: botium/botium-speech-frontend:${TAG}
restart: always
environment:
BOTIUM_API_TOKENS:
BOTIUM_SPEECH_PROVIDER_TTS: marytts
BOTIUM_SPEECH_PROVIDER_STT: kaldi
BOTIUM_SPEECH_GOOGLE_CLIENT_EMAIL:
BOTIUM_SPEECH_GOOGLE_PRIVATE_KEY:
volumes:
- "./frontend/resources:/app/resources"
watcher:
image: botium/botium-speech-watcher:latest
image: botium/botium-speech-watcher:${TAG}
restart: always
volumes:
- "./watcher:/app/watch"
- "./logs/watcher:/app/logs"
stt_en:
image: botium/botium-speech-kaldi-en:latest
image: botium/botium-speech-kaldi-en:${TAG}
restart: always
volumes:
- "./logs/stt_en:/opt/logs"
stt_de:
image: botium/botium-speech-kaldi-de:latest
image: botium/botium-speech-kaldi-de:${TAG}
restart: always
volumes:
- "./logs/stt_de:/opt/logs"
tts:
image: botium/botium-speech-marytts
image: botium/botium-speech-marytts:${TAG}
restart: always
dictate:
image: botium/botium-speech-dictate
image: botium/botium-speech-dictate:${TAG}
restart: always
12 changes: 8 additions & 4 deletions frontend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
FROM ubuntu:18.04

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
RUN apt-get install -y dos2unix sox libsox-fmt-mp3 libttspico-utils
RUN apt-get update && apt-get install -y dos2unix sox libsox-fmt-mp3 libttspico-utils ffmpeg

WORKDIR /app
COPY . /app
RUN find . -type f -print0 | xargs -0 dos2unix
COPY ./package.json /app/package.json
RUN npm install --no-optional --production
COPY . /app
COPY ./resources/.env /app/.env
RUN find . -type f ! -path '*/node_modules/*' -print0 | xargs -0 dos2unix

VOLUME /app/resources

EXPOSE 56000

CMD npm start
RUN groupadd --gid 1000 node && useradd --uid 1000 --gid node --shell /bin/bash --create-home node
USER node
CMD npm run start-dist
48 changes: 25 additions & 23 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,39 +5,41 @@
"scripts": {
"eslint": "eslint src",
"eslint-fix": "eslint --fix src",
"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",
"start-dev": "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",
"start-dist": "node -r dotenv-flow/config ./src/server.js",
"jsdoc": "swagger-jsdoc -d ./src/swaggerDef.json -o ./src/swagger.json src/routes.js"
},
"author": "Botium GmbH",
"license": "MIT",
"dependencies": {
"@google-cloud/speech": "^3.6.0",
"@google-cloud/storage": "^4.3.0",
"@google-cloud/speech": "^4.1.5",
"@google-cloud/storage": "^5.7.0",
"@google-cloud/text-to-speech": "^3.1.3",
"body-parser": "^1.19.0",
"cross-env": "^7.0.0",
"debug": "^4.1.1",
"dotenv-flow": "^3.1.0",
"cross-env": "^7.0.3",
"debug": "^4.3.1",
"dotenv-flow": "^3.2.0",
"express": "^4.17.1",
"express-winston": "^4.0.1",
"lodash": "^4.17.15",
"mkdirp": "^0.5.1",
"mustache": "^3.1.0",
"nodemon": "^2.0.1",
"request": "^2.88.0",
"request-promise-native": "^1.0.8",
"express-winston": "^4.0.5",
"lodash": "^4.17.20",
"mkdirp": "^1.0.4",
"mustache": "^4.1.0",
"nodemon": "^2.0.6",
"request": "^2.88.2",
"request-promise-native": "^1.0.9",
"sanitize-filename": "^1.6.3",
"swagger-jsdoc": "^3.5.0",
"swagger-ui-express": "^4.1.2",
"uuid": "^3.3.3",
"winston": "^3.2.1",
"word-error-rate": "0.0.7"
"swagger-jsdoc": "^6.0.0-rc.5",
"swagger-ui-express": "^4.1.5",
"uuid": "^8.3.2",
"winston": "^3.3.3",
"word-error-rate": "^0.0.7"
},
"devDependencies": {
"eslint": "^6.7.2",
"eslint-config-standard": "^14.1.0",
"eslint-plugin-import": "^2.19.1",
"eslint-plugin-node": "^10.0.0",
"eslint": "^7.15.0",
"eslint-config-standard": "^16.0.2",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-standard": "^4.0.1"
"eslint-plugin-standard": "^5.0.0"
}
}
Loading

0 comments on commit 8d38acd

Please sign in to comment.