chaosloth / twilio-stream-transcript

Stream ASR transcript to Sync

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Real-time Media Streamer

This is a Media Stream WSS server to Google/Microsoft/DeepGram speech server. The purpose is to enable Twilio Media Streams (multichannel inbound / outbound) to stream audio to the appropriate backend. Text that is captured is then streamed to Twilio Sync for further processing (e.g. Flex Plugin)

Getting Started

Ensure that you have the appropriate keys from Google/Microsoft/Deepgram for the respective backends. Configure these in the .env file

Configuration

Configure your API keys are required

#
# GOOGLE
#
GOOGLE_APPLICATION_CREDENTIALS=

#
# MICROSOFT
#
MS_SPEECH_KEY=
MS_SPEECH_REGION=

#
# DEEPGRAM
#
DEEPGRAM_API_KEY=

#
# TWILIO
#
TWILIO_ACCOUNT_SID=
TWILIO_API_KEY=
TWILIO_API_SECRET=
TWILIO_SYNC_SERVICE_SID=

Example

Demo

Google Cloud Run

  1. Install the Google Cloud CLI
$ gcloud init
  1. gcloud run deploy twilio-media-receiver --source .
  2. Set the environment variables (from .env)

Alternative

  1. gcloud builds submit --pack image=[IMAGE]
  2. gcloud run deploy twilio-media-receiver --image [IMAGE]

About

Stream ASR transcript to Sync


Languages

Language:JavaScript 100.0%