Committed by
GitHub
Fix build c api examples with alsa (#691)
正在显示
1 个修改的文件
包含
56 行增加
和
53 行删除
| @@ -19,59 +19,62 @@ | @@ -19,59 +19,62 @@ | ||
| 19 | #include "sherpa-onnx/c-api/c-api.h" | 19 | #include "sherpa-onnx/c-api/c-api.h" |
| 20 | 20 | ||
| 21 | static struct cag_option options[] = { | 21 | static struct cag_option options[] = { |
| 22 | - {.identifier = 'h', | ||
| 23 | - .access_letters = "h", | ||
| 24 | - .access_name = "help", | ||
| 25 | - .description = "Show help"}, | ||
| 26 | - {.identifier = 't', | ||
| 27 | - .access_letters = NULL, | ||
| 28 | - .access_name = "tokens", | ||
| 29 | - .value_name = "tokens", | ||
| 30 | - .description = "Tokens file"}, | ||
| 31 | - {.identifier = 'e', | ||
| 32 | - .access_letters = NULL, | ||
| 33 | - .access_name = "encoder", | ||
| 34 | - .value_name = "encoder", | ||
| 35 | - .description = "Encoder ONNX file"}, | ||
| 36 | - {.identifier = 'd', | ||
| 37 | - .access_letters = NULL, | ||
| 38 | - .access_name = "decoder", | ||
| 39 | - .value_name = "decoder", | ||
| 40 | - .description = "Decoder ONNX file"}, | ||
| 41 | - {.identifier = 'j', | ||
| 42 | - .access_letters = NULL, | ||
| 43 | - .access_name = "joiner", | ||
| 44 | - .value_name = "joiner", | ||
| 45 | - .description = "Joiner ONNX file"}, | ||
| 46 | - {.identifier = 'n', | ||
| 47 | - .access_letters = NULL, | ||
| 48 | - .access_name = "num-threads", | ||
| 49 | - .value_name = "num-threads", | ||
| 50 | - .description = "Number of threads"}, | ||
| 51 | - {.identifier = 'p', | ||
| 52 | - .access_letters = NULL, | ||
| 53 | - .access_name = "provider", | ||
| 54 | - .value_name = "provider", | ||
| 55 | - .description = "Provider: cpu (default), cuda, coreml"}, | ||
| 56 | - {.identifier = 'm', | ||
| 57 | - .access_letters = NULL, | ||
| 58 | - .access_name = "decoding-method", | ||
| 59 | - .value_name = "decoding-method", | ||
| 60 | - .description = | ||
| 61 | - "Decoding method: greedy_search (default), modified_beam_search"}, | ||
| 62 | - {.identifier = 'f', | ||
| 63 | - .access_letters = NULL, | ||
| 64 | - .access_name = "hotwords-file", | ||
| 65 | - .value_name = "hotwords-file", | ||
| 66 | - .description = "The file containing hotwords, one words/phrases per line, " | ||
| 67 | - "and for each phrase the bpe/cjkchar are separated by a " | ||
| 68 | - "space. For example: ▁HE LL O ▁WORLD, 你 好 世 界"}, | ||
| 69 | - {.identifier = 's', | ||
| 70 | - .access_letters = NULL, | ||
| 71 | - .access_name = "hotwords-score", | ||
| 72 | - .value_name = "hotwords-score", | ||
| 73 | - .description = "The bonus score for each token in hotwords. Used only " | ||
| 74 | - "when decoding_method is modified_beam_search"}, | 22 | + {/*.identifier =*/'h', |
| 23 | + /*.access_letters =*/"h", | ||
| 24 | + /*.access_name =*/"help", | ||
| 25 | + /*.value_name =*/"help", | ||
| 26 | + /*.description =*/"Show help"}, | ||
| 27 | + {/*.identifier =*/'t', | ||
| 28 | + /*.access_letters =*/NULL, | ||
| 29 | + /*.access_name =*/"tokens", | ||
| 30 | + /*.value_name =*/"tokens", | ||
| 31 | + /*.description =*/"Tokens file"}, | ||
| 32 | + {/*.identifier =*/'e', | ||
| 33 | + /*.access_letters =*/NULL, | ||
| 34 | + /*.access_name =*/"encoder", | ||
| 35 | + /*.value_name =*/"encoder", | ||
| 36 | + /*.description =*/"Encoder ONNX file"}, | ||
| 37 | + {/*.identifier =*/'d', | ||
| 38 | + /*.access_letters =*/NULL, | ||
| 39 | + /*.access_name =*/"decoder", | ||
| 40 | + /*.value_name =*/"decoder", | ||
| 41 | + /*.description =*/"Decoder ONNX file"}, | ||
| 42 | + {/*.identifier =*/'j', | ||
| 43 | + /*.access_letters =*/NULL, | ||
| 44 | + /*.access_name =*/"joiner", | ||
| 45 | + /*.value_name =*/"joiner", | ||
| 46 | + /*.description =*/"Joiner ONNX file"}, | ||
| 47 | + {/*.identifier =*/'n', | ||
| 48 | + /*.access_letters =*/NULL, | ||
| 49 | + /*.access_name =*/"num-threads", | ||
| 50 | + /*.value_name =*/"num-threads", | ||
| 51 | + /*.description =*/"Number of threads"}, | ||
| 52 | + {/*.identifier =*/'p', | ||
| 53 | + /*.access_letters =*/NULL, | ||
| 54 | + /*.access_name =*/"provider", | ||
| 55 | + /*.value_name =*/"provider", | ||
| 56 | + /*.description =*/"Provider: cpu (default), cuda, coreml"}, | ||
| 57 | + {/*.identifier =*/'m', | ||
| 58 | + /*.access_letters =*/NULL, | ||
| 59 | + /*.access_name =*/"decoding-method", | ||
| 60 | + /*.value_name =*/"decoding-method", | ||
| 61 | + /*.description =*/ | ||
| 62 | + "Decoding method: greedy_search (default), modified_beam_search"}, | ||
| 63 | + {/*.identifier =*/'f', | ||
| 64 | + /*.access_letters =*/NULL, | ||
| 65 | + /*.access_name =*/"hotwords-file", | ||
| 66 | + /*.value_name =*/"hotwords-file", | ||
| 67 | + /*.description =*/ | ||
| 68 | + "The file containing hotwords, one words/phrases per line, and for each " | ||
| 69 | + "phrase the bpe/cjkchar are separated by a space. For example: ▁HE LL O " | ||
| 70 | + "▁WORLD, 你 好 世 界"}, | ||
| 71 | + {/*.identifier =*/'s', | ||
| 72 | + /*.access_letters =*/NULL, | ||
| 73 | + /*.access_name =*/"hotwords-score", | ||
| 74 | + /*.value_name =*/"hotwords-score", | ||
| 75 | + /*.description =*/ | ||
| 76 | + "The bonus score for each token in hotwords. Used only when " | ||
| 77 | + "decoding_method is modified_beam_search"}, | ||
| 75 | }; | 78 | }; |
| 76 | 79 | ||
| 77 | const char *kUsage = | 80 | const char *kUsage = |
-
请 注册 或 登录 后发表评论