Go to the documentation of this file.
16 #include "cy_rgb_led.h"
19 #include "pv_audio_rec.h"
21 #include "pv_porcupine.h"
24 #define MEMORY_BUFFER_SIZE (70 * 1024)
30 #ifdef __PV_LANGUAGE_ENGLISH__
34 sizeof(DEFAULT_KEYWORD_ARRAY),
35 sizeof(PICOVOICE_KEYWORD_ARRAY),
36 sizeof(BUMBLEBEE_KEYWORD_ARRAY),
37 sizeof(ALEXA_KEYWORD_ARRAY)
40 DEFAULT_KEYWORD_ARRAY,
41 PICOVOICE_KEYWORD_ARRAY,
42 BUMBLEBEE_KEYWORD_ARRAY,
70 cy_rgb_led_on(CY_RGB_LED_COLOR_RED, CY_RGB_LED_MAX_BRIGHTNESS);
89 printf(
" %.2x", board_uuid[i]);
125 int32_t keyword_index = -1;
131 if (keyword_index >= 0) {
134 switch (keyword_index) {
136 cy_rgb_led_on(CY_RGB_LED_COLOR_GREEN, CY_RGB_LED_MAX_BRIGHTNESS);
139 cy_rgb_led_on(CY_RGB_LED_COLOR_CYAN, CY_RGB_LED_MAX_BRIGHTNESS);
142 cy_rgb_led_on(CY_RGB_LED_COLOR_RED, CY_RGB_LED_MAX_BRIGHTNESS);
145 cy_rgb_led_on(CY_RGB_LED_COLOR_BLUE, CY_RGB_LED_MAX_BRIGHTNESS);
150 Cy_SysLib_Delay(500);
pv_status_t pv_audio_rec_start(void)
PV_API pv_status_t pv_porcupine_init(const char *access_key, const char *model_path, int32_t num_keywords, const char *const *keyword_paths, const float *sensitivities, pv_porcupine_t **object)
static const void * KEYWORD_MODELS[]
void pv_board_deinit(void)
const uint8_t * pv_get_uuid(void)
PV_API pv_status_t pv_porcupine_process(pv_porcupine_t *object, const int16_t *pcm, int32_t *keyword_index)
static const int32_t NUM_KEYWORDS
const int16_t * pv_audio_rec_get_new_buffer(void)
static const float SENSITIVITIES[]
pv_status_t pv_board_init(void)
PV_API void pv_porcupine_delete(pv_porcupine_t *object)
static void error_handler(void)
const uint32_t pv_get_uuid_size(void)
static const char * KEYWORDS_NAME[]
static const char * ACCESS_KEY
#define MEMORY_BUFFER_SIZE
struct pv_porcupine pv_porcupine_t
pv_status_t pv_message_init(void)
__attribute__((section(".rev16_text"))) __STATIC_INLINE __ASM uint32_t __REV16(uint32_t value)
Reverse byte order (16 bit)
void pv_audio_rec_deinit(void)
static const int32_t KEYWORD_MODEL_SIZES[]
const PV_API char * pv_status_to_string(pv_status_t status)
pv_status_t pv_audio_rec_init(void)