Files
sherpa-onnx/pascal-api-examples
Fangjun Kuang f2e01fe8e3 Widen VAD sample positions to int64_t to fix long-stream SIGSEGV. (#4079)
Fixes #3635

It is for v2.0.0 and breaks the ABI.

CircularBuffer::head_ and tail_ are absolute sample counters that grow
forever. As int32_t they overflow after 2^31 samples (~37 h at 16 kHz);
tail_ % capacity then goes negative and std::copy() writes to an invalid
iterator, crashing long-running VAD streams.

Widen every absolute stream position to int64_t. Counts and capacities
(Push/Pop/Get's n, Size(), capacity) stay int32_t — they are bounded by
buffer memory, not stream duration.
2026-10-22 23:39:59 +08:00
..

Introduction

This directory contains examples for how to use the Object Pascal APIs of sherpa-onnx.

Documentation for this directory: https://k2-fsa.github.io/sherpa/onnx/pascal-api/index.html

Directory Description
read-wav It shows how to read a wave file.
speaker-diarization It shows how to use Pascal API for speaker diarization.
speech-enhancement-gtcrn It shows how to use the offline speech denoiser API with GTCRN.
speech-enhancement-dpdfnet It shows how to use the offline speech denoiser API with DPDFNet. Use dpdfnet_baseline.onnx, dpdfnet2.onnx, dpdfnet4.onnx, or dpdfnet8.onnx for 16 kHz downstream ASR and dpdfnet2_48khz_hr.onnx for 48 kHz enhancement output.
streaming-speech-enhancement-gtcrn It shows how to use the streaming speech denoiser API with GTCRN.
streaming-speech-enhancement-dpdfnet It shows how to use the streaming speech denoiser API with DPDFNet.
streaming-asr It shows how to use streaming models for speech recognition.
non-streaming-asr It shows how to use non-streaming models for speech recognition.
vad It shows how to use the voice activity detection API.
vad-with-non-streaming-asr It shows how to use the voice activity detection API with non-streaming models for speech recognition.
portaudio-test It shows how to use PortAudio for recording and playing.
tts It shows how to use the text-to-speech API.