Skip to content
This repository has been archived by the owner on Nov 26, 2024. It is now read-only.

API reference

arjo129 edited this page Dec 28, 2012 · 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 calibrate();

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

char 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.

General Utility classes

int snr(int power);

Returns the signal to noise ratio of a filter.

int goertzel(int frequency);

Returns power of specified frequency (function likely to be broken).

int power()

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

int maxPower()

The maximum power detected by the microphone.

Clone this wiki locally