Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
Pouya Rostam committed Sep 12, 2023
1 parent 46cecff commit ad754fb
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions demo/c/falcon_demo.c
Original file line number Diff line number Diff line change
Expand Up @@ -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`");
Expand Down Expand Up @@ -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) {
Expand All @@ -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);
Expand Down

0 comments on commit ad754fb

Please sign in to comment.