µSpeech  4.1.2
Speech recognition library
 All Classes Functions Variables Pages
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;
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
void debugPrint()
Definition: vocab.cpp:37
int vconstant
Definition: uspeech.h:35
int * tointptr()
Definition: vocab.cpp:55
void classify(char c)
Definition: vocab.cpp:10
char getPhoneme()
Definition: phoneme.cpp:5
unsigned int power()
Definition: signal.cpp:48
int arr[32]
Definition: uspeech.h:28
bool f_enabled
Definition: uspeech.h:37
unsigned int maxPower()
Definition: signal.cpp:75
int minVolume
Definition: uspeech.h:31
syllable()
Definition: vocab.cpp:3
Definition: uspeech.h:26
int econstant
Definition: uspeech.h:33
void calibrate()
Definition: signal.cpp:21
int amplificationFactor
Definition: uspeech.h:38
char phoneme
Definition: uspeech.h:41
int aconstant
Definition: uspeech.h:34
int v
Definition: uspeech.h:65
int micPowerThreshold
Definition: uspeech.h:39
int shconstant
Definition: uspeech.h:36
signal(int port)
Definition: signal.cpp:7
int fconstant
Definition: uspeech.h:32
void sample()
Definition: signal.cpp:35