Lines Matching refs:event
178 struct sound_trigger_phrase_recognition_event *event; in sound_trigger_event_alloc() local
185 event = (struct sound_trigger_phrase_recognition_event *)data; in sound_trigger_event_alloc()
186 event->common.status = RECOGNITION_STATUS_SUCCESS; in sound_trigger_event_alloc()
187 event->common.type = SOUND_MODEL_TYPE_KEYPHRASE; in sound_trigger_event_alloc()
188 event->common.model = stdev->model_handle; in sound_trigger_event_alloc()
193 event->num_phrases = stdev->config->num_phrases; in sound_trigger_event_alloc()
194 if (event->num_phrases > SOUND_TRIGGER_MAX_PHRASES) in sound_trigger_event_alloc()
195 event->num_phrases = SOUND_TRIGGER_MAX_PHRASES; in sound_trigger_event_alloc()
196 for (i=0; i < event->num_phrases; i++) in sound_trigger_event_alloc()
197 memcpy(&event->phrase_extras[i], &stdev->config->phrases[i], in sound_trigger_event_alloc()
201 event->num_phrases = 1; in sound_trigger_event_alloc()
202 event->phrase_extras[0].confidence_level = 100; in sound_trigger_event_alloc()
203 event->phrase_extras[0].num_levels = 1; in sound_trigger_event_alloc()
204 event->phrase_extras[0].levels[0].level = 100; in sound_trigger_event_alloc()
205 event->phrase_extras[0].levels[0].user_id = 0; in sound_trigger_event_alloc()
208 event->common.capture_available = true; in sound_trigger_event_alloc()
210 event->common.audio_config = AUDIO_CONFIG_INITIALIZER; in sound_trigger_event_alloc()
211 event->common.audio_config.sample_rate = 16000; in sound_trigger_event_alloc()
212 event->common.audio_config.channel_mask = AUDIO_CHANNEL_IN_MONO; in sound_trigger_event_alloc()
213 event->common.audio_config.format = AUDIO_FORMAT_PCM_16_BIT; in sound_trigger_event_alloc()
303 struct sound_trigger_phrase_recognition_event *event; in callback_thread_loop() local
305 event = (struct sound_trigger_phrase_recognition_event *) in callback_thread_loop()
307 if (event) { in callback_thread_loop()
311 stdev->recognition_callback(&event->common, in callback_thread_loop()
313 free(event); in callback_thread_loop()