KIOSResponse Class Reference

Inherits from NSObject
Declared in KIOSResponse.h

Overview

An instance of the KIOSResponse class, called response provides various information about the specifc run of a recognizer, including KIOSResult and additional metadata about recognition and audio setup

Other Methods

  result

an instance of KIOSResult that provides final result corresponding to this response

@property (nonatomic, readonly, nullable) KIOSResult *result

Declared In

KIOSResponse.h

Various response properties

  decodingGraphName

name of the decoding graph that was used for recognition

@property (nonatomic, readonly, nonnull) NSString *decodingGraphName

Declared In

KIOSResponse.h

  asrBundleName

name of the ASR Bundle that was used for recognition

@property (nonatomic, readonly, nonnull) NSString *asrBundleName

Declared In

KIOSResponse.h

  json

JSON for this response

@property (nonatomic, readonly, nonnull) NSString *json

Declared In

KIOSResponse.h

  responseId

id of this response. This corresponds to the id set via startListening method

@property (nonatomic, readonly, nonnull) NSString *responseId

Declared In

KIOSResponse.h

  echoCancellation

BOOL value that’s set to true if echo cancellation was used during recognition of this response, or false if it wasn’t (the value is captured and persisted at the end of recognition)

@property (nonatomic, readonly) BOOL echoCancellation

Declared In

KIOSResponse.h

File saving

  jsonFilename

Full path to the json file that corresponds to this response. This file will be available only after call to saveJsonFile method

@property (nonatomic, readonly, nonnull) NSString *jsonFilename

Declared In

KIOSResponse.h

  audioFilename

Full path to the the audio file that corresponds to this response. This file will be available only after call to saveAudioFile method

@property (nonatomic, readonly, nonnull) NSString *audioFilename

Declared In

KIOSResponse.h

– saveJsonFile:

Saves JSON representation of the response in the specified filepath in the filesystem. The name of the file can be obtained via jsonFilename property.

- (BOOL)saveJsonFile:(nonnull NSURL *)dirpath

Parameters

dirpath

instance of the URL object that points to the directory in which the JSON file should be saved

Return Value

TRUE if file was succesfully saved, false otherwise. This method will fail if the dirpath does not point to an existing directory, or if you attempt to pass a dirpath that points to internal directory KeenASR SDK uses for uploades to Dashboard or if the directory is not writeable.

Declared In

KIOSResponse.h

– saveAudioFile:

Saves audio file in the specified filepath in the filesystem. The name of the file can be obtained via audioFilename property.

- (BOOL)saveAudioFile:(nonnull NSURL *)dirpath

Parameters

dirpath

instance of the URL object that points to the directory in which the audio file should be saved.

Return Value

TRUE if file was succesfully saved, false otherwise. This method will fail if the dirpath does not point to an existing directory, or if you attempt to pass a dirpath that points to internal directory KeenASR SDK uses for uploades to Dashboard or if the directory is not writeable.

Declared In

KIOSResponse.h