Giter Site home page Giter Site logo

transcript-demo's Introduction

Asterisk Live transcript demo

This repo contains two simple demos showing how to use the Asterisk ARI externalMedia resource and another one using res_ari_stream to get a live transcription of a call.

The ARI demo creates an application that starts a bridge, the voice in that bridge will be translated.

The res_ari_stream demo can listen to an arbitrary channel

Installing

  1. clone this repository
  2. python setup.py install
  3. configure Asterisk such that calls enter the stt stasis application same = n,Stasis(stt)
  4. create credentials for the Google Speech to Text API
  5. create a ARI user with username/password demo/2b34c141-0ca9-44a7-95ca-570302f069c0

res_ari_stream

See the git repo README for installation instructions https://github.com/sboily/wazo-hackathon-asterisk-stream-module

Usage ARI demo

This demo is made of 3 processes

  1. The stasis application which receives the incoming call and puts everyone in a bridge.
  2. The server which create the external media channel, receives the RTP from Asterisk sends it to Google Speech API and write the result to an html file.
  3. An HTTP server to serve the generated transcript

Starting the stasis application

call-transcript-ari-stasis

Starting the server

call-transcript-ari-server

Displaying the result

cd /tmp/translation && python -m SimpleHTTPServer

Then visit the dispayed address in your browser

How it works

  1. When a call enters the stasis application it will be added to the bridge
  2. When the server starts listening on the configured port and create the external media channel
  3. When RTP is received the payload is sent to Google Speech to text API and an HTML file is generated

Usage Wazo module demo

  1. exucute call-transcript-wazo <channel uniqueid>
  2. An HTTP server to serve the generated transcript

Start the script with an active call

replace PJSIP/twilio with the peer you wish to listen to

call-transcript-wazo $(asterisk -rx 'core show channels concise' | grep 'PJSIP/twilio' | awk -F'!' '{ print $NF}')

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.