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

Incremental recognition result for a streaming ASR stream. More...

#include <c-api.h>

Public Attributes

const char * text
 
const char * tokens
 
const char *const * tokens_arr
 
float * timestamps
 
int32_t count
 
const char * json
 

Detailed Description

All pointers in this struct are owned by the result object returned from SherpaOnnxGetOnlineStreamResult() and become invalid after SherpaOnnxDestroyOnlineRecognizerResult() is called.

See also
SherpaOnnxGetOnlineStreamResult

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

Member Data Documentation

◆ count

int32_t SherpaOnnxOnlineRecognizerResult::count

Number of entries in tokens_arr and, when available, timestamps.

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

◆ json

const char* SherpaOnnxOnlineRecognizerResult::json

JSON serialization of the result.

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

◆ text

const char* SherpaOnnxOnlineRecognizerResult::text

Recognized text accumulated so far.

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

◆ timestamps

float* SherpaOnnxOnlineRecognizerResult::timestamps

Optional token timestamps in seconds.

This field may be NULL when the model does not provide timestamps. When non-NULL, it contains count entries and is parallel to tokens_arr.

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

◆ tokens

const char* SherpaOnnxOnlineRecognizerResult::tokens

Contiguous memory block containing token strings separated by '\0'.

Use tokens_arr for convenient indexed access.

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

◆ tokens_arr

const char* const* SherpaOnnxOnlineRecognizerResult::tokens_arr

Array of count pointers into tokens.

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


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