Download zipvoice_cpp_server/zipvoice_c_api.h from AXERA-TECH/Voice_Assistant.AXERA: direct link, hf CLI and curl.
- Browser
- Download file 1.21 kB
-
https://huggingface.co/AXERA-TECH/Voice_Assistant.AXERA/resolve/main/zipvoice_cpp_server/zipvoice_c_api.h
- Command line
-
hf download hf://AXERA-TECH/Voice_Assistant.AXERA/zipvoice_cpp_server/zipvoice_c_api.h
-
curl -L -o zipvoice_c_api.h https://huggingface.co/AXERA-TECH/Voice_Assistant.AXERA/resolve/main/zipvoice_cpp_server/zipvoice_c_api.h
1.21 kB
| extern "C" { | |
| typedef struct ZipVoiceHandle ZipVoiceHandle; | |
| typedef struct { | |
| const char *root_dir; | |
| const char *model_dir; | |
| const char *token_file; | |
| const char *vocoder_model; | |
| int max_tokens; | |
| int max_feat_len; | |
| int num_step; | |
| float default_speed; | |
| int seed; | |
| } ZipVoiceConfig; | |
| typedef struct { | |
| const char *text; | |
| const char *prompt; // zh / en / custom | |
| float speed; | |
| const char *output_wav; | |
| } ZipVoiceRequestC; | |
| typedef struct { | |
| int ok; // 1 ok, 0 error | |
| const char *path; // output wav path | |
| const char *error; // error string, owned by library until next call | |
| double wall_sec; | |
| double model_sec; | |
| double rtf; | |
| } ZipVoiceResponseC; | |
| ZipVoiceHandle *zipvoice_create(const ZipVoiceConfig *cfg); | |
| void zipvoice_destroy(ZipVoiceHandle *h); | |
| int zipvoice_cache_prompt(ZipVoiceHandle *h, | |
| const char *key, | |
| const char *wav_path, | |
| const char *prompt_text); | |
| ZipVoiceResponseC zipvoice_infer(ZipVoiceHandle *h, | |
| const ZipVoiceRequestC *req); | |
| } | |