• Home
  • Raw
  • Download

Lines Matching refs:event

164     struct sound_trigger_phrase_recognition_event *event;  in sound_trigger_event_alloc()  local
171 event = (struct sound_trigger_phrase_recognition_event *)data; in sound_trigger_event_alloc()
172 event->common.status = RECOGNITION_STATUS_SUCCESS; in sound_trigger_event_alloc()
173 event->common.type = SOUND_MODEL_TYPE_KEYPHRASE; in sound_trigger_event_alloc()
174 event->common.model = stdev->model_handle; in sound_trigger_event_alloc()
179 event->num_phrases = stdev->config->num_phrases; in sound_trigger_event_alloc()
180 if (event->num_phrases > SOUND_TRIGGER_MAX_PHRASES) in sound_trigger_event_alloc()
181 event->num_phrases = SOUND_TRIGGER_MAX_PHRASES; in sound_trigger_event_alloc()
182 for (i=0; i < event->num_phrases; i++) in sound_trigger_event_alloc()
183 memcpy(&event->phrase_extras[i], &stdev->config->phrases[i], in sound_trigger_event_alloc()
187 event->num_phrases = 1; in sound_trigger_event_alloc()
188 event->phrase_extras[0].confidence_level = 100; in sound_trigger_event_alloc()
189 event->phrase_extras[0].num_levels = 1; in sound_trigger_event_alloc()
190 event->phrase_extras[0].levels[0].level = 100; in sound_trigger_event_alloc()
191 event->phrase_extras[0].levels[0].user_id = 0; in sound_trigger_event_alloc()
194 event->common.capture_available = true; in sound_trigger_event_alloc()
196 event->common.audio_config = AUDIO_CONFIG_INITIALIZER; in sound_trigger_event_alloc()
197 event->common.audio_config.sample_rate = 16000; in sound_trigger_event_alloc()
198 event->common.audio_config.channel_mask = AUDIO_CHANNEL_IN_MONO; in sound_trigger_event_alloc()
199 event->common.audio_config.format = AUDIO_FORMAT_PCM_16_BIT; in sound_trigger_event_alloc()
273 struct sound_trigger_phrase_recognition_event *event; in callback_thread_loop() local
277 event = (struct sound_trigger_phrase_recognition_event *) in callback_thread_loop()
279 if (!event) { in callback_thread_loop()
289 callback(&event->common, cookie); in callback_thread_loop()
292 free(event); in callback_thread_loop()