2023-04-15 12:21:27 +02:00
|
|
|
// Wrapper of the Core ML Whisper Encoder model
|
|
|
|
//
|
|
|
|
// Code is derived from the work of Github user @wangchou
|
|
|
|
// ref: https://github.com/wangchou/callCoreMLFromCpp
|
|
|
|
|
2023-11-08 21:01:41 +01:00
|
|
|
#include <stdint.h>
|
|
|
|
|
2023-04-15 12:21:27 +02:00
|
|
|
#if __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
struct whisper_coreml_context;
|
|
|
|
|
|
|
|
struct whisper_coreml_context * whisper_coreml_init(const char * path_model);
|
|
|
|
void whisper_coreml_free(struct whisper_coreml_context * ctx);
|
|
|
|
|
|
|
|
void whisper_coreml_encode(
|
|
|
|
const whisper_coreml_context * ctx,
|
2023-11-08 21:01:41 +01:00
|
|
|
int64_t n_ctx,
|
|
|
|
int64_t n_mel,
|
2023-04-15 12:21:27 +02:00
|
|
|
float * mel,
|
|
|
|
float * out);
|
|
|
|
|
|
|
|
#if __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|