Coder Social home page Coder Social logo

dkulyk / answeringmachinedetection Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nexmo-community/answeringmachinedetection

0.0 0.0 0.0 2.2 MB

Machine Learning model to detect answering machines in a voice call

Python 1.45% Jupyter Notebook 98.55%

answeringmachinedetection's Introduction

AnsweringMachineDetection

Deploy

For this solution, we built a machine learning algorithm that is able to detect when a call goes to voicemail by listening to the beep sound with 96% accuracy. When the call is picked up by the answering machine, we perform a text-to-speech action(TTS) which is then recorded by the answering machine.

Local Install

To run this on your machine you'll need an up-to-date version of Python 3.

Clone the github repo and run:

pip install -r requirements.txt

Create a .env file with the following

MY_LVN={YOUR_NEXMO_NUMBER}
APP_ID={YOUR_NEXMO_APPLICATION_ID}
PRIVATE_KEY={PATH_TO_APPLICATION_PRIVATE_KEY}

By default the server runs on port 8000.

Tools like ngrok are great for exposing ports on your local machine to the internet. If you haven't done this before, check out this guide.

Running the example

If you are working with a local install you can run the server using this command:

python app.py

Linking the app to Nexmo

You will need to create a new Nexmo application in order to work with this app:

Create a Nexmo Application Using the Command Line Interface

Install the CLI by following these instructions. Then create a new Nexmo application that also sets up your answer_url and event_url for the app running locally on your machine.

nexmo app:create answering-machine-detection http://<your_hostname>/ncco http://<your_hostname>/event

This will return an application ID. Make a note of it.

Rent a New Virtual Number

If you don't have a number already in place, you will need to rent one. This can also be achieved using the CLI by running this command:

nexmo number:buy

Link the Virtual Number to the Application

Finally, link your new number to the application you created by running:

nexmo link:app YOUR_NUMBER YOUR_APPLICATION_ID

Try it out

With your application running, make a call to the purchased number.

The application will ask to you to enter a phone number. Enter any phone number you like, as long as it is picked up by voicemail. The call will go to voicemail and the answering machine model will start listenting on the call.

When a beep is detected, the application performs a Text-To-Speech, with the phrase, Answering Machine Detected, and the call will hangup.

answeringmachinedetection's People

Contributors

tbass134 avatar kellyjandrews avatar

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.