Skip to content

Example on how to build a Cognigy Voice Gateway compatible STT/TTS solution.

License

Notifications You must be signed in to change notification settings

Cognigy/custom-speech-example

Repository files navigation

Custom Speech Example

This repository serves as an illustrative guide for integrating support for a custom speech vendor into Cognigy Voice Gateway using the speech API. It showcases the incorporation of the following examples:

TTS:

STT:

Configuration

You can configure the application to connect to all of the providers or just some depending on the environment variables supplied.

  • To use google, supply GCP_JSON_KEY_FILE pointing to your google json key
  • To use elevenlabs, supply ELEVEN_API_KEY which has your api key
  • To use assemblyAI, supply ASSEMBLY_AI_API_TOKEN which has your assemblyAI api key
  • To use gladia, supply GLADIA_API_KEY
  • To use Vosk, supply VOSK_URL which has the ip:port of the Vosk server grpc endpoint

Running

$ npm ci

$ API_KEY=<apikey> \
GCP_JSON_KEY_FILE=<google-json-key-path> \
ASSEMBLY_AI_API_TOKEN=<assemblyai-api-key> \
VOSK_URL=xxxx:yyyy
GLADIA_API_KEY=xxxxxxxx \
ELEVEN_API_KEY=xxxxxxx \
HTTP_PORT=3000 node app.js

Then, in the Cognigy Voice Gateway portal create a custom speech vendor, providing the wss (for STT) and http(s) (for TTS) URLs to your server, and your api key (apikey).

After adding the custom speech vendors you can use them in a Cognigy Voice Gateway application. Make sure this application is running and accessible at the URLs you provisioned into Cognigy Voice Gateway.

About

Example on how to build a Cognigy Voice Gateway compatible STT/TTS solution.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •