|
VoiceSDK
5.3.0
|
Class (interface) for calculating input voice signal signal-to-noise ratio (SNR) More...
#include <voicesdk/media/signal.h>
Public Types | |
| using | Ptr = std::shared_ptr< SNRComputer > |
Public Member Functions | |
| virtual float | compute (const uint8_t *bytes, size_t bytesNum, size_t sampleRate) const =0 |
| Computes SNR for PCM16 audio bytes. More... | |
| virtual float | compute (const int16_t *pcm16Samples, size_t samplesNum, size_t sampleRate) const =0 |
| Computes SNR for PCM16 audio samples. More... | |
| virtual float | compute (const float *floatSamples, size_t samplesNum, size_t sampleRate) const =0 |
| Computes SNR for float (in [-1; 1] range) audio samples. More... | |
| virtual float | compute (const std::string &audioFile) const =0 |
| Computes SNR for audio file. More... | |
| virtual | ~SNRComputer ()=default |
Static Public Member Functions | |
| static SNRComputer::Ptr | create (const std::string &initPath) |
| Factory method for creating SNRComputer instance. More... | |
Class (interface) for calculating input voice signal signal-to-noise ratio (SNR)
| using voicesdk::SNRComputer::Ptr = std::shared_ptr<SNRComputer> |
|
virtualdefault |
|
pure virtual |
Computes SNR for float (in [-1; 1] range) audio samples.
| floatSamples | pointer to array with samples |
| samplesNum | size of array with samples |
| sampleRate | audio samples sampling rate |
| std::runtime_error | if runtime error occurred |
| voicesdk::LicenseException | if license error occurred |
|
pure virtual |
Computes SNR for PCM16 audio samples.
| pcm16Samples | pointer to array with samples |
| samplesNum | size of array with samples |
| sampleRate | audio samples sampling rate |
| std::runtime_error | if runtime error occurred |
| voicesdk::LicenseException | if license error occurred |
|
pure virtual |
Computes SNR for audio file.
| audioFile | path to audio file |
| std::runtime_error | if runtime error occurred |
| voicesdk::LicenseException | if license error occurred |
|
pure virtual |
Computes SNR for PCM16 audio bytes.
| bytes | pointer to array with samples |
| bytesNum | size of array with samples |
| sampleRate | audio samples sampling rate |
| std::runtime_error | if runtime error occurred |
| voicesdk::LicenseException | if license error occurred |
|
static |
Factory method for creating SNRComputer instance.
| initPath | path to the init data folder |
| std::runtime_error | if runtime error occurred |
| voicesdk::LicenseException | if license error occurred |
1.8.17