Manual

Table Of Contents
Arduino Kit Demo Description 6 SeedVoiceLED Demo
Issue V2.1 (2019-12-05) Demo Description Copyright © Yuejiang Technology Co., Ltd
16
Serial.begin(115200);
SmartKit_Init();
SmartKit_VoiceENGStart();
Serial.println("Start...");
}
Control the LED indicator by voice commands.
Program 6.3 Control the LED indicator by voice commands
void loop()
{
if(SmartKit_VoiceENGVoiceCheck(1) == TRUE)
{
SmartKit_LedTurn(RED,ON);
SmartKit_LedTurn(BLUE,ON);
SmartKit_LedTurn(GREEN,ON);
Serial.println(voiceBuffer[0]);
}
else if(SmartKit_VoiceENGVoiceCheck(2) == TRUE)
{
SmartKit_LedTurn(RED,OFF);
SmartKit_LedTurn(BLUE,OFF);
SmartKit_LedTurn(GREEN,OFF);
Serial.println(voiceBuffer[1]);
}
}
NOTICE
Grove speech recognizer only supports 22 voice commands without user-defined. The
commands with values are as shown in Program 6.4.
Program 6.4 Command description
const char *voiceBuffer[] =
{
"Turn on the light", //return 1
"Turn off the light", //return 2
"Play music", //return 3
"Pause", //return 4