2024-05-03 14:47:40 +08:00
|
|
|
// scripts/node-addon-api/src/sherpa-onnx-node-addon-api.cc
|
|
|
|
|
//
|
|
|
|
|
// Copyright (c) 2024 Xiaomi Corporation
|
|
|
|
|
#include "napi.h" // NOLINT
|
|
|
|
|
|
2024-05-06 16:21:29 +08:00
|
|
|
void InitStreamingAsr(Napi::Env env, Napi::Object exports);
|
2024-05-13 16:03:34 +08:00
|
|
|
|
|
|
|
|
void InitNonStreamingAsr(Napi::Env env, Napi::Object exports);
|
|
|
|
|
|
2024-05-13 19:24:09 +08:00
|
|
|
void InitNonStreamingTts(Napi::Env env, Napi::Object exports);
|
|
|
|
|
|
2024-05-13 16:03:34 +08:00
|
|
|
void InitVad(Napi::Env env, Napi::Object exports);
|
|
|
|
|
|
2024-05-03 14:47:40 +08:00
|
|
|
void InitWaveReader(Napi::Env env, Napi::Object exports);
|
2024-05-13 16:03:34 +08:00
|
|
|
|
2024-05-11 20:58:23 +08:00
|
|
|
void InitWaveWriter(Napi::Env env, Napi::Object exports);
|
2024-05-03 14:47:40 +08:00
|
|
|
|
2024-05-13 20:26:11 +08:00
|
|
|
void InitSpokenLanguageID(Napi::Env env, Napi::Object exports);
|
|
|
|
|
|
2024-05-14 13:28:50 +08:00
|
|
|
void InitSpeakerID(Napi::Env env, Napi::Object exports);
|
|
|
|
|
|
2024-05-14 17:32:30 +08:00
|
|
|
void InitAudioTagging(Napi::Env env, Napi::Object exports);
|
|
|
|
|
|
2024-05-03 14:47:40 +08:00
|
|
|
Napi::Object Init(Napi::Env env, Napi::Object exports) {
|
|
|
|
|
InitStreamingAsr(env, exports);
|
2024-05-13 16:03:34 +08:00
|
|
|
InitNonStreamingAsr(env, exports);
|
2024-05-13 19:24:09 +08:00
|
|
|
InitNonStreamingTts(env, exports);
|
2024-05-13 16:03:34 +08:00
|
|
|
InitVad(env, exports);
|
2024-05-03 14:47:40 +08:00
|
|
|
InitWaveReader(env, exports);
|
2024-05-11 20:58:23 +08:00
|
|
|
InitWaveWriter(env, exports);
|
2024-05-13 20:26:11 +08:00
|
|
|
InitSpokenLanguageID(env, exports);
|
2024-05-14 13:28:50 +08:00
|
|
|
InitSpeakerID(env, exports);
|
2024-05-14 17:32:30 +08:00
|
|
|
InitAudioTagging(env, exports);
|
2024-05-03 14:47:40 +08:00
|
|
|
|
|
|
|
|
return exports;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
NODE_API_MODULE(addon, Init)
|