Class: QualityCheckEngine

QualityCheckEngine(initPath)

new QualityCheckEngine(initPath)

QualityCheckEngine constructor
Parameters:
Name Type Description
initPath string Path to the initialization folder containing the required binaries and configuration files

Methods

checkQualityFromFile(wavFile, thresholds) → {QualityCheckEngineResult}

Checks whether audio file is suitable from the quality perspective with given WAV file
Parameters:
Name Type Description
wavFile string Path to WAV file
thresholds QualityCheckMetricsThresholds Quality checking thresholds that will be applied to the output quality check metrics
Returns:
Quality check result
Type
QualityCheckEngineResult

checkQualityFromFloatSamples(floatSamples, sampleRate, thresholds) → {QualityCheckEngineResult}

Checks whether audio file is suitable from the quality perspective with given float audio samples
Parameters:
Name Type Description
floatSamples Float32Array Array containing float samples
sampleRate number Sample rate
thresholds QualityCheckMetricsThresholds Quality checking thresholds that will be applied to the output quality check metrics
Returns:
Quality check result
Type
QualityCheckEngineResult

checkQualityFromPcm16Bytes(bytes, sampleRate, thresholds) → {QualityCheckEngineResult}

Checks whether audio file is suitable from the quality perspective with given PCM16 bytes
Parameters:
Name Type Description
bytes Uint8Array Array containing PCM16 bytes
sampleRate number Sample rate
thresholds QualityCheckMetricsThresholds Quality checking thresholds that will be applied to the output quality check metrics
Returns:
Quality check result
Type
QualityCheckEngineResult

checkQualityFromPcm16Samples(pcm16Samples, sampleRate, thresholds) → {QualityCheckEngineResult}

Checks whether audio file is suitable from the quality perspective with given PCM16 audio samples
Parameters:
Name Type Description
pcm16Samples Int16Array Array containing PCM16 samples
sampleRate number Sample rate
thresholds QualityCheckMetricsThresholds Quality checking thresholds that will be applied to the output quality check metrics
Returns:
Quality check result
Type
QualityCheckEngineResult

clone() → {QualityCheckEngine}

Returns a new handle for this object to optimize memory consumption The object will be disposed only after delete() is called for original object and for each of clones
Returns:
New handle of this object
Type
QualityCheckEngine

delete()

Manually signals that the object is no more needed. Strongly recommended to call this method explicitly.

getRecommendedThresholds(scenario) → {QualityCheckMetricsThresholds}

Gets recommended quality checking thresholds for the specified scenario
Parameters:
Name Type Description
scenario QualityCheckScenario Scenario for which recommended thresholds will be returned
Returns:
Quality check thresholds that can be used on quality checking
Type
QualityCheckMetricsThresholds

isDeleted() → {boolean}

Whether delete method was called (and the object can't be used) or not
Returns:
Whether delete method was called (and the object can't be used) or not
Type
boolean