VoiceSDK
5.0.2
|
Class for online Opus audio stream processing (voice activity detection and speech statistics computation) More...
#include <voicesdk/media/speech_summary.h>
Public Types | |
using | Ptr = std::shared_ptr< SpeechSummaryStreamOpus > |
Public Member Functions | |
virtual void | reset ()=0 |
Resets stream state: clears buffer, resets speech summary. More... | |
virtual void | finalize ()=0 |
Finalizes input audio stream to process remaining audio samples and produce result if it's possible. More... | |
virtual bool | hasSpeechEvents () const =0 |
Checks if there are available speech events in output queue. More... | |
virtual SpeechEvent | getSpeechEvent ()=0 |
Retrieves a single speech event from output FIFO queue. Use hasSpeechEvents() to check if there is available speech event. More... | |
virtual SpeechSummary | getTotalSpeechSummary () const =0 |
Retrieves total accumulated speech summary. More... | |
virtual SpeechInfo | getTotalSpeechInfo () const =0 |
Retrieves total accumulated speech info. More... | |
virtual float | getCurrentBackgroundLength () const =0 |
Method for retrieving current background length (length of a continuous non-speech segment starting on the last detected speech frame) More... | |
virtual void | addPacket (const uint8_t *bytes, size_t bytesNum)=0 |
Adds Opus packet to process. More... | |
virtual bool | compare (const SpeechSummaryStreamOpus::Ptr &other) const =0 |
Check if resulting states of this and another stream are equal. More... | |
virtual | ~SpeechSummaryStreamOpus ()=default |
Static Public Member Functions | |
static SpeechSummaryStreamOpus::Ptr | create (const std::string &initPath, size_t sampleRate) |
Creates SpeechSummaryStreamOpus instance. More... | |
Class for online Opus audio stream processing (voice activity detection and speech statistics computation)
using voicesdk::SpeechSummaryStreamOpus::Ptr = std::shared_ptr<SpeechSummaryStreamOpus> |
|
virtualdefault |
|
pure virtual |
Adds Opus packet to process.
bytes | A buffer containing single Opus packet. It is expected that packet contains data for single mono stream |
bytesNum | Number of bytes |
std::runtime_error | if runtime error occurred |
|
pure virtual |
Check if resulting states of this and another stream are equal.
|
static |
Creates SpeechSummaryStreamOpus instance.
initPath | Initialization data path |
sampleRate | Audio sampling rate in Hz |
std::runtime_error | if runtime error occurred |
|
pure virtual |
Finalizes input audio stream to process remaining audio samples and produce result if it's possible.
|
pure virtual |
Method for retrieving current background length (length of a continuous non-speech segment starting on the last detected speech frame)
|
pure virtual |
Retrieves a single speech event from output FIFO queue. Use hasSpeechEvents() to check if there is available speech event.
std::runtime_error | if runtime error occurred |
|
pure virtual |
Retrieves total accumulated speech info.
|
pure virtual |
Retrieves total accumulated speech summary.
|
pure virtual |
Checks if there are available speech events in output queue.
|
pure virtual |
Resets stream state: clears buffer, resets speech summary.