POTS Processing


In [ ]:
from IPython.display import Audio
import scipy.io.wavfile as sciwav

In [ ]:
rate, raw = sciwav.read('mary.wav')
Audio(raw, rate=44100)

Local (Python)

Requires Python 2.7-3.x, NumPy, and SciPy

as a Package


In [ ]:
import filters

In [ ]:
pots1 = filters.pots(raw)
Audio(pots1, rate=44100)

as a Script


In [ ]:
import glob
list(glob.glob('*.wav'))

In [ ]:
!python dopots.py mary.wav

In [ ]:
list(glob.glob('*.wav'))

Web

Runs via Heroku. Don't hammer it, or it might magically stop working. For everybody.

JSON

POST a 1-D array to https://alpine-cupcake-2461.herokuapp.com/pots/json. Reply is an object with a "data" field that contains the processed 1-D array.


In [ ]:
import requests
APP_URL = 'https://alpine-cupcake-2461.herokuapp.com/pots/json'

In [ ]:
pots2 = requests.post(APP_URL, json=raw.tolist()).json()
#Audio(pots2['data'], rate=44100)

File Upload

Manually upload a .wav or .txt at https://alpine-cupcake-2461.herokuapp.com/pots Could also POST to there.


In [ ]: