SpeechSummaryStream

Superclass:
NSObject
Declared In:
See:

Introduction

Stateful speech summary stream class, intended to calculate SpeechSummary with audio samples given in stream. New instance can be obtained with a SpeechSummaryEngine instance.



Methods

-addSamples:error:

Adds PCM16 audio samples to process.

-finalizeStream:

Finalizes input audio stream to process remaining audio samples and produce result if it's possible.

-getCurrentBackgroundLength:

Retrieves current background length.

-getSpeechEvent:

Retrieves a single speech event from the output queue.

-getTotalSpeechInfo:

Retrieves current speech summary state.

-getTotalSpeechSummary:

Retrieves current speech summary state.

-hasSpeechEvents:

Checks if there are speech events in output queue.

-reset:

Resets speech summary stream state.


addSamples:error:


Adds PCM16 audio samples to process.

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

audio samples in PCM16 format

error

pointer to NSError for error reporting

Return Value

True on success, false otherwise.


finalizeStream:


Finalizes input audio stream to process remaining audio samples and produce result if it's possible.

- (BOOL)finalizeStream:(NSError* _Nullable* _Nullable)error; 
Parameters
error

pointer to NSError for error reporting

Return Value

True on success, false otherwise.


getCurrentBackgroundLength:


Retrieves current background length.

- (NSNumber* _Nullable)getCurrentBackgroundLength:(NSError* _Nullable* _Nullable)error; 
Parameters
error

pointer to NSError for error reporting

Return Value

Silence passed since last speech frame in seconds.


getSpeechEvent:


Retrieves a single speech event from the output queue.

- (SpeechEvent* _Nullable)getSpeechEvent:(NSError* _Nullable* _Nullable)error; 
Parameters
error

pointer to NSError for error reporting

Return Value

One speech event.


getTotalSpeechInfo:


Retrieves current speech summary state.

- (SpeechInfo* _Nullable)getTotalSpeechInfo:(NSError* _Nullable* _Nullable)error; 
Parameters
error

pointer to NSError for error reporting

Return Value

Speech summary.


getTotalSpeechSummary:


Retrieves current speech summary state.

- (SpeechSummary* _Nullable)getTotalSpeechSummary:(NSError* _Nullable* _Nullable)error; 
Parameters
error

pointer to NSError for error reporting

Return Value

Speech summary.


hasSpeechEvents:


Checks if there are speech events in output queue.

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

pointer to NSError for error reporting

Return Value

Boolean flag (true is there are events available, else otherwise).


reset:


Resets speech summary stream state.

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

pointer to NSError for error reporting

Return Value

True on success, false otherwise.