VoiceSDK
5.0.2
|
Class for continuous voice verification using audio stream. More...
#include <voicesdk/verify/verify_stream.h>
Public Types | |
using | Ptr = std::shared_ptr< VoiceVerifyStream > |
Public Member Functions | |
virtual void | reset ()=0 |
Resets stream state. More... | |
virtual void | addSamples (const uint8_t *pcm16Bytes, size_t bytesNum)=0 |
Adds byte representation of PCM16 audio samples to process. More... | |
virtual void | addSamples (const int16_t *pcm16Samples, size_t samplesNum)=0 |
Adds PCM16 audio samples to process. More... | |
virtual void | addSamples (const float *floatSamples, size_t samplesNum)=0 |
Adds float audio samples (in [-1; 1] range) to process. More... | |
virtual void | finalize ()=0 |
Finalizes input audio stream to process remaining audio samples and produce result if it's possible. More... | |
virtual bool | hasVerifyResults () const =0 |
Checks if there are available verification results in output queue. More... | |
virtual std::vector< VerifyStreamResult > | getVerifyResult ()=0 |
Retrieves verification result from output queue containing one verify stream result for each reference template. Use hasVerifyResult() to know if there are available results. More... | |
virtual VerifyStreamResult | getVerifyResultForOneTemplate ()=0 |
Retrieves verification result from output queue consisting of single verify stream result corresponding to the zeroth reference template. Suitable for the case when the only one reference template was specified. Use hasVerifyResult() to know if there are available results. More... | |
virtual | ~VoiceVerifyStream ()=default |
Static Public Member Functions | |
static Ptr | create (VoiceTemplateFactory::Ptr voiceTemplateFactory, VoiceTemplateMatcher::Ptr voiceTemplateMatcher, const std::vector< VoiceTemplate::Ptr > &voiceTemplates, size_t sampleRate, size_t audioContextLengthSeconds=10, float windowLengthSeconds=3.0f) |
Factory method. More... | |
Class for continuous voice verification using audio stream.
using voicesdk::VoiceVerifyStream::Ptr = std::shared_ptr<VoiceVerifyStream> |
|
virtualdefault |
|
pure virtual |
Adds byte representation of PCM16 audio samples to process.
pcm16Bytes | A buffer containing byte representation of PCM16 audio samples |
bytesNum | Number of bytes |
std::runtime_error | if runtime error occurred |
voicesdk::LicenseException | if license error occurred |
|
pure virtual |
Adds PCM16 audio samples to process.
pcm16Samples | A buffer containing PCM16 audio samples |
samplesNum | Number of audio samples |
std::runtime_error | if runtime error occurred |
voicesdk::LicenseException | if license error occurred |
|
pure virtual |
Adds float audio samples (in [-1; 1] range) to process.
floatSamples | A buffer containing float audio samples |
samplesNum | Number of audio samples |
std::runtime_error | if runtime error occurred |
voicesdk::LicenseException | if license error occurred |
|
static |
Factory method.
voiceTemplateFactory | Voice template factory instance |
voiceTemplateMatcher | Voice template matcher instance |
voiceTemplates | Reference voice templates to match with |
sampleRate | Input audio stream sampling frequency in Hz |
audioContextLengthSeconds | Length of audio context for voice verification in seconds, must be at least windowLengthSeconds |
windowLengthSeconds | Length of audio window passed to the template creation during stream processing, must be at least 0.5 seconds |
std::runtime_error | if runtime error occurred |
voicesdk::LicenseException | if license error occurred |
|
pure virtual |
Finalizes input audio stream to process remaining audio samples and produce result if it's possible.
|
pure virtual |
Retrieves verification result from output queue containing one verify stream result for each reference template. Use hasVerifyResult() to know if there are available results.
std::runtime_error | if runtime error occurred |
|
pure virtual |
Retrieves verification result from output queue consisting of single verify stream result corresponding to the zeroth reference template. Suitable for the case when the only one reference template was specified. Use hasVerifyResult() to know if there are available results.
std::runtime_error | if runtime error occurred |
|
pure virtual |
Checks if there are available verification results in output queue.
|
pure virtual |
Resets stream state.