diff --git a/demo/c/falcon_demo.c b/demo/c/falcon_demo.c index 197c998..316af91 100644 --- a/demo/c/falcon_demo.c +++ b/demo/c/falcon_demo.c @@ -154,7 +154,7 @@ int picovoice_main(int argc, char **argv) { // exit(1); // } - pv_status_t (*pv_falcon_segments_delete_func)(pv_word_t *) = + pv_status_t (*pv_falcon_segments_delete_func)(pv_segment_t *) = load_symbol(dl_handle, "pv_falcon_segments_delete"); if (!pv_falcon_segments_delete_func) { print_dl_error("failed to load `pv_falcon_segments_delete`"); @@ -187,7 +187,7 @@ int picovoice_main(int argc, char **argv) { for (int32_t i = optind; i < argc; i++) { gettimeofday(&before, NULL); - int32_t num_words = 0; + int32_t num_segments = 0; pv_segment_t *segments = NULL; // status = pv_falcon_process_file_func(falcon, argv[i], &num_words, &segments); // if (status != PV_STATUS_SUCCESS) { @@ -201,12 +201,12 @@ int picovoice_main(int argc, char **argv) { proc_sec += ((double)(after.tv_sec - before.tv_sec) + ((double)(after.tv_usec - before.tv_usec)) * 1e-6); - for (int32_t j = 0; j < num_words; j++) { + for (int32_t j = 0; j < num_segments; j++) { fprintf(stdout, "Speaker: %d -> Start: %5.2f, End: %5.2f\n", - segment->speaker_tag, - segment->start_sec, - segment->end_sec); + segments[j]->speaker_tag, + segments[j]->start_sec, + segments[j]->end_sec); } } pv_falcon_segments_delete_func(segments);