infobip / infobip-media-stream-showcase

Simple application that showcases how to parse incoming media streamed from Infobip.
0 stars 0 forks source link

Infobip media stream showcase

This simple application is an example of a websocket server that parses incoming media streamed from Infobip. Received media is filtered using a bandpass Butterworth filter from 300 to 3400Hz.

Setup

  1. Have an Infobip account with access to Infobip API.
  2. Have an established call using Infobip calls API (example guide).
  3. Start the Python or Java application from this repository.
  4. Expose the application's websocket port to public internet. Easiest way to do so is via ngrok. After installing ngrok, just run: ngrok tcp [portNumber].
  5. Have media streaming enabled and an appropriate media-stream configuration created. The configuration should point to the address exposed by ngrok.
  6. Start streaming media

Some notes

Effect

This application implements a bandpass filter from 300-3400Hz. Specifically, the Butterworth filter is implemented, as it is one of the simplest filters that can achieve good results in the bandpass. The filter will significantly attenuate frequencies outside the bandpass. The 300-3400Hz range was very commonly used in old telephony systems and is referred to as the voice frequency, so you can expect to hear lower quality audio than what you normally get from Infobip and a nostalgic reminder of old telephony calls.

If you want to use a different filter or algorithm for modifying the media, all you have to do is change the filtering method from this application. The rest of the code can remain as is.