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 72f0b3a commit 46cecff
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions demo/c/falcon_demo.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,13 +146,13 @@ int picovoice_main(int argc, char **argv) {
exit(1);
}

pv_status_t (*pv_falcon_process_file_func)(
pv_leopard_t *, const char *, int32_t *, pv_segment_t **) =
load_symbol(dl_handle, "pv_falcon_process_file");
if (!pv_falcon_process_file_func) {
print_dl_error("failed to load `pv_falcon_process_file`");
exit(1);
}
// pv_status_t (*pv_falcon_process_file_func)(
// pv_falcon_t *, const char *, int32_t *, pv_segment_t **) =
// load_symbol(dl_handle, "pv_falcon_process_file");
// if (!pv_falcon_process_file_func) {
// print_dl_error("failed to load `pv_falcon_process_file`");
// exit(1);
// }

pv_status_t (*pv_falcon_segments_delete_func)(pv_word_t *) =
load_symbol(dl_handle, "pv_falcon_segments_delete");
Expand All @@ -166,7 +166,7 @@ int picovoice_main(int argc, char **argv) {
struct timeval before;
gettimeofday(&before, NULL);

pv_leopard_t *falcon = NULL;
pv_falcon_t *falcon = NULL;
pv_status_t status = pv_falcon_init_func(
access_key, model_path, &falcon);
if (status != PV_STATUS_SUCCESS) {
Expand All @@ -189,12 +189,12 @@ int picovoice_main(int argc, char **argv) {

int32_t num_words = 0;
pv_segment_t *segments = NULL;
status = pv_falcon_process_file_func(falcon, argv[i], &num_words, &segments);
if (status != PV_STATUS_SUCCESS) {
fprintf(stderr, "failed to process with `%s`.\n",
pv_status_to_string_func(status));
exit(1);
}
// status = pv_falcon_process_file_func(falcon, argv[i], &num_words, &segments);
// if (status != PV_STATUS_SUCCESS) {
// fprintf(stderr, "failed to process with `%s`.\n",
// pv_status_to_string_func(status));
// exit(1);
// }

gettimeofday(&after, NULL);

Expand Down

0 comments on commit 46cecff

Please sign in to comment.