Getting started

All users of Cochl.Sense SDK must obtain authorization credentials to start a project.

1. Get a SDK Key

Get API

All users of Cochl.Sense SDK must obtain authorization credentials to start a project.

  • Register or sign in at https://dashboard.cochl.ai.
  • Send an email request for Cochl.Sense SDK to support@cochl.ai
  • After getting approval from support@cochl.ai, create a new project: From https://dashboard.cochl.ai, click “My projects” in the left-hand menu, and click “Add new project”.
  • After the new project is added, select the SDK Type(Android/Python), and click “DOWNLOAD”. (Refresh the page if the download button does not appear.)

2. Prerequisites and Dependencies

Install system packages as required by Cochl.Sense SDK Python. It depends on the target system.

$ sudo apt-get update
$ sudo apt-get install ffmpeg sox portaudio19-dev virtualenv python3-dev libffi-dev libssl-dev 
libcurl4-openssl-dev

Install brew(https://brew.sh/) first.

$ brew update
$ brew install openssl portaudio pyenv python3 wget ffmpeg sox
$ sudo apt-get update
$ sudo apt-get install ffmpeg sox portaudio19-dev virtualenv libssl-base-dev libssl-dev libcurl4-openssl-dev 
python3-pyaudio python3-dev
$ sudo apt-get update
$ sudo apt-get install ffmpeg sox portaudio19-dev virtualenv libssl-dev libcurl4-openssl-dev python3-dev

3. Setting Python Virtual Environment

Create a new virtual environment by choosing a Python interpreter and making a ./venv directory to hold it:

  $ virtualenv -p python3 --no-site-packages ./venv

Activate the virtual environment using a shell-specific command:

  $ source ./venv/bin/activate  # sh, bash, ksh, zsh, ...

When virtualenv is active, your shell prompt is prefixed with (venv). Install packages within a virtual environment without affecting the host system setup. Start by upgrading pip:

  (venv) $ pip install --upgrade pip

4. Installing Cochl.Sense SDK Python

To install Cochl.Sense SDK Python, download the appropriate Python wheel for your system from the dashboard project page, and then install it with the pip install command. For example, if you’re setting up a Jetson Nano (which has Python 3.7), install the Python wheel as follows :

  (venv) $ pip install sense_sdk-0.4.2-cp37-cp37m-linux_aarch64.whl

5. Launch Examples

Please set your SDK key as the environment variable before executing this example.

  $ export SENSE_SDK_KEY=%YOUR SDK KEY%

For testing an audio file prediction, run

  (venv) $ python examples/simple_file.py

For testing an audio stream prediction from your microphone, run

  (venv) $ python examples/simple_stream.py