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  AudioEvent
 One audio-tagging event returned by the C++ wrapper. More...
 
class  AudioTagging
 RAII wrapper for audio tagging. More...
 
struct  AudioTaggingConfig
 Configuration for audio tagging. More...
 
struct  AudioTaggingModelConfig
 Audio-tagging model configuration. More...
 
class  CircularBuffer
 RAII wrapper for the circular buffer helper used by VAD. More...
 
struct  DenoisedAudio
 Denoised waveform returned by speech enhancement wrappers. More...
 
struct  FeatureConfig
 Feature extraction settings shared by ASR and KWS wrappers. More...
 
struct  GeneratedAudio
 Generated audio returned by the C++ TTS wrapper. More...
 
struct  GenerationConfig
 Generation-time options for advanced TTS synthesis. More...
 
struct  HomophoneReplacerConfig
 Homophone replacement resources used by some Chinese ASR setups. More...
 
struct  KeywordResult
 Current keyword spotting result copied into C++ containers. More...
 
class  KeywordSpotter
 RAII wrapper for keyword spotting. More...
 
struct  KeywordSpotterConfig
 Configuration for the C++ keyword spotting wrapper. More...
 
class  LinearResampler
 RAII wrapper for linear resampling. More...
 
class  MoveOnly
 Base class for move-only RAII wrappers around C handles. More...
 
struct  OfflineCanaryModelConfig
 Offline Canary model configuration. More...
 
struct  OfflineCohereTranscribeModelConfig
 Offline Cohere Transcribe model configuration. More...
 
struct  OfflineDolphinModelConfig
 Offline Dolphin model file. More...
 
struct  OfflineFireRedAsrCtcModelConfig
 Offline FireRed ASR CTC model file. More...
 
struct  OfflineFireRedAsrModelConfig
 Offline FireRed ASR model files. More...
 
struct  OfflineFunASRNanoModelConfig
 Offline FunASR Nano model configuration. More...
 
struct  OfflineLMConfig
 Optional language-model rescoring configuration for offline ASR. More...
 
struct  OfflineMedAsrCtcModelConfig
 Offline MedASR CTC model file. More...
 
struct  OfflineModelConfig
 Acoustic model configuration for offline ASR. More...
 
struct  OfflineMoonshineModelConfig
 Offline Moonshine model configuration. More...
 
struct  OfflineNemoEncDecCtcModelConfig
 Offline NeMo EncDec CTC model file. More...
 
struct  OfflineOmnilingualAsrCtcModelConfig
 Offline omnilingual ASR CTC model file. More...
 
struct  OfflineParaformerModelConfig
 Offline Paraformer model file. More...
 
class  OfflinePunctuation
 RAII wrapper for offline punctuation restoration. More...
 
struct  OfflinePunctuationConfig
 Configuration for offline punctuation. More...
 
struct  OfflinePunctuationModelConfig
 Offline punctuation model configuration. More...
 
struct  OfflineQwen3ASRModelConfig
 Offline Qwen3-ASR model configuration. More...
 
class  OfflineRecognizer
 RAII wrapper for an offline recognizer. More...
 
struct  OfflineRecognizerConfig
 Configuration for offline ASR. More...
 
struct  OfflineRecognizerResult
 Offline ASR result copied into C++ containers. More...
 
struct  OfflineSenseVoiceModelConfig
 Offline SenseVoice model configuration. More...
 
class  OfflineSourceSeparation
 RAII wrapper for offline source separation. More...
 
struct  OfflineSourceSeparationConfig
 Configuration for offline source separation. More...
 
struct  OfflineSourceSeparationModelConfig
 Source-separation model configuration. More...
 
struct  OfflineSourceSeparationSpleeterModelConfig
 Spleeter source-separation model configuration. More...
 
struct  OfflineSourceSeparationUvrModelConfig
 UVR (MDX-Net) source-separation model configuration. More...
 
class  OfflineSpeechDenoiser
 RAII wrapper for offline speech denoising. More...
 
struct  OfflineSpeechDenoiserConfig
 Configuration for offline speech denoising. More...
 
struct  OfflineSpeechDenoiserDpdfNetModelConfig
 DPDFNet speech denoiser model configuration. More...
 
struct  OfflineSpeechDenoiserGtcrnModelConfig
 GTCRN speech denoiser model configuration. More...
 
struct  OfflineSpeechDenoiserModelConfig
 Speech denoiser model configuration. More...
 
class  OfflineStream
 RAII wrapper for an offline decoding stream. More...
 
struct  OfflineTdnnModelConfig
 Offline TDNN model file. More...
 
struct  OfflineTransducerModelConfig
 Offline transducer model files. More...
 
class  OfflineTts
 RAII wrapper for offline TTS. More...
 
struct  OfflineTtsConfig
 Configuration for offline TTS. More...
 
struct  OfflineTtsKittenModelConfig
 Kitten model configuration. More...
 
struct  OfflineTtsKokoroModelConfig
 Kokoro model configuration. More...
 
struct  OfflineTtsMatchaModelConfig
 Matcha model configuration. More...
 
struct  OfflineTtsModelConfig
 Model configuration for offline TTS. More...
 
struct  OfflineTtsPocketModelConfig
 Pocket TTS model configuration. More...
 
struct  OfflineTtsSupertonicModelConfig
 Supertonic model configuration. More...
 
struct  OfflineTtsVitsModelConfig
 VITS model configuration. More...
 
struct  OfflineTtsZipvoiceModelConfig
 ZipVoice model configuration. More...
 
struct  OfflineWenetCtcModelConfig
 Offline WeNet CTC model file. More...
 
struct  OfflineWhisperModelConfig
 Offline Whisper model configuration. More...
 
struct  OfflineZipformerAudioTaggingModelConfig
 Zipformer audio-tagging model configuration. More...
 
struct  OfflineZipformerCtcModelConfig
 Offline Zipformer CTC model file. More...
 
struct  OnlineCtcFstDecoderConfig
 Decoder graph configuration for online CTC + FST decoding. More...
 
struct  OnlineModelConfig
 Acoustic model configuration for streaming ASR. More...
 
struct  OnlineNemoCtcModelConfig
 Streaming NeMo CTC model file. More...
 
struct  OnlineParaformerModelConfig
 Streaming Paraformer model files. More...
 
class  OnlinePunctuation
 RAII wrapper for online punctuation restoration. More...
 
struct  OnlinePunctuationConfig
 Configuration for online punctuation. More...
 
struct  OnlinePunctuationModelConfig
 Online punctuation model configuration. More...
 
class  OnlineRecognizer
 RAII wrapper for a streaming recognizer. More...
 
struct  OnlineRecognizerConfig
 Configuration for streaming ASR. More...
 
struct  OnlineRecognizerResult
 Current streaming ASR result copied into C++ containers. More...
 
class  OnlineSpeechDenoiser
 RAII wrapper for online speech denoising. More...
 
struct  OnlineSpeechDenoiserConfig
 Configuration for online speech denoising. More...
 
class  OnlineStream
 
struct  OnlineToneCtcModelConfig
 Streaming T-One CTC model file. More...
 
struct  OnlineTransducerModelConfig
 Streaming transducer model files. More...
 
struct  OnlineZipformer2CtcModelConfig
 Streaming Zipformer2 CTC model file. More...
 
struct  SileroVadModelConfig
 Silero VAD model configuration. More...
 
struct  SourceSeparationOutput
 Output of a source-separation run. More...
 
struct  SourceSeparationStem
 A single stem (output track) with one or more channels. More...
 
struct  SpeechSegment
 One speech segment produced by the VAD wrapper. More...
 
struct  TenVadModelConfig
 Ten VAD model configuration. More...
 
struct  VadModelConfig
 VAD model configuration. More...
 
class  VoiceActivityDetector
 RAII wrapper for voice activity detection. More...
 
struct  Wave
 Mono PCM waveform used by the helper I/O functions. More...
 

Typedefs

using OfflineTtsCallback = int32_t(*)(const float *samples, int32_t num_samples, float progress, void *arg)
 TTS progress callback.
 

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.
 
bool FileExists (const std::string &filename)
 Return true if a file exists.
 

Typedef Documentation

◆ OfflineTtsCallback

using sherpa_onnx::cxx::OfflineTtsCallback = typedef 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 1063 of file cxx-api.h.

Function Documentation

◆ FileExists()

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

◆ GetGitDate()

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

◆ GetGitSha1()

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

◆ GetVersionStr()

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

◆ 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.

◆ 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.