Skip to content

bradparks/botium-speech-processing

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Botium Speech Processing

license pullrequests awesome

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

What is it ?

This is a get-shit-done-style collection of the best free and Open Source speech recognition products, the configuration options are rudimentary: it is highly opinionated about the included tools, just get the shit done.

  • With Kaldi a reasonable speech recogniction performance is available with freely available data sources.
  • MaryTTS is currently the best freely available speech synthesis software
  • SoX is the swiss army-knife for audio file processing

While the included tools in most cases cannot compete with the big cloud-based products, for lots of applications the trade-off between price and quality is at least reasonable.

Read about the project history here

Possible Applications

Some examples what you can do with this:

  • Synthesize audio tracks for Youtube tutorials
  • Build voice-enabled chatbot services (for example, IVR systems)
  • Classification of audio file transcriptions
  • Automated Testing of Voice services with Botium

Installation

Software and Hardware Requirements

  • 8GB of RAM (accessible for Docker) and 20GB free HD space
  • Internet connectivity
  • docker
  • docker-compose

Note: memory usage can be reduced if only one language is required - default configuration comes with two languages.

Build Docker Containers

Clone or download this repository and start with docker-compose:

> docker-compose up -d

This will take some time to build.

Point your browser to http://127.0.0.1 to open the Swagger UI and browse/use the API definition.

Configuration

This repository includes a reasonable default configuration:

  • Use MaryTTS for TTS
  • Use Kaldi for STT
  • Use SoX for audio file conversion
  • Languages included:
    • German
    • English

Configuration changes with environment variables. See comments in this file.

Recommendation: Do not change the .env file but create a .env.local file to overwrite the default settings. This will prevent troubles on future git pull

Securing the API

The environment variable BOTIUM_API_TOKENS contains a list of valid API Tokens accepted by the server (separated by whitespace or comma). The HTTP Header BOTIUM_API_TOKEN is validated on each call to the API.

Testing

Point your browser to http://127.0.0.1/ to open Swagger UI to try out the API.

Point your browser to http://127.0.0.1/dictate to open a rudimentary dictate.js-interface for testing speech recognition.

Attention: in Google Chrome this only works with services published as HTTPS, you will have to take of this yourself. For example, you could publish it via ngrok tunnel.

Point your browser to http://127.0.0.1/tts to open a MaryTTS interface for testing speech synthesis.

Real Time API

There are Websocket endpoints exposed for real-time audio decoding. Find the API description in the Kaldi GStreamer Server documentation.

The Websocket endpoints are:

  • English: ws://127.0.0.1/stt_en/client/ws/speech
  • German: ws://127.0.0.1/stt_de/client/ws/speech

API Definition

See swagger.json:

Contributing

To be done: contribution guidelines.

We are open to any kind of contributions and are happy to discuss, review and merge pull requests.

Big Thanks

This project is standing on the shoulders of giants.

About

Botium Speech Processing

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 95.9%
  • Dockerfile 4.1%