This repository has been archived on 2025-08-26. You can view files and clone it, but cannot push or open issues or pull requests.
Files
enginex_bi_series-sherpa-onnx/sherpa-onnx/csrc/offline-punctuation-impl.h
2024-04-26 22:06:48 +08:00

37 lines
949 B
C++

// sherpa-onnx/csrc/offline-punctuation-impl.h
//
// Copyright (c) 2024 Xiaomi Corporation
#ifndef SHERPA_ONNX_CSRC_OFFLINE_PUNCTUATION_IMPL_H_
#define SHERPA_ONNX_CSRC_OFFLINE_PUNCTUATION_IMPL_H_
#include <memory>
#include <string>
#include <vector>
#if __ANDROID_API__ >= 9
#include "android/asset_manager.h"
#include "android/asset_manager_jni.h"
#endif
#include "sherpa-onnx/csrc/offline-punctuation.h"
namespace sherpa_onnx {
class OfflinePunctuationImpl {
public:
virtual ~OfflinePunctuationImpl() = default;
static std::unique_ptr<OfflinePunctuationImpl> Create(
const OfflinePunctuationConfig &config);
#if __ANDROID_API__ >= 9
static std::unique_ptr<OfflinePunctuationImpl> Create(
AAssetManager *mgr, const OfflinePunctuationConfig &config);
#endif
virtual std::string AddPunctuation(const std::string &text) const = 0;
};
} // namespace sherpa_onnx
#endif // SHERPA_ONNX_CSRC_OFFLINE_PUNCTUATION_IMPL_H_