dsPIC30F6014A Speech Recognition

Status
Not open for further replies.

digiad

Newbie level 5
Joined
Apr 6, 2014
Messages
9
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Visit site
Activity points
117
Hi everbody,
We are using Microchip's dsPIC30F6014A for speech recognition. I am trying to implement speech recognition without using dsPICDEM evaluation board but making use of microchips' speech recognition library.

Our purpose is to make one of the output pin high whenever we recognized the some certain words that we set before like "yes" or "no". We make use of the example code given in dsPIC30F Speech Recognition Library user manual. We build our own word library which includes words such as "yes", "no". Then we tried to compile the code again in MPLAB IDE.

We get the following error which is related to making one of the output pins high.

As we mention earlier our main goal is to make one of the output pin of the dspic high, we the desired word is recognized by the processor using speech recognition library.

Could you please help us on that regard? It is very important for us to implement this code.
P.S. We do not have dsPICDEM evaluation board. We have only dsPIC30F6014 processor (with 10MHz Crystal) and si3000 audio codec.

We attached some photos showing our hardware parts and example code.
https://obrazki.elektroda.pl/7780611400_1398380127.jpg
https://obrazki.elektroda.pl/2144382900_1398380128.jpg
https://obrazki.elektroda.pl/2670449100_1398380130.jpg

************** Here are our code:

Code C - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
//-------------------------------------------------------------
// dsPIC30F Speech Recognition Example Program
//-------------------------------------------------------------
 
//#include <p30f6014A.h>
#include "SR_Lib.h"
#include "robot.h"
//-------------------------------------------------------------
// Initialization Settings
//-------------------------------------------------------------
#define fclock 6144L // clock oscillator frequency
#define pll_setting 8 // PLL multiplier mode
#define timeout 10 // timeout period in seconds
#define mic_gain 30 // microphone gain in dB
#define SR_mode 1 // no self-test, use keyword activation
 
// -------------------------------------------------------------
int main(void)
{
 LATD = 0; 
 TRISD = 0b1111111111110000;
int word;
// Initialize speech recognizr
SR_Initialization(fclock, pll_setting, timeout, mic_gain, SR_mode);
 
// -------------------------------------------------------------
// SR Main Working Cycle
// -------------------------------------------------------------
while (1)
{ 
// recognize words spoken by the user
word = SR_Recognizer();
switch (word) {
case SRL_NONE:
// recognition in process - doesn't require action
break;
case SRL_GO ... SRL_YES:
 _LATD3 = 1;  // whenever recognized the desired word led will light up
 __delay32(15000000);
 _LATD3 = 0;
__delay32(15000000);
// valid word recognized - process it
break;
case SRL_UNKNOWN:
_LATD0 = 1;
 __delay32(1500000);
 _LATD0 = 0;
__delay32(1500000);
default :
// unknown response - doesn't require action
break;
} /* end switch(word) */
} /* end while(1) */
} /* end main() */

 
Last edited by a moderator:

You commented the first line, which probably contains declaration for missed variables:


Code C - [expand]
1
//#include <p30f6014A.h>



+++
 

We know if we open that command we will get rid of above error.However, this time we are getting following error.

SR_Lib.h:81: error: conflicting types for 'WREG0'
c:/program files/microchip/mplab c30/bin/bin/../../support/dsPIC30F/h/p30f6014.h:65: error: previous declaration of 'WREG0' was here
same error is valid also for WREG1 and WREG2

Does any one there who have knowledge on speech recognition library of microchip company? Or already implemented speech recognition library using microchips speech recognition library?
Please help us.
 

i did using DsPIC30F6014A and used crystal 6.144Mhz and used dsPICDEM circuit for the codec part ( connections for Si3000) and worked fine using my own word library

your problem shows that you are using DSPic30F6014A and in code it is Shown as DSPic30F6014
DSPic30F6014 is used in demo code and if you are using DSPic30F6014A you need to change all lines pointing to DSPIC30F6014

and i don't think it will work with 10Mhz crystal since DSPIC30F6014 cannot give required clock to Si3000 with that frequency
 

this is the compiler output

 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…