SNRComputer

Superclass:
NSObject
Declared In:

Introduction

Class for calculating input voice signal signal-to-noise ratio (SNR).



Methods

-compute:error:

Computes signal-to-noise ration (SNR) with given WAW file.

-compute:sampleRate:error:

Computes signal-to-noise ratio (SNR) with given PCM16 audio samples.

-initWithPath:error:

Creates SNRComputer instance.


compute:error:


Computes signal-to-noise ration (SNR) with given WAW file.

- (NSNumber* _Nullable)compute:(NSString* _Nonnull)wavPath 
        error:(NSError* _Nullable* _Nullable)error; 
Parameters
wavPath

path to WAV file

error

pointer to NSError for error reporting

Return Value

Computed SNR.


compute:sampleRate:error:


Computes signal-to-noise ratio (SNR) with given PCM16 audio samples.

- (NSNumber* _Nullable)compute:(NSData* _Nonnull)PCM16Samples 
        sampleRate:(int)sampleRate error:(NSError* _Nullable* _Nullable)error; 
Parameters
PCM16Samples

audio samples in PCM16 format

sampleRate

sampling rate of audio samples

error

pointer to NSError for error reporting

Return Value

Computed SNR.


initWithPath:error:


Creates SNRComputer instance.

- (instancetype _Nullable)initWithPath:(NSString* _Nonnull)initPath 
        error:(NSError* _Nullable* _Nullable)error; 
Parameters
initPath

path to config file or directory containing init data

error

pointer to NSError for error reporting