Add Android demo for spoken language identification using Whisper multilingual models (#783)
This commit is contained in:
@@ -7,6 +7,11 @@
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#if __ANDROID_API__ >= 9
|
||||
#include "android/asset_manager.h"
|
||||
#include "android/asset_manager_jni.h"
|
||||
#endif
|
||||
|
||||
#include "sherpa-onnx/csrc/spoken-language-identification.h"
|
||||
|
||||
namespace sherpa_onnx {
|
||||
@@ -18,6 +23,11 @@ class SpokenLanguageIdentificationImpl {
|
||||
static std::unique_ptr<SpokenLanguageIdentificationImpl> Create(
|
||||
const SpokenLanguageIdentificationConfig &config);
|
||||
|
||||
#if __ANDROID_API__ >= 9
|
||||
static std::unique_ptr<SpokenLanguageIdentificationImpl> Create(
|
||||
AAssetManager *mgr, const SpokenLanguageIdentificationConfig &config);
|
||||
#endif
|
||||
|
||||
virtual std::unique_ptr<OfflineStream> CreateStream() const = 0;
|
||||
|
||||
virtual std::string Compute(OfflineStream *s) const = 0;
|
||||
|
||||
Reference in New Issue
Block a user