Coder Social home page Coder Social logo

signalwire / signalwire-react-relay-translate-transcribe Goto Github PK

View Code? Open in Web Editor NEW
0.0 9.0 1.0 425 KB

A frontend and backend that uses SignalWire RELAY and Google Speech to display translated voice messages in a react app.

JavaScript 89.38% HTML 4.52% CSS 6.10%

signalwire-react-relay-translate-transcribe's Introduction

SignalWire React Relay Translate and Transcribe Example

Prerequisites

To run this example you will need to first create a SignalWire account and then configure a SignalWire Space with an inbound phone number.

API Credentials

To run the example a SignalWire Project ID and API Token are required. Follow these intructions to create a new API Token.

Configure SignalWire Phone Number to a context

Set the Relay context that your phone number forwards to as translator

Google Speech and Translate

To access the Google Speech to text and language translation API, you need to create an account and some credentials.

Follow these instructions https://cloud.google.com/speech-to-text/docs/libraries Be sure to include permissions for the translation API as well.

Upon completion you will have downloaded a JSON file with your google key.

Save this file to in the backend directory as google-key.json

Create Environment file

Create a file .env with the following contents

SIGNALWIRE_PROJECT_KEY=
SIGNALWIRE_TOKEN=
VERIFIED_NUMBER=<Your signalwire phone number including the region code>
GOOGLE_APPLICATION_CREDENTIALS=google-key.json

Running the backend locally

Ensure your google-key.json and .env file are in this directory and correctly configured with your credentials and SignalWire Phone number.

  1. Navigate to the backend directory in a terminal. cd /backend
  2. Run NPM install. npm i
  3. Start the backend server and consumer.
node consumer.js

Running the frontend locally

If you're running your backend remotely, run with the environment variable API_URL set to the remote API address.

  1. Navigate to the frontend directory in a terminal. cd /frontend
  2. Run NPM install. npm i
  3. Start the frontend
npm start

signalwire-react-relay-translate-transcribe's People

Contributors

virgilvox avatar

Watchers

Sergio Tulentsev avatar Ryan Williams avatar Anthony Minessale avatar Evan McGee avatar James Cloos avatar  avatar Andrey Volk avatar Chris Clement avatar  avatar

Forkers

jongray00

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.