Skip to content

Commit 3335120

Browse files
author
Florian Treml
committed
BOT-1987 added "voices" query. BOT-1986 Added Google STT
1 parent a9d1282 commit 3335120

File tree

16 files changed

+440
-144
lines changed

16 files changed

+440
-144
lines changed

Makefile

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
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:
5+
docker build -t botium/botium-speech-frontend:$(VERSION) frontend
6+
docker build -t botium/botium-speech-watcher:$(VERSION) watcher
7+
docker build -f stt/Dockerfile.kaldi.en -t botium/botium-speech-kaldi-en:$(VERSION) stt
8+
docker build -f stt/Dockerfile.kaldi.de -t botium/botium-speech-kaldi-de:$(VERSION) stt
9+
docker build -f tts/Dockerfile.marytts -t botium/botium-speech-marytts:$(VERSION) tts
10+
docker build -t botium/botium-speech-dictate:$(VERSION) dictate
11+
12+
docker_publish:
13+
docker push botium/botium-speech-frontend:$(VERSION)
14+
docker push botium/botium-speech-watcher:$(VERSION)
15+
docker push botium/botium-speech-kaldi-en:$(VERSION)
16+
docker push botium/botium-speech-kaldi-de:$(VERSION)
17+
docker push botium/botium-speech-marytts:$(VERSION)
18+
docker push botium/botium-speech-dictate:$(VERSION)
19+
20+
docker_latest:
21+
docker tag botium/botium-speech-frontend:$(VERSION) botium/botium-speech-frontend:latest
22+
docker push botium/botium-speech-frontend:latest
23+
24+
docker tag botium/botium-speech-watcher:$(VERSION) botium/botium-speech-watcher:latest
25+
docker push botium/botium-speech-watcher:latest
26+
27+
docker tag botium/botium-speech-kaldi-en:$(VERSION) botium/botium-speech-kaldi-en:latest
28+
docker push botium/botium-speech-kaldi-en:latest
29+
30+
docker tag botium/botium-speech-kaldi-de:$(VERSION) botium/botium-speech-kaldi-de:latest
31+
docker push botium/botium-speech-kaldi-de:latest
32+
33+
docker tag botium/botium-speech-marytts:$(VERSION) botium/botium-speech-marytts:latest
34+
docker push botium/botium-speech-marytts:latest
35+
36+
docker tag botium/botium-speech-dictate:$(VERSION) botium/botium-speech-dictate:latest
37+
docker push botium/botium-speech-dictate:latest

README.md

Lines changed: 0 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.

build_and_push.sh

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

docker-compose-dev.yml

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -13,33 +13,33 @@ services:
1313
restart: always
1414
volumes:
1515
- "./frontend/resources:/app/resources"
16-
watcher:
17-
build:
18-
context: watcher
19-
restart: always
20-
volumes:
21-
- "./watcher:/app/watch"
22-
- "./logs/watcher:/app/logs"
23-
stt_en:
24-
build:
25-
context: stt
26-
dockerfile: Dockerfile.kaldi.en
27-
restart: always
28-
volumes:
29-
- "./logs/stt_en:/opt/logs"
30-
stt_de:
31-
build:
32-
context: stt
33-
dockerfile: Dockerfile.kaldi.de
34-
restart: always
35-
volumes:
36-
- "./logs/stt_de:/opt/logs"
16+
# watcher:
17+
# build:
18+
# context: watcher
19+
# restart: always
20+
# volumes:
21+
# - "./watcher:/app/watch"
22+
# - "./logs/watcher:/app/logs"
23+
# stt_en:
24+
# build:
25+
# context: stt
26+
# dockerfile: Dockerfile.kaldi.en
27+
# restart: always
28+
# volumes:
29+
# - "./logs/stt_en:/opt/logs"
30+
# stt_de:
31+
# build:
32+
# context: stt
33+
# dockerfile: Dockerfile.kaldi.de
34+
# restart: always
35+
# volumes:
36+
# - "./logs/stt_de:/opt/logs"
3737
tts:
3838
build:
3939
context: tts
4040
dockerfile: Dockerfile.marytts
4141
restart: always
42-
dictate:
43-
build:
44-
context: dictate
45-
restart: always
42+
# dictate:
43+
# build:
44+
# context: dictate
45+
# restart: always

docker-compose.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ services:
2929
volumes:
3030
- "./logs/stt_de:/opt/logs"
3131
tts:
32-
image: botium/botium-speech-marytts
32+
image: botium/botium-speech-marytts:latest
3333
restart: always
3434
dictate:
35-
image: botium/botium-speech-dictate
35+
image: botium/botium-speech-dictate:latest
3636
restart: always

frontend/package.json

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -11,33 +11,34 @@
1111
"author": "Botium GmbH",
1212
"license": "MIT",
1313
"dependencies": {
14-
"@google-cloud/speech": "^3.6.0",
15-
"@google-cloud/storage": "^4.3.0",
14+
"@google-cloud/speech": "^4.1.5",
15+
"@google-cloud/storage": "^5.7.0",
16+
"@google-cloud/text-to-speech": "^3.1.3",
1617
"body-parser": "^1.19.0",
17-
"cross-env": "^7.0.0",
18-
"debug": "^4.1.1",
19-
"dotenv-flow": "^3.1.0",
18+
"cross-env": "^7.0.3",
19+
"debug": "^4.3.1",
20+
"dotenv-flow": "^3.2.0",
2021
"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",
22+
"express-winston": "^4.0.5",
23+
"lodash": "^4.17.20",
24+
"mkdirp": "^1.0.4",
25+
"mustache": "^4.1.0",
26+
"nodemon": "^2.0.6",
27+
"request": "^2.88.2",
28+
"request-promise-native": "^1.0.9",
2829
"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"
30+
"swagger-jsdoc": "^6.0.0-rc.5",
31+
"swagger-ui-express": "^4.1.5",
32+
"uuid": "^8.3.2",
33+
"winston": "^3.3.3",
34+
"word-error-rate": "^0.0.7"
3435
},
3536
"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",
37+
"eslint": "^7.15.0",
38+
"eslint-config-standard": "^16.0.2",
39+
"eslint-plugin-import": "^2.22.1",
40+
"eslint-plugin-node": "^11.1.0",
4041
"eslint-plugin-promise": "^4.2.1",
41-
"eslint-plugin-standard": "^4.0.1"
42+
"eslint-plugin-standard": "^5.0.0"
4243
}
4344
}

frontend/resources/.env

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

13-
# Provider for TTS (marytts or picotts)
13+
# Provider for TTS (google or marytts or picotts)
1414
BOTIUM_SPEECH_PROVIDER_TTS=marytts
1515

1616
# Provider for STT (kaldi or google)
1717
BOTIUM_SPEECH_PROVIDER_STT=kaldi
1818

19-
# TTS Provider MaryTTS URLs
20-
BOTIUM_SPEECH_MARYTTS_URL_EN=http://tts:59125/process?INPUT_TEXT={{text}}&INPUT_TYPE=TEXT&OUTPUT_TYPE=AUDIO&AUDIO=WAVE_FILE&VOICE=dfki-spike&LOCALE=en_GB
21-
BOTIUM_SPEECH_MARYTTS_URL_DE=http://tts:59125/process?INPUT_TEXT={{text}}&INPUT_TYPE=TEXT&OUTPUT_TYPE=AUDIO&AUDIO=WAVE_FILE&VOICE=bits3-hsmm&LOCALE=de
19+
# TTS Provider MaryTTS URLs
20+
BOTIUM_SPEECH_MARYTTS_URL=http://tts:59125
2221

2322
# TTS Provider Pico Command Line
24-
BOTIUM_SPEECH_PICO_CMDPREFIX_EN=pico2wave --lang=en-US --wave={{{output}}}
25-
BOTIUM_SPEECH_PICO_CMDPREFIX_DE=pico2wave --lang=de-DE --wave={{{output}}}
23+
BOTIUM_SPEECH_PICO_CMDPREFIX=pico2wave
2624

2725
# STT Provider Kaldi URLs
2826
BOTIUM_SPEECH_KALDI_URL_EN=http://stt_en:80/client/dynamic/recognize
2927
BOTIUM_SPEECH_KALDI_URL_DE=http://stt_de:80/client/dynamic/recognize
3028

3129
# STT Provider Google
32-
BOTIUM_SPEECH_GOOGLE_KEYFILE=./resources/google.json
33-
BOTIUM_SPEECH_GOOGLE_CONFIG_EN={ "languageCode": "en-US" }
34-
BOTIUM_SPEECH_GOOGLE_CONFIG_DE={ "languageCode": "de-DE" }
30+
#BOTIUM_SPEECH_GOOGLE_KEYFILE=./resources/google.json
31+
#BOTIUM_SPEECH_GOOGLE_CLIENT_EMAIL=
32+
#BOTIUM_SPEECH_GOOGLE_PRIVATE_KEY=
33+
BOTIUM_SPEECH_GOOGLE_CONFIG={}
3534
# For files longer than 1 minute, you have to create a Google Cloud Storage Bucket as temporary storage (give read/write access to service user)
3635
#BOTIUM_SPEECH_GOOGLE_BUCKET_NAME=
3736
#BOTIUM_SPEECH_GOOGLE_API_VERSION=

frontend/src/convert/sox.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const fs = require('fs')
22
const Mustache = require('mustache')
33
const { spawn } = require('child_process')
4-
const uuidv1 = require('uuid/v1')
4+
const { v1: uuidv1 } = require('uuid')
55
const debug = require('debug')('botium-speech-processing-convert-sox')
66

77
const runsox = (cmdLine, { inputBuffer, start, end }) => {

0 commit comments

Comments
 (0)