sherpa-onnx C API 1.0
Public C API and C++ wrapper for sherpa-onnx
Loading...
Searching...
No Matches
c-api.h
Go to the documentation of this file.
1// sherpa-onnx/c-api/c-api.h
2//
3// Copyright (c) 2023 Xiaomi Corporation
74
75#ifndef SHERPA_ONNX_C_API_C_API_H_
76#define SHERPA_ONNX_C_API_C_API_H_
77
78#include <stdint.h>
79
80#ifdef __cplusplus
81extern "C" {
82#endif
83
84// See https://github.com/pytorch/pytorch/blob/main/c10/macros/Export.h
85// We will set SHERPA_ONNX_BUILD_SHARED_LIBS and SHERPA_ONNX_BUILD_MAIN_LIB in
86// CMakeLists.txt
87
88#if defined(__GNUC__)
89#pragma GCC diagnostic push
90#pragma GCC diagnostic ignored "-Wattributes"
91#endif
92
93#if defined(_WIN32)
94#if defined(SHERPA_ONNX_BUILD_SHARED_LIBS)
95#define SHERPA_ONNX_EXPORT __declspec(dllexport)
96#define SHERPA_ONNX_IMPORT __declspec(dllimport)
97#else
98#define SHERPA_ONNX_EXPORT
99#define SHERPA_ONNX_IMPORT
100#endif
101#else // WIN32
102#define SHERPA_ONNX_EXPORT __attribute__((visibility("default")))
103
104#define SHERPA_ONNX_IMPORT SHERPA_ONNX_EXPORT
105#endif // WIN32
106
107#if defined(SHERPA_ONNX_BUILD_MAIN_LIB)
108#define SHERPA_ONNX_API SHERPA_ONNX_EXPORT
109#else
110#define SHERPA_ONNX_API SHERPA_ONNX_IMPORT
111#endif
112
113#ifndef SHERPA_ONNX_DEPRECATED
114#if defined(_MSC_VER)
115#define SHERPA_ONNX_DEPRECATED(msg) __declspec(deprecated(msg))
116#elif defined(__GNUC__) || defined(__clang__)
117#define SHERPA_ONNX_DEPRECATED(msg) __attribute__((deprecated(msg)))
118#else
119#define SHERPA_ONNX_DEPRECATED(msg)
120#endif
121#endif
122
136
146
156
166
179SHERPA_ONNX_API int32_t SherpaOnnxFileExists(const char *filename);
180
196
210
218
224
230
284
298
306
314
324
406
417 const char *text;
418
424 const char *tokens;
425
427 const char *const *tokens_arr;
428
437
439 int32_t count;
440
442 const char *json;
444
449
489
502 const SherpaOnnxOnlineRecognizer *recognizer);
503
523 const SherpaOnnxOnlineRecognizer *recognizer);
524
541 const SherpaOnnxOnlineRecognizer *recognizer, const char *hotwords);
542
556 const SherpaOnnxOnlineStream *stream);
557
579 const SherpaOnnxOnlineStream *stream, int32_t sample_rate,
580 const float *samples, int32_t n);
581
595SHERPA_ONNX_API int32_t
597 const SherpaOnnxOnlineStream *stream);
598
616 const SherpaOnnxOnlineRecognizer *recognizer,
617 const SherpaOnnxOnlineStream *stream);
618
635 const SherpaOnnxOnlineRecognizer *recognizer,
636 const SherpaOnnxOnlineStream **streams, int32_t n);
637
660 const SherpaOnnxOnlineStream *stream);
661
675
692 const SherpaOnnxOnlineRecognizer *recognizer,
693 const SherpaOnnxOnlineStream *stream);
694
707
724 const SherpaOnnxOnlineRecognizer *recognizer,
725 const SherpaOnnxOnlineStream *stream);
726
739 const SherpaOnnxOnlineStream *stream);
740
756 const SherpaOnnxOnlineStream *stream, const char *key, const char *value);
757
772 const SherpaOnnxOnlineStream *stream, const char *key);
773
786 const SherpaOnnxOnlineStream *stream, const char *key);
787
801SHERPA_ONNX_API int32_t
803 const SherpaOnnxOnlineStream *stream);
804
811
824 int32_t max_word_per_line);
825
832
845 int32_t idx, const char *s);
846// ============================================================
847// For offline ASR (i.e., non-streaming ASR)
848// ============================================================
849
861
867
873
895
909
923
931
937
951
957
965
975
981
987
993
999
1003 const char *encoder_adaptor;
1005 const char *llm;
1007 const char *embedding;
1009 const char *tokenizer;
1011 const char *system_prompt;
1013 const char *user_prompt;
1019 float top_p;
1021 int32_t seed;
1023 const char *language;
1025 int32_t itn;
1027 const char *hotwords;
1029
1054
1060
1133
1219
1222
1225
1285 const SherpaOnnxOfflineRecognizerConfig *config);
1286
1298 const SherpaOnnxOfflineRecognizer *recognizer,
1299 const SherpaOnnxOfflineRecognizerConfig *config);
1300
1313 const SherpaOnnxOfflineRecognizer *recognizer);
1314
1331 const SherpaOnnxOfflineRecognizer *recognizer);
1332
1349 const SherpaOnnxOfflineRecognizer *recognizer, const char *hotwords);
1350
1364 const SherpaOnnxOfflineStream *stream);
1365
1393 const SherpaOnnxOfflineStream *stream, int32_t sample_rate,
1394 const float *samples, int32_t n);
1395
1408 const SherpaOnnxOfflineStream *stream, const char *key, const char *value);
1409
1424 const SherpaOnnxOfflineStream *stream, const char *key);
1425
1439 const SherpaOnnxOfflineStream *stream, const char *key);
1440
1455 const SherpaOnnxOfflineRecognizer *recognizer,
1456 const SherpaOnnxOfflineStream *stream);
1457
1474 const SherpaOnnxOfflineRecognizer *recognizer,
1475 const SherpaOnnxOfflineStream **streams, int32_t n);
1476
1487 const char *text;
1488
1497
1499 int32_t count;
1500
1506 const char *tokens;
1507
1509 const char *const *tokens_arr;
1510
1512 const char *json;
1513
1515 const char *lang;
1516
1518 const char *emotion;
1519
1521 const char *event;
1522
1525
1528
1532
1535 const float *segment_durations;
1536
1538 const char *segment_texts;
1539
1541 const char *const *segment_texts_arr;
1542
1546
1570
1584
1599 const SherpaOnnxOfflineStream *stream);
1600
1613
1614// ============================================================
1615// For keyword spotting
1616// ============================================================
1630 const char *keyword;
1631
1637 const char *tokens;
1638
1644 const char *const *tokens_arr;
1645
1647 int32_t count;
1648
1656
1659
1665 const char *json;
1667
1730
1733
1743 const SherpaOnnxKeywordSpotterConfig *config);
1744
1752 const SherpaOnnxKeywordSpotter *spotter);
1753
1763 const SherpaOnnxKeywordSpotter *spotter);
1764
1784 const SherpaOnnxKeywordSpotter *spotter, const char *keywords);
1785
1794SHERPA_ONNX_API int32_t
1796 const SherpaOnnxOnlineStream *stream);
1797
1808 const SherpaOnnxKeywordSpotter *spotter,
1809 const SherpaOnnxOnlineStream *stream);
1810
1822 const SherpaOnnxKeywordSpotter *spotter,
1823 const SherpaOnnxOnlineStream *stream);
1824
1836 const SherpaOnnxKeywordSpotter *spotter,
1837 const SherpaOnnxOnlineStream **streams, int32_t n);
1838
1862 const SherpaOnnxKeywordSpotter *spotter,
1863 const SherpaOnnxOnlineStream *stream);
1864
1872 const SherpaOnnxKeywordResult *r);
1873
1884 const SherpaOnnxKeywordSpotter *spotter,
1885 const SherpaOnnxOnlineStream *stream);
1886
1893
1894// ============================================================
1895// For VAD
1896// ============================================================
1897
1918
1939
1986
1989
2003 int32_t capacity);
2004
2016 const SherpaOnnxCircularBuffer *buffer);
2017
2030 const SherpaOnnxCircularBuffer *buffer, const float *p, int32_t n);
2031
2047 const SherpaOnnxCircularBuffer *buffer, int64_t start_index, int32_t n);
2048
2051
2059 const SherpaOnnxCircularBuffer *buffer, int32_t n);
2060
2067SHERPA_ONNX_API int32_t
2069
2079SHERPA_ONNX_API int64_t
2081
2088 const SherpaOnnxCircularBuffer *buffer);
2089
2110
2113
2143 float buffer_size_in_seconds);
2144
2153
2170 const SherpaOnnxVoiceActivityDetector *p, const float *samples, int32_t n);
2171
2178SHERPA_ONNX_API int32_t
2180
2189
2208
2216
2239
2248 const SherpaOnnxSpeechSegment *p);
2249
2257
2271
2272// ============================================================
2273// For offline Text-to-Speech (i.e., non-streaming TTS)
2274// ============================================================
2275
2300
2325
2329 const char *model;
2331 const char *voices;
2333 const char *tokens;
2340 const char *data_dir;
2344 const char *dict_dir;
2346 const char *lexicon;
2348 const char *lang;
2350
2371
2400
2420
2438
2478
2511
2527
2536typedef int32_t (*SherpaOnnxGeneratedAudioCallback)(const float *samples,
2537 int32_t n);
2538
2543typedef int32_t (*SherpaOnnxGeneratedAudioCallbackWithArg)(const float *samples,
2544 int32_t n,
2545 void *arg);
2546
2556 const float *samples, int32_t n, float p);
2557
2563 const float *samples, int32_t n, float p, void *arg);
2564
2567
2591 const SherpaOnnxOfflineTtsConfig *config);
2592
2600 const SherpaOnnxOfflineTts *tts);
2601
2608SHERPA_ONNX_API int32_t
2610
2619SHERPA_ONNX_API int32_t
2621
2632SHERPA_ONNX_API const char *
2634
2641
2663SHERPA_ONNX_API SHERPA_ONNX_DEPRECATED(
2664 "Use SherpaOnnxOfflineTtsGenerateWithConfig() instead") const
2666 const SherpaOnnxOfflineTts *tts, const char *text, int32_t sid,
2667 float speed);
2668
2686SHERPA_ONNX_API SHERPA_ONNX_DEPRECATED(
2687 "Use SherpaOnnxOfflineTtsGenerateWithConfig() instead") const
2689 const SherpaOnnxOfflineTts *tts, const char *text, int32_t sid,
2690 float speed, SherpaOnnxGeneratedAudioCallback callback);
2691
2716SHERPA_ONNX_API SHERPA_ONNX_DEPRECATED(
2717 "Use SherpaOnnxOfflineTtsGenerateWithConfig() instead") const
2719 const SherpaOnnxOfflineTts *tts, const char *text, int32_t sid,
2720 float speed, SherpaOnnxGeneratedAudioProgressCallback callback);
2721
2736SHERPA_ONNX_API SHERPA_ONNX_DEPRECATED(
2737 "Use SherpaOnnxOfflineTtsGenerateWithConfig() instead") const
2740 const SherpaOnnxOfflineTts *tts, const char *text, int32_t sid,
2741 float speed,
2743 void *arg);
2744
2760SHERPA_ONNX_API SHERPA_ONNX_DEPRECATED(
2761 "Use SherpaOnnxOfflineTtsGenerateWithConfig() instead") const
2763 const SherpaOnnxOfflineTts *tts, const char *text, int32_t sid,
2764 float speed, SherpaOnnxGeneratedAudioCallbackWithArg callback,
2765 void *arg);
2766
2772SHERPA_ONNX_API SHERPA_ONNX_DEPRECATED(
2773 "Use SherpaOnnxOfflineTtsGenerateWithConfig() instead") const
2775 const SherpaOnnxOfflineTts *tts, const char *text,
2776 const char *prompt_text, const float *prompt_samples, int32_t n_prompt,
2777 int32_t prompt_sr, float speed, int32_t num_steps);
2778
2802 float speed;
2804 int32_t sid;
2806 const float *reference_audio;
2812 const char *reference_text;
2814 int32_t num_steps;
2816 const char *extra;
2817
2828 const int32_t *phoneme_codepoints;
2829
2834
2837
2847 const char *const *tokens;
2848
2851 const int32_t *tokens_lens;
2852
2856
2887 const SherpaOnnxOfflineTts *tts, const char *text,
2888 const SherpaOnnxGenerationConfig *config,
2890
2899 const SherpaOnnxGeneratedAudio *p);
2900
2916SHERPA_ONNX_API int32_t SherpaOnnxWriteWave(const float *samples, int32_t n,
2917 int32_t sample_rate,
2918 const char *filename);
2919
2926SHERPA_ONNX_API int64_t SherpaOnnxWaveFileSize(int32_t n_samples);
2927
2939 int32_t n, int32_t sample_rate,
2940 char *buffer);
2941
2953 const float *const *samples, int32_t n, int32_t sample_rate,
2954 int32_t num_channels, const char *filename);
2955
2963
2999
3066
3090
3110
3139
3163 const SherpaOnnxForcedAlignerConfig *config);
3164
3177 const SherpaOnnxForcedAligner *aligner);
3178
3203 const SherpaOnnxForcedAligner *aligner);
3204
3234 const SherpaOnnxOfflineStream *stream,
3235 const char *text);
3236
3249 const SherpaOnnxForcedAlignmentResult *result);
3250
3257typedef struct SherpaOnnxWave {
3259 const float *samples;
3265
3284
3294 const char *data, int32_t n);
3295
3302
3321
3331
3338 const SherpaOnnxMultiChannelWave *wave);
3339
3340// ============================================================
3341// For spoken language identification
3342// ============================================================
3343
3364
3391
3395
3407
3417
3432
3444
3472 const SherpaOnnxOfflineStream *s);
3473
3482
3483// ============================================================
3484// For speaker embedding extraction
3485// ============================================================
3511
3515
3527
3536
3545
3560
3571 const SherpaOnnxOnlineStream *s);
3572
3598SHERPA_ONNX_API const float *
3601 const SherpaOnnxOnlineStream *s);
3602
3611 const float *v);
3612
3620
3635
3644
3653SHERPA_ONNX_API int32_t
3655 const char *name, const float *v);
3656
3674 const SherpaOnnxSpeakerEmbeddingManager *p, const char *name,
3675 const float **v);
3676
3690 const SherpaOnnxSpeakerEmbeddingManager *p, const char *name,
3691 const float *v, int32_t n);
3692
3701 const SherpaOnnxSpeakerEmbeddingManager *p, const char *name);
3702
3714 const SherpaOnnxSpeakerEmbeddingManager *p, const float *v,
3715 float threshold);
3716
3724 const char *name);
3725
3735
3747
3760 const SherpaOnnxSpeakerEmbeddingManager *p, const float *v, float threshold,
3761 int32_t n);
3762
3771
3782 const SherpaOnnxSpeakerEmbeddingManager *p, const char *name,
3783 const float *v, float threshold);
3784
3793 const SherpaOnnxSpeakerEmbeddingManager *p, const char *name);
3794
3803
3812
3823SHERPA_ONNX_API const char *const *
3826
3835 const char *const *names);
3836
3849 const SherpaOnnxSpeakerEmbeddingManager *p, const char *name);
3850
3859 const float *v);
3860
3861// ============================================================
3862// For audio tagging
3863// ============================================================
3869
3900
3926
3930typedef struct SherpaOnnxAudioEvent {
3932 const char *name;
3934 int32_t index;
3936 float prob;
3938
3941
3951 const SherpaOnnxAudioTaggingConfig *config);
3952
3960 const SherpaOnnxAudioTagging *tagger);
3961
3971
3998 const SherpaOnnxOfflineStream *s, int32_t top_k);
3999
4006 const SherpaOnnxAudioEvent *const *p);
4007
4008// ============================================================
4009// For punctuation
4010// ============================================================
4011
4036
4042
4045
4057
4065 const SherpaOnnxOfflinePunctuation *punct);
4066
4077 const SherpaOnnxOfflinePunctuation *punct, const char *text);
4078
4086
4113
4119
4122
4132 const SherpaOnnxOnlinePunctuationConfig *config);
4133
4140 const SherpaOnnxOnlinePunctuation *punctuation);
4141
4159 const SherpaOnnxOnlinePunctuation *punctuation, const char *text);
4160
4167
4168// For resampling
4171
4195SherpaOnnxCreateLinearResampler(int32_t samp_rate_in_hz,
4196 int32_t samp_rate_out_hz,
4197 float filter_cutoff_hz, int32_t num_zeros);
4198
4205 const SherpaOnnxLinearResampler *p);
4206
4213 const SherpaOnnxLinearResampler *p);
4214
4226
4240 const SherpaOnnxLinearResampler *p, const float *input, int32_t input_dim,
4241 int32_t flush);
4242
4249 const SherpaOnnxResampleOut *p);
4250
4258 const SherpaOnnxLinearResampler *p);
4259
4267 const SherpaOnnxLinearResampler *p);
4268
4269// =========================================================================
4270// For offline speaker diarization (i.e., non-streaming speaker diarization)
4271// =========================================================================
4284
4301
4318
4346
4350
4362
4371
4380
4392
4396
4414
4424
4434
4449
4459
4467 int32_t num_processed_chunks, int32_t num_total_chunks, void *arg);
4468
4474 int32_t num_processed_chunks, int32_t num_total_chunks);
4475
4487 const SherpaOnnxOfflineSpeakerDiarization *sd, const float *samples,
4488 int32_t n);
4489
4510 const SherpaOnnxOfflineSpeakerDiarization *sd, const float *samples,
4512 void *arg);
4513
4527 const SherpaOnnxOfflineSpeakerDiarization *sd, const float *samples,
4528 int32_t n,
4530
4539
4540// =========================================================================
4541// For offline speech enhancement
4542// =========================================================================
4548
4563
4601
4622
4628
4631
4651
4660
4669
4684 const SherpaOnnxOfflineSpeechDenoiser *sd, const float *samples, int32_t n,
4685 int32_t sample_rate);
4686
4700
4722 const float *samples, int32_t n,
4723 int32_t sample_rate);
4724
4733 const SherpaOnnxDenoisedAudio *p);
4734
4735// =========================================================================
4736// For streaming speech enhancement
4737// =========================================================================
4743
4746
4758
4767
4776
4787
4803 const float *samples, int32_t n,
4804 int32_t sample_rate);
4805
4817
4825
4839 const SherpaOnnxOnlineSpeechDenoiser *sd, const float *samples, int32_t n,
4840 int32_t sample_rate);
4841
4842// =========================================================================
4843// Source separation
4844// =========================================================================
4845
4853
4859
4868
4873
4877
4889
4898
4907
4918
4928
4938
4957 const SherpaOnnxOfflineSourceSeparation *ss, const float *const *samples,
4958 int32_t num_channels, int32_t num_samples, int32_t sample_rate);
4959
4967
4968#ifdef __OHOS__
4969
4976typedef struct NativeResourceManager NativeResourceManager;
4977
4989SherpaOnnxCreateOfflineSpeechDenoiserOHOS(
4991 NativeResourceManager *mgr);
4992
5004SherpaOnnxCreateOnlineSpeechDenoiserOHOS(
5006 NativeResourceManager *mgr);
5007
5019SherpaOnnxCreateOnlineRecognizerOHOS(
5020 const SherpaOnnxOnlineRecognizerConfig *config, NativeResourceManager *mgr);
5021
5033SherpaOnnxCreateOfflineRecognizerOHOS(
5035 NativeResourceManager *mgr);
5036
5049SherpaOnnxCreateVoiceActivityDetectorOHOS(
5050 const SherpaOnnxVadModelConfig *config, float buffer_size_in_seconds,
5051 NativeResourceManager *mgr);
5052
5063SHERPA_ONNX_API const SherpaOnnxOfflineTts *SherpaOnnxCreateOfflineTtsOHOS(
5064 const SherpaOnnxOfflineTtsConfig *config, NativeResourceManager *mgr);
5065
5077SherpaOnnxCreateOfflinePunctuationOHOS(
5079 NativeResourceManager *mgr);
5080
5092SherpaOnnxCreateOnlinePunctuationOHOS(
5094 NativeResourceManager *mgr);
5095
5108SherpaOnnxCreateSpeakerEmbeddingExtractorOHOS(
5110 NativeResourceManager *mgr);
5111
5123SherpaOnnxCreateKeywordSpotterOHOS(const SherpaOnnxKeywordSpotterConfig *config,
5124 NativeResourceManager *mgr);
5125
5138SherpaOnnxCreateOfflineSpeakerDiarizationOHOS(
5140 NativeResourceManager *mgr);
5141
5154SherpaOnnxCreateOfflineSourceSeparationOHOS(
5156 NativeResourceManager *mgr);
5157
5170SHERPA_ONNX_API SherpaOnnxForcedAligner *SherpaOnnxCreateForcedAlignerOHOS(
5171 const SherpaOnnxForcedAlignerConfig *config, NativeResourceManager *mgr);
5172#endif
5173
5174// ============================================================
5175// For diacritization
5176// ============================================================
5177
5193
5199
5202
5213
5220 const SherpaOnnxOfflineDiacritization *diacrt);
5221
5231 const SherpaOnnxOfflineDiacritization *diacrt, const char *text);
5232
5239
5240#if defined(__GNUC__)
5241#pragma GCC diagnostic pop
5242#endif
5243
5244#ifdef __cplusplus
5245} /* extern "C" */
5246#endif
5247
5248#endif // SHERPA_ONNX_C_API_C_API_H_
int32_t SherpaOnnxOfflineSpeakerDiarizationResultGetNumSegments(const SherpaOnnxOfflineSpeakerDiarizationResult *r)
Return the number of diarization segments.
int32_t SherpaOnnxVoiceActivityDetectorDetected(const SherpaOnnxVoiceActivityDetector *p)
Check whether the detector is currently inside speech.
const SherpaOnnxSpeechSegment * SherpaOnnxVoiceActivityDetectorFront(const SherpaOnnxVoiceActivityDetector *p)
Get the first queued speech segment.
void SherpaOnnxOfflineRecognizerSetConfig(const SherpaOnnxOfflineRecognizer *recognizer, const SherpaOnnxOfflineRecognizerConfig *config)
Update the configuration of an existing offline recognizer.
const SherpaOnnxMultiChannelWave * SherpaOnnxReadWaveMultiChannel(const char *filename)
Read a multi-channel 16-bit PCM WAVE file.
void SherpaOnnxFreeWave(const SherpaOnnxWave *wave)
Destroy a wave object returned by SherpaOnnxReadWave() or SherpaOnnxReadWaveFromBinaryData().
struct SherpaOnnxSpokenLanguageIdentification SherpaOnnxSpokenLanguageIdentification
Opaque spoken-language identification handle.
Definition c-api.h:3393
const SherpaOnnxOfflineSpeakerDiarizationResult * SherpaOnnxOfflineSpeakerDiarizationProcess(const SherpaOnnxOfflineSpeakerDiarization *sd, const float *samples, int32_t n)
Run offline speaker diarization.
void SherpaOnnxDestroySpokenLanguageIdentification(const SherpaOnnxSpokenLanguageIdentification *slid)
Destroy a spoken-language identifier.
int32_t SherpaOnnxSpeakerEmbeddingManagerNumSpeakers(const SherpaOnnxSpeakerEmbeddingManager *p)
Return the number of enrolled speakers.
int32_t(* SherpaOnnxGeneratedAudioCallback)(const float *samples, int32_t n)
Callback invoked during incremental generation.
Definition c-api.h:2536
void SherpaOnnxOnlineSpeechDenoiserReset(const SherpaOnnxOnlineSpeechDenoiser *sd)
Reset an online denoiser so it can process a new stream.
const SherpaOnnxGeneratedAudio * SherpaOnnxOfflineTtsGenerateWithZipvoice(const SherpaOnnxOfflineTts *tts, const char *text, const char *prompt_text, const float *prompt_samples, int32_t n_prompt, int32_t prompt_sr, float speed, int32_t num_steps)
Deprecated ZipVoice-specific generation API.
const char * SherpaOnnxOfflineStreamGetOption(const SherpaOnnxOfflineStream *stream, const char *key)
Get a per-stream runtime option for offline ASR.
int32_t SherpaOnnxSpeakerEmbeddingManagerRemove(const SherpaOnnxSpeakerEmbeddingManager *p, const char *name)
Remove a speaker from the manager.
const SherpaOnnxSpeakerEmbeddingExtractor * SherpaOnnxCreateSpeakerEmbeddingExtractor(const SherpaOnnxSpeakerEmbeddingExtractorConfig *config)
Create a speaker embedding extractor.
struct SherpaOnnxOfflineSpeechDenoiser SherpaOnnxOfflineSpeechDenoiser
Opaque offline speech denoiser handle.
Definition c-api.h:4630
void SherpaOnnxDestroyKeywordSpotter(const SherpaOnnxKeywordSpotter *spotter)
Destroy a keyword spotter.
void SherpaOnnxDestroyOnlineSpeechDenoiser(const SherpaOnnxOnlineSpeechDenoiser *sd)
Destroy an online speech denoiser.
const SherpaOnnxLinearResampler * SherpaOnnxCreateLinearResampler(int32_t samp_rate_in_hz, int32_t samp_rate_out_hz, float filter_cutoff_hz, int32_t num_zeros)
Create a linear resampler.
int32_t SherpaOnnxOfflineSpeechDenoiserGetSampleRate(const SherpaOnnxOfflineSpeechDenoiser *sd)
Return the expected sample rate for the denoiser.
const SherpaOnnxWave * SherpaOnnxReadWave(const char *filename)
Read a mono 16-bit PCM WAVE file.
void SherpaOnnxOnlineStreamAcceptWaveform(const SherpaOnnxOnlineStream *stream, int32_t sample_rate, const float *samples, int32_t n)
Append audio samples to a streaming ASR stream.
void SherpaOnnxDestroyOnlineStreamResultJson(const char *s)
Free a JSON string returned by SherpaOnnxGetOnlineStreamResultAsJson().
void SherpaOnnxAudioTaggingFreeResults(const SherpaOnnxAudioEvent *const *p)
Destroy results returned by SherpaOnnxAudioTaggingCompute().
void SherpaOnnxDestroyOfflineSpeakerDiarization(const SherpaOnnxOfflineSpeakerDiarization *sd)
Destroy an offline speaker diarizer.
const SherpaOnnxOfflineRecognizer * SherpaOnnxCreateOfflineRecognizer(const SherpaOnnxOfflineRecognizerConfig *config)
Create a non-streaming ASR recognizer.
int32_t SherpaOnnxOnlineSpeechDenoiserSetVoiceSample(const SherpaOnnxOnlineSpeechDenoiser *sd, const float *samples, int32_t n, int32_t sample_rate)
Set a PCM voice sample for VoxLock.
void SherpaOnnxSpeakerEmbeddingExtractorDestroyEmbedding(const float *v)
Destroy an embedding vector returned by SherpaOnnxSpeakerEmbeddingExtractorComputeEmbedding().
int32_t(* SherpaOnnxOfflineSpeakerDiarizationProgressCallbackNoArg)(int32_t num_processed_chunks, int32_t num_total_chunks)
Same as SherpaOnnxOfflineSpeakerDiarizationProgressCallback but without a user pointer.
Definition c-api.h:4473
const SherpaOnnxOfflineTts * SherpaOnnxCreateOfflineTts(const SherpaOnnxOfflineTtsConfig *config)
Create an offline TTS engine.
void SherpaOnnxDestroyOfflineTtsLang(const char *s)
Free a string returned by SherpaOnnxOfflineTtsLang().
void SherpaOnnxVoiceActivityDetectorFlush(const SherpaOnnxVoiceActivityDetector *p)
Flush buffered tail samples and force final segmentation.
void SherpaOnnxDestroyOfflineStream(const SherpaOnnxOfflineStream *stream)
Destroy a non-streaming ASR stream.
const float * SherpaOnnxSpeakerEmbeddingExtractorComputeEmbedding(const SherpaOnnxSpeakerEmbeddingExtractor *p, const SherpaOnnxOnlineStream *s)
Compute the embedding for a stream.
const SherpaOnnxOfflineRecognizerResult * SherpaOnnxGetOfflineStreamResult(const SherpaOnnxOfflineStream *stream)
Get the recognition result for an offline ASR stream.
void SherpaOnnxFreeMultiChannelWave(const SherpaOnnxMultiChannelWave *wave)
Destroy a multi-channel wave object.
void SherpaOnnxOnlineStreamSetOption(const SherpaOnnxOnlineStream *stream, const char *key, const char *value)
Set a per-stream runtime option.
const char * SherpaOnnxGetOfflineStreamResultAsJson(const SherpaOnnxOfflineStream *stream)
Get the offline ASR result as JSON.
int32_t(* SherpaOnnxOfflineSpeakerDiarizationProgressCallback)(int32_t num_processed_chunks, int32_t num_total_chunks, void *arg)
Progress callback for offline speaker diarization.
Definition c-api.h:4466
const char * SherpaOnnxGetKeywordResultAsJson(const SherpaOnnxKeywordSpotter *spotter, const SherpaOnnxOnlineStream *stream)
Get the current keyword spotting result as JSON.
const char * SherpaOnnxOnlinePunctuationAddPunct(const SherpaOnnxOnlinePunctuation *punctuation, const char *text)
Add punctuation to one text chunk using the online punctuation model.
int32_t SherpaOnnxSpeakerEmbeddingManagerAddList(const SherpaOnnxSpeakerEmbeddingManager *p, const char *name, const float **v)
Add multiple enrollment embeddings for one speaker.
void SherpaOnnxDecodeOfflineStream(const SherpaOnnxOfflineRecognizer *recognizer, const SherpaOnnxOfflineStream *stream)
Run offline ASR on one stream.
void SherpaOfflineDiacritizationFreeText(const char *text)
Free a string returned by SherpaOfflineDiacritizationAddDiacritics().
int32_t SherpaOnnxIsKeywordStreamReady(const SherpaOnnxKeywordSpotter *spotter, const SherpaOnnxOnlineStream *stream)
Check whether a keyword stream has enough audio for decoding.
int32_t SherpaOnnxSpeakerEmbeddingManagerAdd(const SherpaOnnxSpeakerEmbeddingManager *p, const char *name, const float *v)
Add one enrollment embedding for a speaker.
void SherpaOnnxDecodeKeywordStream(const SherpaOnnxKeywordSpotter *spotter, const SherpaOnnxOnlineStream *stream)
Decode one ready keyword stream.
void SherpaOnnxDestroySpeakerEmbeddingManager(const SherpaOnnxSpeakerEmbeddingManager *p)
Destroy a speaker embedding manager.
const SherpaOnnxOfflineSpeakerDiarizationResult * SherpaOnnxOfflineSpeakerDiarizationProcessWithCallback(const SherpaOnnxOfflineSpeakerDiarization *sd, const float *samples, int32_t n, SherpaOnnxOfflineSpeakerDiarizationProgressCallback callback, void *arg)
Run offline speaker diarization with a progress callback.
const SherpaOnnxResampleOut * SherpaOnnxLinearResamplerResample(const SherpaOnnxLinearResampler *p, const float *input, int32_t input_dim, int32_t flush)
Resample one chunk of input audio.
struct SherpaOnnxOfflineStream SherpaOnnxOfflineStream
Non-streaming decoding state for one utterance.
Definition c-api.h:1224
#define SHERPA_ONNX_API
Definition c-api.h:110
void SherpaOnnxOnlinePunctuationFreeText(const char *text)
Free a string returned by SherpaOnnxOnlinePunctuationAddPunct().
void SherpaOnnxCircularBufferPush(const SherpaOnnxCircularBuffer *buffer, const float *p, int32_t n)
Append samples to a circular buffer.
const char * SherpaOnnxGetOnlineStreamResultAsJson(const SherpaOnnxOnlineRecognizer *recognizer, const SherpaOnnxOnlineStream *stream)
Get the current streaming ASR result as JSON.
struct SherpaOnnxOnlineSpeechDenoiser SherpaOnnxOnlineSpeechDenoiser
Opaque online speech denoiser handle.
Definition c-api.h:4745
const SherpaOnnxOnlinePunctuation * SherpaOnnxCreateOnlinePunctuation(const SherpaOnnxOnlinePunctuationConfig *config)
Create an online punctuation processor.
struct SherpaOnnxOnlineStream SherpaOnnxOnlineStream
Streaming decoding state for one utterance or stream.
Definition c-api.h:448
void SherpaOnnxDestroyLinearResampler(const SherpaOnnxLinearResampler *p)
Destroy a linear resampler.
const SherpaOnnxDenoisedAudio * SherpaOnnxOnlineSpeechDenoiserRun(const SherpaOnnxOnlineSpeechDenoiser *sd, const float *samples, int32_t n, int32_t sample_rate)
Process one chunk of streaming audio.
const SherpaOnnxOfflineSourceSeparation * SherpaOnnxCreateOfflineSourceSeparation(const SherpaOnnxOfflineSourceSeparationConfig *config)
Create a source-separation engine.
void SherpaOnnxDestroyOfflineRecognizer(const SherpaOnnxOfflineRecognizer *recognizer)
Destroy a non-streaming recognizer.
void SherpaOnnxLinearResamplerReset(const SherpaOnnxLinearResampler *p)
Reset a linear resampler to its initial state.
void SherpaOnnxDestroyOnlineRecognizerResult(const SherpaOnnxOnlineRecognizerResult *r)
Destroy a result returned by SherpaOnnxGetOnlineStreamResult().
const SherpaOnnxAudioEvent *const * SherpaOnnxAudioTaggingCompute(const SherpaOnnxAudioTagging *tagger, const SherpaOnnxOfflineStream *s, int32_t top_k)
Run audio tagging on an offline stream.
void SherpaOnnxLinearResamplerResampleFree(const SherpaOnnxResampleOut *p)
Destroy a resampler output chunk.
int32_t SherpaOnnxOfflineSourceSeparationGetOutputSampleRate(const SherpaOnnxOfflineSourceSeparation *ss)
Return the output sample rate of the source-separation engine.
void SherpaOnnxDecodeMultipleKeywordStreams(const SherpaOnnxKeywordSpotter *spotter, const SherpaOnnxOnlineStream **streams, int32_t n)
Decode multiple ready keyword streams in parallel.
int32_t SherpaOnnxCircularBufferSize(const SherpaOnnxCircularBuffer *buffer)
Return the number of currently stored samples.
void SherpaOnnxVoiceActivityDetectorReset(const SherpaOnnxVoiceActivityDetector *p)
Reset a voice activity detector so it can process a new stream.
const char * SherpaOnnxGetOnnxruntimeVersionStr()
Return the onnxruntime version string used by the library.
const SherpaOnnxOnlineSpeechDenoiser * SherpaOnnxCreateOnlineSpeechDenoiser(const SherpaOnnxOnlineSpeechDenoiserConfig *config)
Create an online speech denoiser.
int32_t(* SherpaOnnxGeneratedAudioProgressCallback)(const float *samples, int32_t n, float p)
Progress callback invoked during incremental generation.
Definition c-api.h:2555
void SherpaOnnxDestroyOfflineTtsGeneratedAudio(const SherpaOnnxGeneratedAudio *p)
Destroy audio returned by a TTS generation API.
void SherpaOnnxDestroyForcedAligner(const SherpaOnnxForcedAligner *aligner)
Free a forced aligner created by SherpaOnnxCreateForcedAligner().
const SherpaOnnxOfflineStream * SherpaOnnxAudioTaggingCreateOfflineStream(const SherpaOnnxAudioTagging *tagger)
Create an offline stream for audio tagging.
const char * SherpaOfflinePunctuationAddPunct(const SherpaOnnxOfflinePunctuation *punct, const char *text)
Add punctuation to a complete input text.
int32_t SherpaOnnxVoiceActivityDetectorEmpty(const SherpaOnnxVoiceActivityDetector *p)
Check whether the detector currently has any completed speech segment.
int32_t SherpaOnnxIsOnlineStreamReady(const SherpaOnnxOnlineRecognizer *recognizer, const SherpaOnnxOnlineStream *stream)
Check whether a streaming ASR stream is ready to decode.
int32_t SherpaOnnxSpeakerEmbeddingExtractorIsReady(const SherpaOnnxSpeakerEmbeddingExtractor *p, const SherpaOnnxOnlineStream *s)
Check whether enough audio has been provided to compute an embedding.
const char * SherpaOnnxOfflineTtsLang(const SherpaOnnxOfflineTts *tts)
Return the language/voice of the model, e.g., "en-us".
void SherpaOnnxCircularBufferPop(const SherpaOnnxCircularBuffer *buffer, int32_t n)
Drop samples from the front of a circular buffer.
const float * SherpaOnnxCircularBufferGet(const SherpaOnnxCircularBuffer *buffer, int64_t start_index, int32_t n)
Copy out a slice of samples from a circular buffer.
int32_t SherpaOnnxOnlineSpeechDenoiserGetFrameShiftInSamples(const SherpaOnnxOnlineSpeechDenoiser *sd)
Return the recommended chunk size in samples for streaming input.
void SherpaOnnxDestroyForcedAlignmentResult(const SherpaOnnxForcedAlignmentResult *result)
Free the result of SherpaOnnxForcedAlignerCompute().
void SherpaOnnxSpeakerEmbeddingManagerFreeSearch(const char *name)
Free a string returned by SherpaOnnxSpeakerEmbeddingManagerSearch().
void SherpaOnnxDestroySpeakerEmbeddingExtractor(const SherpaOnnxSpeakerEmbeddingExtractor *p)
Destroy a speaker embedding extractor.
const SherpaOnnxOfflineSpeakerDiarization * SherpaOnnxCreateOfflineSpeakerDiarization(const SherpaOnnxOfflineSpeakerDiarizationConfig *config)
Create an offline speaker diarization pipeline.
struct SherpaOnnxOfflineRecognizer SherpaOnnxOfflineRecognizer
Non-streaming recognizer handle.
Definition c-api.h:1221
const char * SherpaOnnxSpeakerEmbeddingManagerSearch(const SherpaOnnxSpeakerEmbeddingManager *p, const float *v, float threshold)
Search for the best matching enrolled speaker.
void SherpaOnnxOfflineSpeakerDiarizationDestroyResult(const SherpaOnnxOfflineSpeakerDiarizationResult *r)
Destroy a diarization result.
const SherpaOnnxSpeakerEmbeddingManager * SherpaOnnxCreateSpeakerEmbeddingManager(int32_t dim)
Create a speaker embedding manager.
int32_t SherpaOnnxLinearResamplerResampleGetOutputSampleRate(const SherpaOnnxLinearResampler *p)
Return the resampler output sample rate.
const SherpaOnnxGeneratedAudio * SherpaOnnxOfflineTtsGenerateWithProgressCallback(const SherpaOnnxOfflineTts *tts, const char *text, int32_t sid, float speed, SherpaOnnxGeneratedAudioProgressCallback callback)
Generate speech with a progress callback.
void SherpaOnnxDestroyAudioTagging(const SherpaOnnxAudioTagging *tagger)
Destroy an audio tagger.
int32_t SherpaOnnxOfflineTtsSampleRate(const SherpaOnnxOfflineTts *tts)
Return the output sample rate of a TTS engine.
void SherpaOnnxOfflineSpeakerDiarizationSetConfig(const SherpaOnnxOfflineSpeakerDiarization *sd, const SherpaOnnxOfflineSpeakerDiarizationConfig *config)
Update clustering-related settings of an existing diarizer.
void SherpaOnnxDestroyCircularBuffer(const SherpaOnnxCircularBuffer *buffer)
Destroy a circular buffer.
void SherpaOnnxDestroyOfflineStreamResultJson(const char *s)
Free a JSON string returned by SherpaOnnxGetOfflineStreamResultAsJson().
const SherpaOnnxGeneratedAudio * SherpaOnnxOfflineTtsGenerateWithCallback(const SherpaOnnxOfflineTts *tts, const char *text, int32_t sid, float speed, SherpaOnnxGeneratedAudioCallback callback)
Generate speech and receive incremental audio chunks through a callback.
int32_t SherpaOnnxOfflineSpeakerDiarizationGetSampleRate(const SherpaOnnxOfflineSpeakerDiarization *sd)
Return the expected input sample rate.
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 char *const * SherpaOnnxSpeakerEmbeddingManagerGetAllSpeakers(const SherpaOnnxSpeakerEmbeddingManager *p)
Return all enrolled speaker names.
const SherpaOnnxOnlineRecognizerResult * SherpaOnnxGetOnlineStreamResult(const SherpaOnnxOnlineRecognizer *recognizer, const SherpaOnnxOnlineStream *stream)
Get the current streaming ASR result for a stream.
struct SherpaOnnxSpeakerEmbeddingManager SherpaOnnxSpeakerEmbeddingManager
Opaque speaker embedding manager handle.
Definition c-api.h:3618
struct SherpaOnnxKeywordSpotter SherpaOnnxKeywordSpotter
Opaque keyword spotter handle.
Definition c-api.h:1732
const float * SherpaOnnxSpeakerEmbeddingManagerGetEmbedding(const SherpaOnnxSpeakerEmbeddingManager *p, const char *name)
Return a copy of the embedding of a speaker.
int32_t SherpaOnnxSpeakerEmbeddingManagerContains(const SherpaOnnxSpeakerEmbeddingManager *p, const char *name)
Check whether a speaker is enrolled.
int32_t SherpaOnnxOfflineStreamHasOption(const SherpaOnnxOfflineStream *stream, const char *key)
Check whether a per-stream runtime option exists.
void SherpaOnnxDestroyOnlineRecognizer(const SherpaOnnxOnlineRecognizer *recognizer)
Destroy a streaming recognizer.
void SherpaOnnxWriteWaveToBuffer(const float *samples, int32_t n, int32_t sample_rate, char *buffer)
Write a mono 16-bit WAVE file to a caller-provided buffer.
int32_t SherpaOnnxSpeakerEmbeddingManagerVerify(const SherpaOnnxSpeakerEmbeddingManager *p, const char *name, const float *v, float threshold)
Verify whether a query embedding matches a named speaker.
SherpaOnnxOfflineStream * SherpaOnnxForcedAlignerCreateStream(const SherpaOnnxForcedAligner *aligner)
Create an utterance stream for a forced aligner.
struct SherpaOnnxOnlinePunctuation SherpaOnnxOnlinePunctuation
Opaque online punctuation handle.
Definition c-api.h:4121
int32_t SherpaOnnxOfflineSpeechDenoiserSetVoiceSample(const SherpaOnnxOfflineSpeechDenoiser *sd, const float *samples, int32_t n, int32_t sample_rate)
Set a PCM voice sample for VoxLock.
const SherpaOnnxOfflineStream * SherpaOnnxCreateOfflineStreamWithHotwords(const SherpaOnnxOfflineRecognizer *recognizer, const char *hotwords)
Create a non-streaming ASR input stream with per-stream hotwords.
struct SherpaOnnxOnlineRecognizer SherpaOnnxOnlineRecognizer
Streaming recognizer handle.
Definition c-api.h:446
void SherpaOnnxDestroyOfflineSpeechDenoiser(const SherpaOnnxOfflineSpeechDenoiser *sd)
Destroy an offline speech denoiser.
int32_t SherpaOnnxOnlineStreamIsEndpoint(const SherpaOnnxOnlineRecognizer *recognizer, const SherpaOnnxOnlineStream *stream)
Check whether endpoint detection has triggered for a stream.
const SherpaOnnxGeneratedAudio * SherpaOnnxOfflineTtsGenerate(const SherpaOnnxOfflineTts *tts, const char *text, int32_t sid, float speed)
Generate speech from text using the simple sid/speed interface.
void SherpaOnnxSpeakerEmbeddingManagerFreeAllSpeakers(const char *const *names)
Free an array returned by SherpaOnnxSpeakerEmbeddingManagerGetAllSpeakers().
const SherpaOnnxDenoisedAudio * SherpaOnnxOfflineSpeechDenoiserRun(const SherpaOnnxOfflineSpeechDenoiser *sd, const float *samples, int32_t n, int32_t sample_rate)
Run offline speech denoising on a complete waveform.
void SherpaOnnxDestroySourceSeparationOutput(const SherpaOnnxSourceSeparationOutput *p)
Destroy the output of a source-separation run.
SherpaOnnxForcedAligner * SherpaOnnxCreateForcedAligner(const SherpaOnnxForcedAlignerConfig *config)
Create a forced aligner from a model directory and a pronunciation dictionary.
const SherpaOnnxKeywordSpotter * SherpaOnnxCreateKeywordSpotter(const SherpaOnnxKeywordSpotterConfig *config)
Create a keyword spotter.
void SherpaOnnxVoiceActivityDetectorPop(const SherpaOnnxVoiceActivityDetector *p)
Remove the front speech segment from the detector queue.
struct SherpaOnnxCircularBuffer SherpaOnnxCircularBuffer
Opaque circular-buffer handle used by helper APIs.
Definition c-api.h:1988
void SherpaOnnxDestroyKeywordResult(const SherpaOnnxKeywordResult *r)
Destroy a keyword result snapshot.
void SherpaOnnxOfflineStreamSetOption(const SherpaOnnxOfflineStream *stream, const char *key, const char *value)
Set a per-stream runtime option for offline ASR.
int32_t SherpaOnnxOfflineSpeakerDiarizationResultGetNumSpeakers(const SherpaOnnxOfflineSpeakerDiarizationResult *r)
Return the number of speakers in a diarization result.
const SherpaOnnxOnlineStream * SherpaOnnxCreateKeywordStreamWithKeywords(const SherpaOnnxKeywordSpotter *spotter, const char *keywords)
Create a keyword spotting stream with extra or replacement keywords.
void SherpaOnnxDestroyDisplay(const SherpaOnnxDisplay *display)
Destroy a display helper.
const SherpaOnnxWave * SherpaOnnxReadWaveFromBinaryData(const char *data, int32_t n)
Read a mono 16-bit PCM WAVE file from binary memory.
void SherpaOnnxDestroyOfflineRecognizerResult(const SherpaOnnxOfflineRecognizerResult *r)
Destroy a result returned by SherpaOnnxGetOfflineStreamResult().
const SherpaOnnxSpeakerEmbeddingManagerBestMatchesResult * SherpaOnnxSpeakerEmbeddingManagerGetBestMatches(const SherpaOnnxSpeakerEmbeddingManager *p, const float *v, float threshold, int32_t n)
Return up to n best matches above a similarity threshold.
struct SherpaOnnxOfflineTts SherpaOnnxOfflineTts
Opaque offline TTS handle.
Definition c-api.h:2566
void SherpaOnnxDecodeMultipleOnlineStreams(const SherpaOnnxOnlineRecognizer *recognizer, const SherpaOnnxOnlineStream **streams, int32_t n)
Decode multiple streaming ASR streams in parallel.
int32_t SherpaOnnxFileExists(const char *filename)
Check whether a file exists.
struct SherpaOnnxOfflineSpeakerDiarizationResult SherpaOnnxOfflineSpeakerDiarizationResult
Opaque offline speaker diarization result.
Definition c-api.h:4394
void SherpaOfflinePunctuationFreeText(const char *text)
Free a string returned by SherpaOfflinePunctuationAddPunct().
void SherpaOnnxFreeKeywordResultJson(const char *s)
Free a JSON string returned by SherpaOnnxGetKeywordResultAsJson().
const SherpaOnnxDisplay * SherpaOnnxCreateDisplay(int32_t max_word_per_line)
Create a display helper.
const SherpaOnnxSpokenLanguageIdentification * SherpaOnnxCreateSpokenLanguageIdentification(const SherpaOnnxSpokenLanguageIdentificationConfig *config)
Create a spoken-language identifier.
void SherpaOnnxOfflineSpeakerDiarizationDestroySegment(const SherpaOnnxOfflineSpeakerDiarizationSegment *s)
Destroy a segment array returned by SherpaOnnxOfflineSpeakerDiarizationResultSortByStartTime().
void SherpaOnnxDestroyOfflineSourceSeparation(const SherpaOnnxOfflineSourceSeparation *ss)
Destroy a source-separation engine.
const SherpaOnnxOfflineStream * SherpaOnnxCreateOfflineStream(const SherpaOnnxOfflineRecognizer *recognizer)
Create a non-streaming ASR input stream.
const SherpaOnnxGeneratedAudio * SherpaOnnxOfflineTtsGenerateWithConfig(const SherpaOnnxOfflineTts *tts, const char *text, const SherpaOnnxGenerationConfig *config, SherpaOnnxGeneratedAudioProgressCallbackWithArg callback, void *arg)
Generate speech using the advanced configuration interface.
struct SherpaOnnxLinearResampler SherpaOnnxLinearResampler
Opaque linear resampler handle.
Definition c-api.h:4170
void SherpaOnnxDecodeMultipleOfflineStreams(const SherpaOnnxOfflineRecognizer *recognizer, const SherpaOnnxOfflineStream **streams, int32_t n)
Run offline ASR on multiple streams in parallel.
void SherpaOnnxCircularBufferReset(const SherpaOnnxCircularBuffer *buffer)
Clear a circular buffer and reset its head index.
void SherpaOnnxCircularBufferFree(const float *p)
Free an array returned by SherpaOnnxCircularBufferGet().
int32_t SherpaOnnxOnlineSpeechDenoiserGetSampleRate(const SherpaOnnxOnlineSpeechDenoiser *sd)
Return the expected input sample rate for the online denoiser.
void SherpaOnnxVoiceActivityDetectorAcceptWaveform(const SherpaOnnxVoiceActivityDetector *p, const float *samples, int32_t n)
Feed audio samples to the VAD.
const SherpaOnnxSpokenLanguageIdentificationResult * SherpaOnnxSpokenLanguageIdentificationCompute(const SherpaOnnxSpokenLanguageIdentification *slid, const SherpaOnnxOfflineStream *s)
Run spoken-language identification on an offline stream.
struct SherpaOnnxOfflineSourceSeparation SherpaOnnxOfflineSourceSeparation
Opaque source-separation engine handle.
Definition c-api.h:4875
struct SherpaOnnxOfflineSpeakerDiarization SherpaOnnxOfflineSpeakerDiarization
Opaque offline speaker diarization handle.
Definition c-api.h:4348
const SherpaOnnxOnlineStream * SherpaOnnxSpeakerEmbeddingExtractorCreateStream(const SherpaOnnxSpeakerEmbeddingExtractor *p)
Create a streaming feature buffer for embedding extraction.
const SherpaOnnxDenoisedAudio * SherpaOnnxOnlineSpeechDenoiserFlush(const SherpaOnnxOnlineSpeechDenoiser *sd)
Flush buffered samples and reset the online denoiser.
void SherpaOnnxDestroySpeechSegment(const SherpaOnnxSpeechSegment *p)
Destroy a speech segment returned by SherpaOnnxVoiceActivityDetectorFront().
void SherpaOnnxDestroyOnlineStream(const SherpaOnnxOnlineStream *stream)
Destroy a streaming ASR state object.
void SherpaOnnxDestroyVoiceActivityDetector(const SherpaOnnxVoiceActivityDetector *p)
Destroy a voice activity detector.
const SherpaOnnxOfflineDiacritization * SherpaOnnxCreateOfflineDiacritization(const SherpaOnnxOfflineDiacritizationConfig *config)
Create an offline diacritization processor.
const SherpaOnnxOnlineStream * SherpaOnnxCreateOnlineStreamWithHotwords(const SherpaOnnxOnlineRecognizer *recognizer, const char *hotwords)
Create a streaming ASR state object with per-stream hotwords.
void SherpaOnnxVoiceActivityDetectorClear(const SherpaOnnxVoiceActivityDetector *p)
Remove all queued speech segments.
const SherpaOnnxVoiceActivityDetector * SherpaOnnxCreateVoiceActivityDetector(const SherpaOnnxVadModelConfig *config, float buffer_size_in_seconds)
Create a voice activity detector.
const SherpaOnnxSourceSeparationOutput * SherpaOnnxOfflineSourceSeparationProcess(const SherpaOnnxOfflineSourceSeparation *ss, const float *const *samples, int32_t num_channels, int32_t num_samples, int32_t sample_rate)
Run source separation on multi-channel audio.
int64_t SherpaOnnxWaveFileSize(int32_t n_samples)
Return the number of bytes needed for a mono 16-bit WAVE file.
SherpaOnnxOfflineStream * SherpaOnnxSpokenLanguageIdentificationCreateOfflineStream(const SherpaOnnxSpokenLanguageIdentification *slid)
Create an offline stream for spoken-language identification.
const char * SherpaOnnxGetGitSha1()
Return the Git SHA1 used to build the library.
int32_t SherpaOnnxSpeakerEmbeddingManagerDim(const SherpaOnnxSpeakerEmbeddingManager *p)
Return the embedding dimension.
const SherpaOnnxOnlineStream * SherpaOnnxCreateKeywordStream(const SherpaOnnxKeywordSpotter *spotter)
Create a keyword spotting stream using the spotter's built-in keyword list.
void SherpaOnnxDestroyOfflineDiacritization(const SherpaOnnxOfflineDiacritization *diacrt)
Destroy an offline diacritization processor.
const SherpaOnnxForcedAlignmentResult * SherpaOnnxForcedAlignerCompute(const SherpaOnnxForcedAligner *aligner, const SherpaOnnxOfflineStream *stream, const char *text)
Compute the alignment of one utterance.
int32_t SherpaOnnxOfflineTtsNumSpeakers(const SherpaOnnxOfflineTts *tts)
Return the number of available speaker IDs.
const SherpaOnnxOfflineSpeakerDiarizationSegment * SherpaOnnxOfflineSpeakerDiarizationResultSortByStartTime(const SherpaOnnxOfflineSpeakerDiarizationResult *r)
Return segments sorted by start time.
int64_t SherpaOnnxCircularBufferHead(const SherpaOnnxCircularBuffer *buffer)
Return the current head index of the buffer timeline.
struct SherpaOnnxForcedAligner SherpaOnnxForcedAligner
Opaque forced aligner object.
Definition c-api.h:2962
void SherpaOnnxOnlineStreamReset(const SherpaOnnxOnlineRecognizer *recognizer, const SherpaOnnxOnlineStream *stream)
Reset a streaming ASR stream after an endpoint or utterance boundary.
void SherpaOnnxDestroySpokenLanguageIdentificationResult(const SherpaOnnxSpokenLanguageIdentificationResult *r)
Destroy a spoken-language identification result.
const SherpaOnnxOfflineSpeechDenoiser * SherpaOnnxCreateOfflineSpeechDenoiser(const SherpaOnnxOfflineSpeechDenoiserConfig *config)
Create an offline speech denoiser.
struct SherpaOnnxSpeakerEmbeddingExtractor SherpaOnnxSpeakerEmbeddingExtractor
Opaque speaker embedding extractor handle.
Definition c-api.h:3513
void SherpaOnnxDestroyOnlinePunctuation(const SherpaOnnxOnlinePunctuation *punctuation)
Destroy an online punctuation processor.
int32_t(* SherpaOnnxGeneratedAudioCallbackWithArg)(const float *samples, int32_t n, void *arg)
Same as SherpaOnnxGeneratedAudioCallback but with an extra user pointer.
Definition c-api.h:2543
struct SherpaOnnxAudioTagging SherpaOnnxAudioTagging
Opaque audio tagger handle.
Definition c-api.h:3940
int32_t SherpaOnnxOnlineStreamHasOption(const SherpaOnnxOnlineStream *stream, const char *key)
Check whether a per-stream runtime option exists.
struct SherpaOnnxDisplay SherpaOnnxDisplay
Helper for pretty-printing incremental recognition results.
Definition c-api.h:810
const SherpaOnnxAudioTagging * SherpaOnnxCreateAudioTagging(const SherpaOnnxAudioTaggingConfig *config)
Create an audio tagger.
void SherpaOnnxOnlineStreamInputFinished(const SherpaOnnxOnlineStream *stream)
Signal end-of-input for a streaming ASR stream.
void SherpaOnnxDestroyOfflinePunctuation(const SherpaOnnxOfflinePunctuation *punct)
Destroy an offline punctuation processor.
const SherpaOnnxGeneratedAudio * SherpaOnnxOfflineTtsGenerateWithProgressCallbackWithArg(const SherpaOnnxOfflineTts *tts, const char *text, int32_t sid, float speed, SherpaOnnxGeneratedAudioProgressCallbackWithArg callback, void *arg)
Generate speech with a progress callback that receives a user pointer.
int32_t SherpaOnnxWriteWave(const float *samples, int32_t n, int32_t sample_rate, const char *filename)
Write floating-point PCM to a mono 16-bit WAVE file.
const SherpaOnnxOnlineStream * SherpaOnnxCreateOnlineStream(const SherpaOnnxOnlineRecognizer *recognizer)
Create a streaming ASR state object.
const SherpaOnnxGeneratedAudio * SherpaOnnxOfflineTtsGenerateWithCallbackWithArg(const SherpaOnnxOfflineTts *tts, const char *text, int32_t sid, float speed, SherpaOnnxGeneratedAudioCallbackWithArg callback, void *arg)
Same as SherpaOnnxOfflineTtsGenerateWithCallback() but with a user pointer.
int32_t SherpaOnnxSpeakerEmbeddingExtractorDim(const SherpaOnnxSpeakerEmbeddingExtractor *p)
Return the embedding dimension produced by the extractor.
void SherpaOnnxResetKeywordStream(const SherpaOnnxKeywordSpotter *spotter, const SherpaOnnxOnlineStream *stream)
Reset a keyword stream after a keyword is detected.
void SherpaOnnxDecodeOnlineStream(const SherpaOnnxOnlineRecognizer *recognizer, const SherpaOnnxOnlineStream *stream)
Decode one step of a streaming ASR stream.
const SherpaOnnxKeywordResult * SherpaOnnxGetKeywordResult(const SherpaOnnxKeywordSpotter *spotter, const SherpaOnnxOnlineStream *stream)
Get the current keyword spotting result for a stream.
const char * SherpaOnnxOnlineStreamGetOption(const SherpaOnnxOnlineStream *stream, const char *key)
Get a per-stream runtime option.
void SherpaOnnxDestroyDenoisedAudio(const SherpaOnnxDenoisedAudio *p)
Destroy denoised audio returned by a speech enhancement API.
struct SherpaOnnxOfflinePunctuation SherpaOnnxOfflinePunctuation
Opaque offline punctuation handle.
Definition c-api.h:4044
const SherpaOnnxOfflineSpeakerDiarizationResult * SherpaOnnxOfflineSpeakerDiarizationProcessWithCallbackNoArg(const SherpaOnnxOfflineSpeakerDiarization *sd, const float *samples, int32_t n, SherpaOnnxOfflineSpeakerDiarizationProgressCallbackNoArg callback)
Run offline speaker diarization with a progress callback that has no user pointer.
void SherpaOnnxSpeakerEmbeddingManagerFreeBestMatches(const SherpaOnnxSpeakerEmbeddingManagerBestMatchesResult *r)
Destroy a best-matches result.
const SherpaOnnxOnlineRecognizer * SherpaOnnxCreateOnlineRecognizer(const SherpaOnnxOnlineRecognizerConfig *config)
Create a streaming ASR recognizer.
const char * SherpaOnnxGetGitDate()
Return the Git build date used to build the library.
int32_t SherpaOnnxOfflineSourceSeparationGetNumberOfStems(const SherpaOnnxOfflineSourceSeparation *ss)
Return the number of stems produced by the engine.
struct SherpaOnnxVoiceActivityDetector SherpaOnnxVoiceActivityDetector
Opaque voice activity detector handle.
Definition c-api.h:2112
struct SherpaOnnxOfflineDiacritization SherpaOnnxOfflineDiacritization
Opaque offline diacritization handle.
Definition c-api.h:5201
void SherpaOnnxSpeakerEmbeddingManagerDestroyEmbedding(const float *v)
Free an embedding returned by SherpaOnnxSpeakerEmbeddingManagerGetEmbedding().
int32_t SherpaOnnxLinearResamplerResampleGetInputSampleRate(const SherpaOnnxLinearResampler *p)
Return the resampler input sample rate.
const SherpaOnnxCircularBuffer * SherpaOnnxCreateCircularBuffer(int32_t capacity)
Create a floating-point circular buffer.
int32_t(* SherpaOnnxGeneratedAudioProgressCallbackWithArg)(const float *samples, int32_t n, float p, void *arg)
Same as SherpaOnnxGeneratedAudioProgressCallback but with an extra user pointer.
Definition c-api.h:2562
const char * SherpaOnnxGetVersionStr()
Return the sherpa-onnx version string.
int32_t SherpaOnnxWriteWaveMultiChannel(const float *const *samples, int32_t n, int32_t sample_rate, int32_t num_channels, const char *filename)
Write multi-channel audio to a WAVE file (16-bit PCM).
const SherpaOnnxOfflinePunctuation * SherpaOnnxCreateOfflinePunctuation(const SherpaOnnxOfflinePunctuationConfig *config)
Create an offline punctuation processor.
int32_t SherpaOnnxSpeakerEmbeddingManagerAddListFlattened(const SherpaOnnxSpeakerEmbeddingManager *p, const char *name, const float *v, int32_t n)
Add multiple enrollment embeddings packed in one flat array.
void SherpaOnnxPrint(const SherpaOnnxDisplay *display, int32_t idx, const char *s)
Print one line of text using the display helper.
void SherpaOnnxDestroyOfflineTts(const SherpaOnnxOfflineTts *tts)
Destroy an offline TTS engine.
const char * SherpaOfflineDiacritizationAddDiacritics(const SherpaOnnxOfflineDiacritization *diacrt, const char *text)
Add diacritics to a complete input text.
One audio-tagging prediction.
Definition c-api.h:3930
const char * name
Definition c-api.h:3932
Configuration for audio tagging.
Definition c-api.h:3917
SherpaOnnxAudioTaggingModelConfig model
Definition c-api.h:3919
Audio-tagging model configuration.
Definition c-api.h:3888
SherpaOnnxOfflineZipformerAudioTaggingModelConfig zipformer
Definition c-api.h:3890
Denoised audio returned by offline or online speech enhancement APIs.
Definition c-api.h:4692
const float * samples
Definition c-api.h:4694
Fast clustering configuration.
Definition c-api.h:4309
Feature extraction settings for ASR.
Definition c-api.h:291
Configuration of a forced aligner.
Definition c-api.h:3003
SherpaOnnxForcedAlignmentOptions options
Definition c-api.h:3057
Options of a forced aligner. A stream can override any of them via its own option mechanism before th...
Definition c-api.h:2968
The result of SherpaOnnxForcedAlignerCompute().
Definition c-api.h:3116
const SherpaOnnxForcedAlignmentTier * tiers
Definition c-api.h:3137
const SherpaOnnxForcedAlignmentInterval * intervals
Definition c-api.h:3108
Generated waveform returned by TTS APIs.
Definition c-api.h:2519
const float * samples
Definition c-api.h:2521
Generation-time parameters shared by advanced TTS APIs.
Definition c-api.h:2798
const char * reference_text
Definition c-api.h:2812
const float * reference_audio
Definition c-api.h:2806
const char *const * tokens
Definition c-api.h:2847
const int32_t * phoneme_codepoints
Definition c-api.h:2828
int32_t phoneme_codepoints_num_sentences
Definition c-api.h:2836
const int32_t * tokens_lens
Definition c-api.h:2851
const int32_t * phoneme_codepoints_lens
Definition c-api.h:2833
Configuration for homophone replacement.
Definition c-api.h:316
Snapshot of the current keyword spotting result.
Definition c-api.h:1623
const char * keyword
Definition c-api.h:1630
const char * json
Definition c-api.h:1665
const char *const * tokens_arr
Definition c-api.h:1644
const char * tokens
Definition c-api.h:1637
Configuration for keyword spotting.
Definition c-api.h:1709
SherpaOnnxOnlineModelConfig model_config
Definition c-api.h:1713
SherpaOnnxFeatureConfig feat_config
Definition c-api.h:1711
Decoded multi-channel WAVE file content.
Definition c-api.h:3308
const float *const * samples
Definition c-api.h:3313
Configuration for a Canary model.
Definition c-api.h:897
Configuration for a Cohere Transcribe model.
Definition c-api.h:911
Configuration for HLG/FST-based offline CTC decoding.
Definition c-api.h:308
Configuration for offline diacritization.
Definition c-api.h:5195
SherpaOnnxOfflineDiacritizationModelConfig model
Definition c-api.h:5197
Offline diacritization model configuration.
Definition c-api.h:5181
Configuration for a Dolphin model.
Definition c-api.h:977
Configuration for a FireRedAsr CTC model.
Definition c-api.h:933
Configuration for a FireRedAsr encoder/decoder model.
Definition c-api.h:925
Configuration for an offline FunASR Nano model.
Definition c-api.h:1001
Configuration for an offline language model.
Definition c-api.h:959
const char * model
Definition c-api.h:961
Configuration for a MedASR CTC model.
Definition c-api.h:1056
Model configuration shared by offline ASR recognizers.
Definition c-api.h:1078
SherpaOnnxOfflineQwen3ASRModelConfig qwen3_asr
Definition c-api.h:1129
SherpaOnnxOfflineParaformerModelConfig paraformer
Definition c-api.h:1082
const char * modeling_unit
Definition c-api.h:1101
SherpaOnnxOfflineDolphinModelConfig dolphin
Definition c-api.h:1113
SherpaOnnxOfflineCanaryModelConfig canary
Definition c-api.h:1117
SherpaOnnxOfflineMoonshineModelConfig moonshine
Definition c-api.h:1109
SherpaOnnxOfflineFunASRNanoModelConfig funasr_nano
Definition c-api.h:1125
const char * telespeech_ctc
Definition c-api.h:1105
SherpaOnnxOfflineFireRedAsrCtcModelConfig fire_red_asr_ctc
Definition c-api.h:1127
SherpaOnnxOfflineOmnilingualAsrCtcModelConfig omnilingual
Definition c-api.h:1121
SherpaOnnxOfflineSenseVoiceModelConfig sense_voice
Definition c-api.h:1107
SherpaOnnxOfflineWhisperModelConfig whisper
Definition c-api.h:1086
SherpaOnnxOfflineTdnnModelConfig tdnn
Definition c-api.h:1088
SherpaOnnxOfflineNemoEncDecCtcModelConfig nemo_ctc
Definition c-api.h:1084
SherpaOnnxOfflineMedAsrCtcModelConfig medasr
Definition c-api.h:1123
SherpaOnnxOfflineFireRedAsrModelConfig fire_red_asr
Definition c-api.h:1111
SherpaOnnxOfflineCohereTranscribeModelConfig cohere_transcribe
Definition c-api.h:1131
SherpaOnnxOfflineZipformerCtcModelConfig zipformer_ctc
Definition c-api.h:1115
SherpaOnnxOfflineTransducerModelConfig transducer
Definition c-api.h:1080
SherpaOnnxOfflineWenetCtcModelConfig wenet_ctc
Definition c-api.h:1119
Configuration for a Moonshine model.
Definition c-api.h:939
Configuration for a non-streaming NeMo CTC model.
Definition c-api.h:869
Configuration for an omnilingual offline CTC model.
Definition c-api.h:995
Configuration for a non-streaming Paraformer model.
Definition c-api.h:863
Configuration for offline punctuation.
Definition c-api.h:4038
SherpaOnnxOfflinePunctuationModelConfig model
Definition c-api.h:4040
Offline punctuation model configuration.
Definition c-api.h:4026
Configuration for an offline Qwen3-ASR model.
Definition c-api.h:1031
Configuration for a non-streaming ASR recognizer.
Definition c-api.h:1188
SherpaOnnxOfflineModelConfig model_config
Definition c-api.h:1192
SherpaOnnxFeatureConfig feat_config
Definition c-api.h:1190
SherpaOnnxHomophoneReplacerConfig hr
Definition c-api.h:1214
SherpaOnnxOfflineLMConfig lm_config
Definition c-api.h:1194
SherpaOnnxOfflineCtcFstDecoderConfig ctc_fst_decoder_config
Definition c-api.h:1217
Recognition result for a non-streaming ASR stream.
Definition c-api.h:1485
const char *const * segment_texts_arr
Definition c-api.h:1541
const char *const * tokens_arr
Definition c-api.h:1509
Configuration for a SenseVoice model.
Definition c-api.h:967
Top-level source-separation configuration.
Definition c-api.h:4870
SherpaOnnxOfflineSourceSeparationModelConfig model
Definition c-api.h:4871
Source-separation model configuration.
Definition c-api.h:4861
SherpaOnnxOfflineSourceSeparationUvrModelConfig uvr
Definition c-api.h:4863
SherpaOnnxOfflineSourceSeparationSpleeterModelConfig spleeter
Definition c-api.h:4862
Spleeter source-separation model configuration.
Definition c-api.h:4847
UVR (MDX-Net) source-separation model configuration.
Definition c-api.h:4855
Configuration for offline speaker diarization.
Definition c-api.h:4334
SherpaOnnxFastClusteringConfig clustering
Definition c-api.h:4340
SherpaOnnxSpeakerEmbeddingExtractorConfig embedding
Definition c-api.h:4338
SherpaOnnxOfflineSpeakerSegmentationModelConfig segmentation
Definition c-api.h:4336
Segmentation model configuration for offline speaker diarization.
Definition c-api.h:4291
SherpaOnnxOfflineSpeakerSegmentationPyannoteModelConfig pyannote
Definition c-api.h:4293
Pyannote speaker-segmentation model configuration.
Definition c-api.h:4273
Configuration for offline speech denoising.
Definition c-api.h:4624
SherpaOnnxOfflineSpeechDenoiserModelConfig model
Definition c-api.h:4626
DPDFNet offline denoiser model configuration.
Definition c-api.h:4550
GTCRN offline denoiser model configuration.
Definition c-api.h:4544
Speech denoiser model configuration shared by offline and online APIs.
Definition c-api.h:4608
SherpaOnnxOfflineSpeechDenoiserGtcrnModelConfig gtcrn
Definition c-api.h:4610
SherpaOnnxOfflineSpeechDenoiserVoxLockModelConfig voxlock
Definition c-api.h:4620
SherpaOnnxOfflineSpeechDenoiserDpdfNetModelConfig dpdfnet
Definition c-api.h:4618
VoxLock target-speaker voice isolation model configuration.
Definition c-api.h:4570
Configuration for a TDNN model.
Definition c-api.h:953
Configuration for a non-streaming transducer model.
Definition c-api.h:853
Configuration for offline text-to-speech.
Definition c-api.h:2499
const char * rule_fars
Definition c-api.h:2507
SherpaOnnxOfflineTtsModelConfig model
Definition c-api.h:2501
const char * rule_fsts
Definition c-api.h:2503
Configuration for a Kitten TTS model.
Definition c-api.h:2352
Configuration for a Kokoro TTS model.
Definition c-api.h:2327
Configuration for a Matcha TTS model.
Definition c-api.h:2302
Configuration shared by offline TTS models.
Definition c-api.h:2456
SherpaOnnxOfflineTtsVitsModelConfig vits
Definition c-api.h:2458
SherpaOnnxOfflineTtsKokoroModelConfig kokoro
Definition c-api.h:2468
SherpaOnnxOfflineTtsSupertonicModelConfig supertonic
Definition c-api.h:2476
SherpaOnnxOfflineTtsKittenModelConfig kitten
Definition c-api.h:2470
SherpaOnnxOfflineTtsPocketModelConfig pocket
Definition c-api.h:2474
SherpaOnnxOfflineTtsMatchaModelConfig matcha
Definition c-api.h:2466
SherpaOnnxOfflineTtsZipvoiceModelConfig zipvoice
Definition c-api.h:2472
Configuration for a Pocket TTS model.
Definition c-api.h:2402
Configuration for a Supertonic TTS model.
Definition c-api.h:2422
Configuration for a VITS TTS model.
Definition c-api.h:2277
Configuration for a ZipVoice TTS model.
Definition c-api.h:2373
Configuration for an offline WeNet CTC model.
Definition c-api.h:989
Configuration for a non-streaming Whisper model.
Definition c-api.h:877
Zipformer audio-tagging model configuration.
Definition c-api.h:3865
Configuration for an offline Zipformer CTC model.
Definition c-api.h:983
Configuration for HLG/FST-based online CTC decoding.
Definition c-api.h:300
Model configuration shared by streaming ASR recognizers.
Definition c-api.h:246
const char * model_type
Definition c-api.h:262
SherpaOnnxOnlineZipformer2CtcModelConfig zipformer2_ctc
Definition c-api.h:252
const char * modeling_unit
Definition c-api.h:271
SherpaOnnxOnlineNemoCtcModelConfig nemo_ctc
Definition c-api.h:280
const char * provider
Definition c-api.h:258
SherpaOnnxOnlineToneCtcModelConfig t_one_ctc
Definition c-api.h:282
const char * bpe_vocab
Definition c-api.h:273
const char * tokens_buf
Definition c-api.h:276
SherpaOnnxOnlineTransducerModelConfig transducer
Definition c-api.h:248
SherpaOnnxOnlineParaformerModelConfig paraformer
Definition c-api.h:250
Configuration for a streaming NeMo CTC model.
Definition c-api.h:220
Configuration for a streaming Paraformer model.
Definition c-api.h:204
Configuration for online punctuation.
Definition c-api.h:4115
SherpaOnnxOnlinePunctuationModelConfig model
Definition c-api.h:4117
Online punctuation model configuration.
Definition c-api.h:4101
Configuration for a streaming ASR recognizer.
Definition c-api.h:360
SherpaOnnxOnlineCtcFstDecoderConfig ctc_fst_decoder_config
Definition c-api.h:391
SherpaOnnxOnlineModelConfig model_config
Definition c-api.h:364
SherpaOnnxHomophoneReplacerConfig hr
Definition c-api.h:404
SherpaOnnxFeatureConfig feat_config
Definition c-api.h:362
Incremental recognition result for a streaming ASR stream.
Definition c-api.h:415
const char *const * tokens_arr
Definition c-api.h:427
Configuration for streaming speech denoising.
Definition c-api.h:4739
SherpaOnnxOfflineSpeechDenoiserModelConfig model
Definition c-api.h:4741
Configuration for a streaming T-One CTC model.
Definition c-api.h:226
Configuration for a streaming transducer model.
Definition c-api.h:188
Configuration for a streaming Zipformer2 CTC model.
Definition c-api.h:214
Output chunk returned by SherpaOnnxLinearResamplerResample().
Definition c-api.h:4220
const float * samples
Definition c-api.h:4222
Configuration for a Silero VAD model.
Definition c-api.h:1899
Output of a source-separation run.
Definition c-api.h:4930
const SherpaOnnxSourceSeparationStem * stems
Definition c-api.h:4932
A single stem (one output track) with one or more channels.
Definition c-api.h:4920
Configuration for speaker embedding extraction.
Definition c-api.h:3501
Collection of best speaker matches.
Definition c-api.h:3741
const SherpaOnnxSpeakerEmbeddingManagerSpeakerMatch * matches
Definition c-api.h:3743
One speaker match returned by the best-matches API.
Definition c-api.h:3729
One detected speech segment returned by the VAD.
Definition c-api.h:2097
Configuration for spoken language identification.
Definition c-api.h:3381
SherpaOnnxSpokenLanguageIdentificationWhisperConfig whisper
Definition c-api.h:3383
Result of spoken-language identification.
Definition c-api.h:3438
Whisper-based model files for spoken language identification.
Definition c-api.h:3356
Configuration for a Ten VAD model.
Definition c-api.h:1920
Configuration shared by voice activity detectors.
Definition c-api.h:1972
SherpaOnnxSileroVadModelConfig silero_vad
Definition c-api.h:1974
SherpaOnnxTenVadModelConfig ten_vad
Definition c-api.h:1984
const char * provider
Definition c-api.h:1980
Decoded mono WAVE file content.
Definition c-api.h:3257
int32_t num_samples
Definition c-api.h:3263
const float * samples
Definition c-api.h:3259
int32_t sample_rate
Definition c-api.h:3261