memset(&config, 0, sizeof(config));
config.
whisper.
encoder =
"./sherpa-onnx-whisper-tiny/tiny-encoder.int8.onnx";
config.
whisper.
decoder =
"./sherpa-onnx-whisper-tiny/tiny-decoder.int8.onnx";
wave->samples, wave->num_samples);
printf(
"Detected language: %s\n", result->
lang);
struct SherpaOnnxSpokenLanguageIdentification SherpaOnnxSpokenLanguageIdentification
Opaque spoken-language identification handle.
void SherpaOnnxDestroySpokenLanguageIdentification(const SherpaOnnxSpokenLanguageIdentification *slid)
Destroy a spoken-language identifier.
void SherpaOnnxDestroyOfflineStream(const SherpaOnnxOfflineStream *stream)
Destroy a non-streaming ASR stream.
struct SherpaOnnxOfflineStream SherpaOnnxOfflineStream
Non-streaming decoding state for one utterance.
void SherpaOnnxAcceptWaveformOffline(const SherpaOnnxOfflineStream *stream, int32_t sample_rate, const float *samples, int32_t n)
Provide the full utterance to an offline ASR stream.
const SherpaOnnxSpokenLanguageIdentification * SherpaOnnxCreateSpokenLanguageIdentification(const SherpaOnnxSpokenLanguageIdentificationConfig *config)
Create a spoken-language identifier.
const SherpaOnnxSpokenLanguageIdentificationResult * SherpaOnnxSpokenLanguageIdentificationCompute(const SherpaOnnxSpokenLanguageIdentification *slid, const SherpaOnnxOfflineStream *s)
Run spoken-language identification on an offline stream.
SherpaOnnxOfflineStream * SherpaOnnxSpokenLanguageIdentificationCreateOfflineStream(const SherpaOnnxSpokenLanguageIdentification *slid)
Create an offline stream for spoken-language identification.
void SherpaOnnxDestroySpokenLanguageIdentificationResult(const SherpaOnnxSpokenLanguageIdentificationResult *r)
Destroy a spoken-language identification result.
Configuration for spoken language identification.
SherpaOnnxSpokenLanguageIdentificationWhisperConfig whisper
Result of spoken-language identification.