digiad
Newbie level 5
- Joined
- Apr 6, 2014
- Messages
- 9
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1
- 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:
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.
speechr.c:20: error: 'LATD' undeclared (first use in this function)
speechr.c:20: error: (Each undeclared identifier is reported only once
speechr.c:20: error: for each function it appears in.)
speechr.c:21: error: 'TRISD' undeclared (first use in this function)
speechr.c:38: error: '_LATD3' undeclared (first use in this function)
speechr.c:39: warning: implicit declaration of function '__delay32'
speechr.c:45: error: '_LATD0' undeclared (first use in this function)
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: