Class for online audio stream processing (voice activity detection and speech statistics computation)
More...
#include <voicesdk/media/speech_summary.h>
Class for online audio stream processing (voice activity detection and speech statistics computation)
- See also
- SpeechSummaryEngine to create a SpeechSummaryStream instance
◆ Ptr
◆ ~SpeechSummaryStream()
virtual voicesdk::SpeechSummaryStream::~SpeechSummaryStream |
( |
| ) |
|
|
virtualdefault |
◆ addSamples() [1/3]
virtual void voicesdk::SpeechSummaryStream::addSamples |
( |
const uint8_t * |
bytes, |
|
|
size_t |
bytesNum |
|
) |
| |
|
pure virtual |
Adds PCM16 audio samples to process.
- Parameters
-
bytes | pointer to array with samples |
bytesNum | size of array with samples |
- Exceptions
-
std::runtime_error | if runtime error occurred |
◆ addSamples() [2/3]
virtual void voicesdk::SpeechSummaryStream::addSamples |
( |
const int16_t * |
pcm16Samples, |
|
|
size_t |
samplesNum |
|
) |
| |
|
pure virtual |
Adds PCM16 audio samples to process.
- Parameters
-
pcm16Samples | pointer to array with samples |
samplesNum | size of array with samples |
- Exceptions
-
std::runtime_error | if runtime error occurred |
◆ addSamples() [3/3]
virtual void voicesdk::SpeechSummaryStream::addSamples |
( |
const float * |
floatSamples, |
|
|
size_t |
samplesNum |
|
) |
| |
|
pure virtual |
Adds float audio samples (in [-1; 1] range) to process.
- Parameters
-
floatSamples | pointer to array with samples |
samplesNum | size of array with samples |
- Exceptions
-
std::runtime_error | if runtime error occurred |
◆ compare()
Check if resulting states of this and another stream are equal.
◆ finalize()
virtual void voicesdk::SpeechSummaryStream::finalize |
( |
| ) |
|
|
pure virtual |
Finalizes input audio stream to process remaining audio samples and produce result if it's possible.
◆ getCurrentBackgroundLength()
virtual float voicesdk::SpeechSummaryStream::getCurrentBackgroundLength |
( |
| ) |
const |
|
pure virtual |
Method for retrieving current background length (length of a continuous non-speech segment starting on the last detected speech frame)
- Returns
- current background length in milliseconds
◆ getSpeechEvent()
virtual SpeechEvent voicesdk::SpeechSummaryStream::getSpeechEvent |
( |
| ) |
|
|
pure virtual |
Retrieves a single speech event from output FIFO queue. Use hasSpeechEvents() to check if there is available speech event.
- Returns
- A single speech event
- Exceptions
-
std::runtime_error | if runtime error occurred |
◆ getTotalSpeechInfo()
virtual SpeechInfo voicesdk::SpeechSummaryStream::getTotalSpeechInfo |
( |
| ) |
const |
|
pure virtual |
Retrieves total accumulated speech info.
- Returns
- speech info
◆ getTotalSpeechSummary()
virtual SpeechSummary voicesdk::SpeechSummaryStream::getTotalSpeechSummary |
( |
| ) |
const |
|
pure virtual |
Retrieves total accumulated speech summary.
- Returns
- speech summary
◆ hasSpeechEvents()
virtual bool voicesdk::SpeechSummaryStream::hasSpeechEvents |
( |
| ) |
const |
|
pure virtual |
Checks if there are available speech events in output queue.
- Returns
- true if there is available speech event, false otherwise
◆ reset()
virtual void voicesdk::SpeechSummaryStream::reset |
( |
| ) |
|
|
pure virtual |
Resets stream state: clears buffer, resets speech summary.