API reference

Arjo Chakravarty edited this page Dec 27, 2013 · 10 revisions

This page outlines the core functions of the µSpeech library. At its heart the µSpeech library is made of a single signal object. The signal object contains both speech recognition APIs and some basic DSP APIs. The Signal API provides a raw interface to the microphone signal using nicely wrapped C++ objects. Methods not listed here are deprecated and will be removed.

The Signal API

signal::signal(int inPort);

Is the constructor for the signal object.

void signal::calibrate();

This line calibrates the voice object so as to remove noise and interference from the system.

char signal::getPhoneme();

This returns the closest phoneme guess to the real phoneme, if it is too quiet the system will return ' ' and 'm' if there was an error. Read more...

General Utility methods

int signal::snr(int power);

Returns the signal to noise ratio of a filter.

int signal::power();

Returns total power, average power can be derived by simply dividing the result by 32.

int signal::maxPower();

The maximum power detected by the microphone.


int signal.arr[];

Contains the raw microphone output.

unsigned int signal.maxPower;

For debugging purposes.