Pages: [1] 2   Go Down
Author Topic: uSpeech library  (Read 3859 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Jr. Member
**
Karma: 0
Posts: 82
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

yesterday I was searching for some speech recognition stuff & i found out a so called nice speech recognition library for arduino named uSpeech.
here is the link:
http://arjo129.github.com/uSpeech/
I followed the installation & training & calibration guide as in here:
http://arjo129.github.com/uSpeech/.
 I'm having ArduinoIDE version 1.0.0
& when I wanted to run the training sketch I got an error msg saying : 'signal' type not found .
Need help with it.
Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 201
Posts: 8661
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

yesterday I was searching for some speech recognition stuff & i found out a so called nice speech recognition library for arduino named uSpeech.
here is the link:
http://arjo129.github.com/uSpeech/
I followed the installation & training & calibration guide as in here:
http://arjo129.github.com/uSpeech/.
 I'm having ArduinoIDE version 1.0.0
& when I wanted to run the training sketch I got an error msg saying : 'signal' type not found .
Need help with it.

When you say "the training sketch" do you mean "_SpeechAdvancedTraining.ino"?

Did you put the uSpeech folder in the libraries folder?

Did you move the "_SpeechAdvancedTraining" folder from uSpeech/installation/examples to uSpeech/examples?

Did you shut down an re-start the Arduino IDE?

Did you select _SpeechAdvancedTraining from File->Examples->uSpeech->_SpeechAdvancedTraining?

I did all those and it compiled without error.
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Offline Offline
Jr. Member
**
Karma: 0
Posts: 82
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yeah I mean speech training.INO
I did put it in the "library" folder.
No, I did not move it from "_SpeechAdvancedTraining" folder from uSpeech/installation/examples to uSpeech/examples
i did not shut down the computer but re-started the Arduino IDE.
Yes, I did selected "SpeechAdvancedTraining" from File->Examples->uSpeech->_SpeechAdvancedTraining.



Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 201
Posts: 8661
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

It compiles for me under Arduino 1.0.1. 

Do you have Arduino UNO selected under Tools->Board?

What file and line does it point to when you get the " 'signal' type not found ." error?
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Offline Offline
Jr. Member
**
Karma: 0
Posts: 82
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm having Arduino 1.0
& I guess boards doesn't matter for compilation.
In the topmost line- signal voice(A0);

Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 82
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

this is the screen shot


* Untitled.png (30.25 KB, 495x599 - viewed 114 times.)

* Untitled.png (30.25 KB, 495x599 - viewed 79 times.)
Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 201
Posts: 8661
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
_SpeechAdvancedTraining:2: error: 'signal' does not name a type

That is the error I get if I comment out the "#include <uspeech.h>" line.  Looks like your uspeech.h file is not being found.  Mine is in Arduino/libraries/uSpeech/uspeech.h
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 201
Posts: 8661
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Your screenshot only shows the last few error messages.  Generally it's the first error message that is of interest.  You can copy and paste error messages from the Arduino IDE window.
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Offline Offline
Jr. Member
**
Karma: 0
Posts: 82
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


_SpeechAdvancedTraining.cpp:1:21: error: uspeech.h: No such file or directory
_SpeechAdvancedTraining:2: error: 'signal' does not name a type
_SpeechAdvancedTraining.cpp: In function 'void setup()':
_SpeechAdvancedTraining:6: error: 'voice' was not declared in this scope
_SpeechAdvancedTraining.cpp: In function 'void loop()':
_SpeechAdvancedTraining:10: error: 'voice' was not declared in this scope

It says so that the uspeech.h file's absent, but it's there in the folder:

C:\Users\dexter\Documents\Arduino\libraries\uSpeech\uSpeech
Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 82
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

this is the header file

/*
 uspeech v.1.9.3 (2.0betaRC2)
 2012 Arjo Chakravarty

 uspeech is a library that allows sounds to be classified into certain phonemes
 on the Arduino. This creates a simple beginning for a full scale voice recognition
 program.
 */
#ifndef uspeech_h
#define uspeech_h

#include "Arduino.h"
#include <math.h>
#define SILENCE 92
#define F_DETECTION 3
class signal{
public:
   int arr[32];
   int calib;
   signal(int port);
    int micPower;
   void sample();
    unsigned int maxPower();
   unsigned int power();
   unsigned int complexity(int power);
   unsigned long fpowerex(int sum, int xtra); //Todo: Remove
   int snr(int power);
   void calibrate();
   unsigned long filters[18], formants[3], intoned; //Todo: Remove
   unsigned int overview[7];
   char getPhoneme();
   void debugPrintFilter(); //Todo: Remove
   void voiceFormants(); //Todo: Remove
   //void lowPass(int freq); Todo: Implement moving average low pass filter.
    int goertzel(int freq);

private:
   int pin;
   int mil;
   bool silence;
   void formantAnal(); //Todo: Remove
};


#endif
Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 82
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

this is what's in the folder (after I rename it as "uSpeech"- as Arduino was not taking the file name as it was downloaded).


* Untitled-2.png (44.75 KB, 786x370 - viewed 54 times.)
Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 201
Posts: 8661
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

_SpeechAdvancedTraining.cpp:1:21: error: uspeech.h: No such file or directory

It says that the uspeech.h file's absent, but it's there in the folder:
C:\Users\dexter\Documents\Arduino\libraries\uSpeech\uSpeech

Did you mean the file is:
C:\Users\dexter\Documents\Arduino\libraries\uSpeech\uSpeech\uspeech.h
or
C:\Users\dexter\Documents\Arduino\libraries\uSpeech\uspeech.h

The second one is correct.  The first one has an extra level of folder.
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Offline Offline
Jr. Member
**
Karma: 0
Posts: 82
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Woohoo!!! It compiled. After I deleted the extra folder, it worked.
Thanks
Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 82
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

After I downloaded the _SpeechAdvancedTraining, I got a value of silent of 300 something, f1 as 32 & f2 as 115. So eventually selected 70 (in between f1 & f2 values). Even edited the uspeech.h with these values.

Now the LED test's not working! smiley-confuse
My LED PIN always remains high.
Tried calibration.pde & it gives a Phenome value as "f' always, & voice strength value keeps on increasing automatically.
I tried to experiment with different valuse of f, u etc in the phenome.cpp also. eventually got confused.
help required
Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 201
Posts: 8661
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Did the LED Test work before you did the training?
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Pages: [1] 2   Go Up
Jump to: