Dela via


Class SPXConnectionMessage

Declaration

@class SPXConnectionMessage : NSObject;

Description

ConnectionMessage represents implementation specific messages sent to and received from the speech service. These messages are provided for debugging purposes and should not be used for production use cases with the Azure Cognitive Services Speech Service. Messages sent to and received from the Speech Service are subject to change without notice. This includes message contents, headers, payloads, ordering, etc.

Properties

path

@property (readonly, copy, atomic) NSString * _Nonnull path;

Gets the path associated with SPXConnectionMessage.

isTextMessage

@property (readonly, atomic) bool isTextMessage;

Checks to see if the ConnectionMessage is a text message.

isBinaryMessage

@property (readonly, atomic) bool isBinaryMessage;

Checks to see if the ConnectionMessage is a binary message.

textMessage

@property (readonly, copy, atomic) NSString * _Nullable textMessage;

Gets the text message payload. Typically the text message content-type is application/json. To determine other content-types use Properties.GetProperty("Content-Type").

binaryMessage

@property (readonly, copy, atomic) NSData * _Nullable binaryMessage;

Gets the binary message payload.

properties

@property (readonly, atomic) id<SPXPropertyCollection> _Nullable properties;

Gets the collection of properties and their values defined for SPXConnectionMessage. Message headers can be accessed via this collection (e.g. "Content-Type").