µSpeech
4.1.2
Speech recognition library
Main Page
Related Pages
Classes
Files
File List
All
Classes
Functions
Variables
Pages
Arduino
libraries
uSpeech
uSpeech
uspeech.h
1
/*
2
uspeech v.4.x.x
3
2012 Arjo Chakravarty
4
5
uspeech is a library that allows sounds to be classified into certain phonemes
6
on the Arduino. This creates a simple beginning for a full scale voice recognition
7
program.
8
*/
9
#ifndef uspeech_h
10
#define uspeech_h
11
12
#define ARDUINO_ENVIRONMENT 1
13
#if ARDUINO_ENVIRONMENT > 0
14
#include "Arduino.h"
15
#endif
16
17
#include <math.h>
18
#include <stdlib.h>
19
#define SILENCE 2000
20
#define F_DETECTION 3
21
#define F_CONSTANT 350
22
26
class
signal
{
27
public
:
28
int
arr
[32];
29
int
avgPower;
30
int
testCoeff;
31
int
minVolume
;
32
int
fconstant
;
33
int
econstant
;
34
int
aconstant
;
35
int
vconstant
;
36
int
shconstant
;
37
bool
f_enabled
;
38
int
amplificationFactor
;
39
int
micPowerThreshold
;
40
int
scale;
41
char
phoneme
;
42
signal
(
int
port);
43
int
micPower;
44
void
sample
();
45
unsigned
int
maxPower
();
46
unsigned
int
power
();
47
int
snr(
int
power
);
48
void
calibrate
();
49
char
getPhoneme
();
50
int
calib;
51
private
:
52
int
pin;
53
int
mil;
54
int
maxPos;
55
bool
silence;
56
unsigned
int
overview[7];
57
unsigned
int
complexity(
int
power
);
58
};
59
63
class
syllable
{
64
public
:
65
int
f,e,o,s,h,
v
;
66
syllable
();
67
void
classify
(
char
c);
68
int
*
tointptr
();
69
#if ARDUINO_ENVIRONMENT > 0
70
void
debugPrint
();
71
#endif
72
};
73
74
#endif
syllable::debugPrint
void debugPrint()
Definition:
vocab.cpp:37
signal::vconstant
int vconstant
Definition:
uspeech.h:35
syllable::tointptr
int * tointptr()
Definition:
vocab.cpp:55
syllable::classify
void classify(char c)
Definition:
vocab.cpp:10
signal::getPhoneme
char getPhoneme()
Definition:
phoneme.cpp:5
signal::power
unsigned int power()
Definition:
signal.cpp:48
syllable
Definition:
uspeech.h:63
signal::arr
int arr[32]
Definition:
uspeech.h:28
signal::f_enabled
bool f_enabled
Definition:
uspeech.h:37
signal::maxPower
unsigned int maxPower()
Definition:
signal.cpp:75
signal::minVolume
int minVolume
Definition:
uspeech.h:31
syllable::syllable
syllable()
Definition:
vocab.cpp:3
signal
Definition:
uspeech.h:26
signal::econstant
int econstant
Definition:
uspeech.h:33
signal::calibrate
void calibrate()
Definition:
signal.cpp:21
signal::amplificationFactor
int amplificationFactor
Definition:
uspeech.h:38
signal::phoneme
char phoneme
Definition:
uspeech.h:41
signal::aconstant
int aconstant
Definition:
uspeech.h:34
syllable::v
int v
Definition:
uspeech.h:65
signal::micPowerThreshold
int micPowerThreshold
Definition:
uspeech.h:39
signal::shconstant
int shconstant
Definition:
uspeech.h:36
signal::signal
signal(int port)
Definition:
signal.cpp:7
signal::fconstant
int fconstant
Definition:
uspeech.h:32
signal::sample
void sample()
Definition:
signal.cpp:35
Generated on Sat Jan 25 2014 10:03:42 for µSpeech by
1.8.5