sherpa-onnx C API 1.0
Public C API and C++ wrapper for sherpa-onnx
Loading...
Searching...
No Matches
sherpa_onnx::cxx Namespace Reference

Classes

struct  OnlineTransducerModelConfig
 Streaming transducer model files. More...
struct  OnlineParaformerModelConfig
 Streaming Paraformer model files. More...
struct  OnlineZipformer2CtcModelConfig
 Streaming Zipformer2 CTC model file. More...
struct  OnlineNemoCtcModelConfig
 Streaming NeMo CTC model file. More...
struct  OnlineToneCtcModelConfig
 Streaming T-One CTC model file. More...
struct  OnlineModelConfig
 Acoustic model configuration for streaming ASR. More...
struct  FeatureConfig
 Feature extraction settings shared by ASR and KWS wrappers. More...
struct  OnlineCtcFstDecoderConfig
 Decoder graph configuration for online CTC + FST decoding. More...
struct  HomophoneReplacerConfig
 Homophone replacement resources used by some Chinese ASR setups. More...
struct  OnlineRecognizerConfig
 Configuration for streaming ASR. More...
struct  OnlineRecognizerResult
 Current streaming ASR result copied into C++ containers. More...
struct  Wave
 Mono PCM waveform used by the helper I/O functions. More...
class  MoveOnly
 Base class for move-only RAII wrappers around C handles. More...
class  OnlineStream
class  OnlineRecognizer
 RAII wrapper for a streaming recognizer. More...
struct  OfflineTransducerModelConfig
 Offline transducer model files. More...
struct  OfflineParaformerModelConfig
 Offline Paraformer model file. More...
struct  OfflineNemoEncDecCtcModelConfig
 Offline NeMo EncDec CTC model file. More...
struct  OfflineWhisperModelConfig
 Offline Whisper model configuration. More...
struct  OfflineCanaryModelConfig
 Offline Canary model configuration. More...
struct  OfflineCohereTranscribeModelConfig
 Offline Cohere Transcribe model configuration. More...
struct  OfflineFireRedAsrModelConfig
 Offline FireRed ASR model files. More...
struct  OfflineFireRedAsrCtcModelConfig
 Offline FireRed ASR CTC model file. More...
struct  OfflineTdnnModelConfig
 Offline TDNN model file. More...
struct  OfflineSenseVoiceModelConfig
 Offline SenseVoice model configuration. More...
struct  OfflineDolphinModelConfig
 Offline Dolphin model file. More...
struct  OfflineZipformerCtcModelConfig
 Offline Zipformer CTC model file. More...
struct  OfflineWenetCtcModelConfig
 Offline WeNet CTC model file. More...
struct  OfflineOmnilingualAsrCtcModelConfig
 Offline omnilingual ASR CTC model file. More...
struct  OfflineMedAsrCtcModelConfig
 Offline MedASR CTC model file. More...
struct  OfflineMoonshineModelConfig
 Offline Moonshine model configuration. More...
struct  OfflineFunASRNanoModelConfig
 Offline FunASR Nano model configuration. More...
struct  OfflineQwen3ASRModelConfig
 Offline Qwen3-ASR model configuration. More...
struct  OfflineModelConfig
 Acoustic model configuration for offline ASR. More...
struct  OfflineLMConfig
 Optional language-model rescoring configuration for offline ASR. More...
struct  OfflineCtcFstDecoderConfig
 Decoder graph configuration for offline CTC + FST decoding. More...
struct  OfflineRecognizerConfig
 Configuration for offline ASR. More...
struct  OfflineRecognizerResult
 Offline ASR result copied into C++ containers. More...
class  OfflineStream
 RAII wrapper for an offline decoding stream. More...
class  OfflineRecognizer
 RAII wrapper for an offline recognizer. More...
struct  ForcedAlignmentOptions
 Options of a forced aligner. More...
struct  ForcedAlignerConfig
 Configuration of a forced aligner. More...
struct  ForcedAlignmentInterval
 One aligned interval: a phone in the "phones" tier or a word in the "words" tier. More...
struct  ForcedAlignmentTier
 One tier of the alignment (phones or words). More...
struct  ForcedAlignmentResult
 The result of ForcedAligner::Compute(). More...
class  ForcedAligner
 RAII wrapper for a forced aligner. More...
struct  OfflineTtsVitsModelConfig
 VITS model configuration. More...
struct  OfflineTtsMatchaModelConfig
 Matcha model configuration. More...
struct  OfflineTtsKokoroModelConfig
 Kokoro model configuration. More...
struct  OfflineTtsKittenModelConfig
 Kitten model configuration. More...
struct  OfflineTtsZipvoiceModelConfig
 ZipVoice model configuration. More...
struct  OfflineTtsPocketModelConfig
 Pocket TTS model configuration. More...
struct  OfflineTtsSupertonicModelConfig
 Supertonic model configuration. More...
struct  OfflineTtsModelConfig
 Model configuration for offline TTS. More...
struct  GenerationConfig
 Generation-time options for advanced TTS synthesis. More...
struct  OfflineTtsConfig
 Configuration for offline TTS. More...
struct  GeneratedAudio
 Generated audio returned by the C++ TTS wrapper. More...
class  OfflineTts
 RAII wrapper for offline TTS. More...
struct  KeywordResult
 Current keyword spotting result copied into C++ containers. More...
struct  KeywordSpotterConfig
 Configuration for the C++ keyword spotting wrapper. More...
class  KeywordSpotter
 RAII wrapper for keyword spotting. More...
struct  OfflineSpeechDenoiserGtcrnModelConfig
 GTCRN speech denoiser model configuration. More...
struct  OfflineSpeechDenoiserDpdfNetModelConfig
 DPDFNet speech denoiser model configuration. More...
struct  OfflineSpeechDenoiserVoxLockModelConfig
 VoxLock target-speaker voice isolation model configuration. More...
struct  OfflineSpeechDenoiserModelConfig
 Speech denoiser model configuration. More...
struct  OfflineSpeechDenoiserConfig
 Configuration for offline speech denoising. More...
struct  DenoisedAudio
 Denoised waveform returned by speech enhancement wrappers. More...
class  OfflineSpeechDenoiser
 RAII wrapper for offline speech denoising. More...
struct  OnlineSpeechDenoiserConfig
 Configuration for online speech denoising. More...
class  OnlineSpeechDenoiser
 RAII wrapper for online speech denoising. More...
struct  SileroVadModelConfig
 Silero VAD model configuration. More...
struct  TenVadModelConfig
 Ten VAD model configuration. More...
struct  VadModelConfig
 VAD model configuration. More...
struct  SpeechSegment
 One speech segment produced by the VAD wrapper. More...
class  CircularBuffer
 RAII wrapper for the circular buffer helper used by VAD. More...
class  VoiceActivityDetector
 RAII wrapper for voice activity detection. More...
class  LinearResampler
 RAII wrapper for linear resampling. More...
struct  OfflinePunctuationModelConfig
 Offline punctuation model configuration. More...
struct  OfflinePunctuationConfig
 Configuration for offline punctuation. More...
class  OfflinePunctuation
 RAII wrapper for offline punctuation restoration. More...
struct  OnlinePunctuationModelConfig
 Online punctuation model configuration. More...
struct  OnlinePunctuationConfig
 Configuration for online punctuation. More...
class  OnlinePunctuation
 RAII wrapper for online punctuation restoration. More...
struct  OfflineZipformerAudioTaggingModelConfig
 Zipformer audio-tagging model configuration. More...
struct  AudioTaggingModelConfig
 Audio-tagging model configuration. More...
struct  AudioTaggingConfig
 Configuration for audio tagging. More...
struct  AudioEvent
 One audio-tagging event returned by the C++ wrapper. More...
class  AudioTagging
 RAII wrapper for audio tagging. More...
struct  OfflineSourceSeparationSpleeterModelConfig
 Spleeter source-separation model configuration. More...
struct  OfflineSourceSeparationUvrModelConfig
 UVR (MDX-Net) source-separation model configuration. More...
struct  OfflineSourceSeparationModelConfig
 Source-separation model configuration. More...
struct  OfflineSourceSeparationConfig
 Configuration for offline source separation. More...
struct  SourceSeparationStem
 A single stem (output track) with one or more channels. More...
struct  SourceSeparationOutput
 Output of a source-separation run. More...
class  OfflineSourceSeparation
 RAII wrapper for offline source separation. More...
struct  SpokenLanguageIdentificationWhisperConfig
 Whisper model configuration for spoken language identification. More...
struct  SpokenLanguageIdentificationConfig
 Configuration for spoken language identification. More...
struct  SpokenLanguageIdentificationResult
 Result of spoken language identification. More...
class  SpokenLanguageIdentification
 RAII wrapper for spoken language identification. More...
struct  SpeakerEmbeddingExtractorConfig
 Configuration for speaker embedding extraction. More...
class  SpeakerEmbeddingExtractor
 RAII wrapper for speaker embedding extraction. More...
struct  SpeakerMatch
 One speaker match returned by the best-matches API. More...
class  SpeakerEmbeddingManager
 RAII wrapper for speaker embedding management. More...
struct  OfflineSpeakerSegmentationPyannoteModelConfig
 Pyannote segmentation model configuration. More...
struct  OfflineSpeakerSegmentationModelConfig
 Segmentation model configuration for offline speaker diarization. More...
struct  FastClusteringConfig
 Fast clustering configuration. More...
struct  OfflineSpeakerDiarizationConfig
 Configuration for offline speaker diarization. More...
struct  OfflineSpeakerDiarizationSegment
 One diarization segment. More...
class  OfflineSpeakerDiarization
 RAII wrapper for offline speaker diarization. More...
struct  OfflineDiacritizationModelConfig
 Offline diacritization model configuration. More...
struct  OfflineDiacritizationConfig
 Configuration for offline diacritization. More...
class  OfflineDiacritization
 RAII wrapper for offline diacritization. More...

Typedefs

using OfflineTtsCallback
 TTS progress callback.
using OfflineSpeakerDiarizationProgressCallback
 Progress callback for offline speaker diarization.

Functions

Wave ReadWave (const std::string &filename)
 Read a mono WAVE file into a C++ value object.
bool WriteWave (const std::string &filename, const Wave &wave)
 Write a mono WAVE file from a C++ value object.
std::string GetVersionStr ()
 Return the sherpa-onnx version string as a C++ string.
std::string GetGitSha1 ()
 Return the build Git SHA1 as a C++ string.
std::string GetGitDate ()
 Return the build Git date as a C++ string.
std::string GetOnnxruntimeVersionStr ()
 Return the onnxruntime version string as a C++ string.
bool FileExists (const std::string &filename)
 Return true if a file exists.

Typedef Documentation

◆ OfflineSpeakerDiarizationProgressCallback

Initial value:
std::function<void(int32_t, int32_t)>

Called as (num_processed_chunks, num_total_chunks).

Definition at line 2314 of file cxx-api.h.

◆ OfflineTtsCallback

Initial value:
int32_t (*)(const float *samples,
int32_t num_samples, float progress,
void *arg)

Return 1 to continue generating and 0 to stop early.

Definition at line 1355 of file cxx-api.h.

Function Documentation

◆ FileExists()

bool sherpa_onnx::cxx::FileExists ( const std::string & filename)

References SHERPA_ONNX_API.

◆ GetGitDate()

std::string sherpa_onnx::cxx::GetGitDate ( )

References SHERPA_ONNX_API.

◆ GetGitSha1()

std::string sherpa_onnx::cxx::GetGitSha1 ( )

References SHERPA_ONNX_API.

◆ GetOnnxruntimeVersionStr()

std::string sherpa_onnx::cxx::GetOnnxruntimeVersionStr ( )

References SHERPA_ONNX_API.

◆ GetVersionStr()

std::string sherpa_onnx::cxx::GetVersionStr ( )

References SHERPA_ONNX_API.

◆ ReadWave()

Wave sherpa_onnx::cxx::ReadWave ( const std::string & filename)

On failure, the returned wave has samples.empty() == true.

Parameters
filenameInput WAVE filename.
Returns
Decoded wave data.

References SHERPA_ONNX_API.

◆ WriteWave()

bool sherpa_onnx::cxx::WriteWave ( const std::string & filename,
const Wave & wave )
Parameters
filenameOutput filename.
wavePCM samples and sample rate to write.
Returns
true on success; false on failure.

References SHERPA_ONNX_API.