2023-05-12 15:57:44 +08:00
|
|
|
// sherpa-onnx/csrc/session.h
|
|
|
|
|
//
|
|
|
|
|
// Copyright (c) 2023 Xiaomi Corporation
|
|
|
|
|
|
|
|
|
|
#ifndef SHERPA_ONNX_CSRC_SESSION_H_
|
|
|
|
|
#define SHERPA_ONNX_CSRC_SESSION_H_
|
|
|
|
|
|
2024-07-16 15:55:02 +08:00
|
|
|
#include <string>
|
|
|
|
|
|
2023-05-12 15:57:44 +08:00
|
|
|
#include "onnxruntime_cxx_api.h" // NOLINT
|
2024-04-10 14:47:06 +08:00
|
|
|
#include "sherpa-onnx/csrc/audio-tagging-model-config.h"
|
2023-06-12 15:51:27 +08:00
|
|
|
#include "sherpa-onnx/csrc/offline-lm-config.h"
|
2023-05-12 15:57:44 +08:00
|
|
|
#include "sherpa-onnx/csrc/offline-model-config.h"
|
2024-04-13 12:15:57 +08:00
|
|
|
#include "sherpa-onnx/csrc/offline-punctuation-model-config.h"
|
2023-06-12 15:51:27 +08:00
|
|
|
#include "sherpa-onnx/csrc/online-lm-config.h"
|
2023-08-09 20:27:31 +08:00
|
|
|
#include "sherpa-onnx/csrc/online-model-config.h"
|
2024-01-09 22:06:08 +08:00
|
|
|
#include "sherpa-onnx/csrc/speaker-embedding-extractor.h"
|
2024-03-24 22:57:00 +08:00
|
|
|
#include "sherpa-onnx/csrc/spoken-language-identification.h"
|
2023-09-17 14:54:38 +08:00
|
|
|
#include "sherpa-onnx/csrc/vad-model-config.h"
|
2023-05-12 15:57:44 +08:00
|
|
|
|
2024-04-10 14:47:06 +08:00
|
|
|
#if SHERPA_ONNX_ENABLE_TTS
|
|
|
|
|
#include "sherpa-onnx/csrc/offline-tts-model-config.h"
|
|
|
|
|
#endif
|
|
|
|
|
|
2023-05-12 15:57:44 +08:00
|
|
|
namespace sherpa_onnx {
|
|
|
|
|
|
2023-08-09 20:27:31 +08:00
|
|
|
Ort::SessionOptions GetSessionOptions(const OnlineModelConfig &config);
|
2023-05-12 15:57:44 +08:00
|
|
|
|
2024-07-15 12:22:33 +05:30
|
|
|
Ort::SessionOptions GetSessionOptions(const OnlineModelConfig &config,
|
2024-07-16 15:55:02 +08:00
|
|
|
const std::string &model_type);
|
2024-07-15 12:22:33 +05:30
|
|
|
|
2023-05-12 15:57:44 +08:00
|
|
|
Ort::SessionOptions GetSessionOptions(const OfflineModelConfig &config);
|
|
|
|
|
|
2023-06-12 15:51:27 +08:00
|
|
|
Ort::SessionOptions GetSessionOptions(const OfflineLMConfig &config);
|
|
|
|
|
|
|
|
|
|
Ort::SessionOptions GetSessionOptions(const OnlineLMConfig &config);
|
2023-09-17 14:54:38 +08:00
|
|
|
|
|
|
|
|
Ort::SessionOptions GetSessionOptions(const VadModelConfig &config);
|
2023-10-13 19:30:38 +08:00
|
|
|
|
2024-04-10 14:47:06 +08:00
|
|
|
#if SHERPA_ONNX_ENABLE_TTS
|
2023-10-13 19:30:38 +08:00
|
|
|
Ort::SessionOptions GetSessionOptions(const OfflineTtsModelConfig &config);
|
2024-04-10 14:47:06 +08:00
|
|
|
#endif
|
2024-01-09 22:06:08 +08:00
|
|
|
|
|
|
|
|
Ort::SessionOptions GetSessionOptions(
|
|
|
|
|
const SpeakerEmbeddingExtractorConfig &config);
|
2024-03-24 22:57:00 +08:00
|
|
|
|
|
|
|
|
Ort::SessionOptions GetSessionOptions(
|
|
|
|
|
const SpokenLanguageIdentificationConfig &config);
|
|
|
|
|
|
2024-04-10 14:47:06 +08:00
|
|
|
Ort::SessionOptions GetSessionOptions(const AudioTaggingModelConfig &config);
|
|
|
|
|
|
2024-04-13 12:15:57 +08:00
|
|
|
Ort::SessionOptions GetSessionOptions(
|
|
|
|
|
const OfflinePunctuationModelConfig &config);
|
|
|
|
|
|
2023-05-12 15:57:44 +08:00
|
|
|
} // namespace sherpa_onnx
|
|
|
|
|
|
|
|
|
|
#endif // SHERPA_ONNX_CSRC_SESSION_H_
|