sherpa-onnx C API 1.0
Public C API and C++ wrapper for sherpa-onnx
Loading...
Searching...
No Matches
SherpaOnnxSpeechSegment Struct Reference

One detected speech segment returned by the VAD. More...

#include <c-api.h>

Public Attributes

int64_t start
float * samples
int32_t n

Detailed Description

The segment owns samples. Free the whole object with SherpaOnnxDestroySpeechSegment().

See also
SherpaOnnxVoiceActivityDetectorFront, SherpaOnnxDestroySpeechSegment

Definition at line 2097 of file c-api.h.

Member Data Documentation

◆ n

int32_t SherpaOnnxSpeechSegment::n

Number of samples in samples.

Definition at line 2108 of file c-api.h.

◆ samples

float* SherpaOnnxSpeechSegment::samples

Newly allocated mono samples for this segment.

Definition at line 2106 of file c-api.h.

◆ start

int64_t SherpaOnnxSpeechSegment::start

Start index, in input samples, of this segment.

It is an absolute position in the input stream and keeps increasing during the lifetime of a detector, so it is 64-bit. It is -1 if the segment is not valid.

Definition at line 2104 of file c-api.h.


The documentation for this struct was generated from the following file: