Snapshot of the current keyword spotting result.
More...
#include <c-api.h>
Free this object with SherpaOnnxDestroyKeywordResult().
Definition at line 1577 of file c-api.h.
◆ count
| int32_t SherpaOnnxKeywordResult::count |
Number of decoded tokens in tokens_arr and timestamps.
Definition at line 1601 of file c-api.h.
◆ json
| const char* SherpaOnnxKeywordResult::json |
JSON representation of the result.
The JSON includes keyword, tokens, timestamps, and start_time.
Definition at line 1619 of file c-api.h.
◆ keyword
| const char* SherpaOnnxKeywordResult::keyword |
Triggered keyword text.
For English models this is usually space-separated words. For Chinese models it is typically the surface form without spaces.
Definition at line 1584 of file c-api.h.
◆ start_time
| float SherpaOnnxKeywordResult::start_time |
Start time of the current segment in seconds.
Definition at line 1612 of file c-api.h.
◆ timestamps
| float* SherpaOnnxKeywordResult::timestamps |
Per-token timestamps in seconds.
This array has count elements. Element i corresponds to tokens_arr[i].
Definition at line 1609 of file c-api.h.
◆ tokens
| const char* SherpaOnnxKeywordResult::tokens |
Token sequence as a single string.
For BPE-based models this contains the decoded BPE tokens.
Definition at line 1591 of file c-api.h.
◆ tokens_arr
| const char* const* SherpaOnnxKeywordResult::tokens_arr |
Token sequence as an array.
The array length is count. Each string is owned by this result object.
Definition at line 1598 of file c-api.h.
The documentation for this struct was generated from the following file: