SpeechEndpointDetector

Superclass:
NSObject
Declared In:

Introduction

Speech endpoint detector class (interface), intended to detect speech end in the audio stream.



Methods

-addSamples:error:

Adds new audio samples to the SpeechEndpointDetector.

-initWithMinSpeechLengthMs:maxSilenceLengthMs:sampleRate:error:

Creates SpeechEndpointDetector instance.

-isSpeechEnded:

Returns detection state.

-reset:

Resets detector state.


addSamples:error:


Adds new audio samples to the SpeechEndpointDetector.

- (BOOL)addSamples:(NSData* _Nonnull)PCM16Samples error:(NSError* _Nullable* _Nullable)error; 
Parameters
PCM16Samples

PCM16 audio samples

error

pointer to NSError for error reporting


initWithMinSpeechLengthMs:maxSilenceLengthMs:sampleRate:error:


Creates SpeechEndpointDetector instance.

- (instancetype _Nullable)initWithMinSpeechLengthMs:(unsigned int)minSpeechLengthMs 
        maxSilenceLengthMs:(unsigned int)maxSilenceLengthMs 
        sampleRate:(unsigned int)sampleRate error:(NSError* _Nullable* _Nullable)error; 
Parameters
sampleRate

input audio sample rate

minSpeechLengthMs

minimum length of input signal before speech endpoint detected in milliseconds

maxSilenceLengthMs

maximum length of input signal before speech endpoint detected in milliseconds

error

pointer to NSError for error reporting


isSpeechEnded:


Returns detection state.

- (VoiceSdkBool* _Nullable)isSpeechEnded:(NSError* _Nullable* _Nullable)error; 
Parameters
error

pointer to NSError for error reporting

Return Value

true if speech end was detected, false otherwise.


reset:


Resets detector state.

- (BOOL)reset:(NSError* _Nullable* _Nullable)error;