Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
When the user signs in and is confirmed to have a valid license, your app must initialize DAXKit using the DAX.start() method. This method must be called before you can interact with the DAXKit SDK framework. You can call this method once per app run. It throws an error if it fails to initialize DAXKit.
public static func start(
withAppMetadataProvider appMetadataProvider: AppMetadataProvider,
accessTokenProvider: AccessTokenProvider,
delegate: DAXKitDelegate,
partnerId: String
)
Parameters
appMetadataProviderAn object that provides information about the app that's using DAXKit.
accessTokenProviderAn object that provides access tokens to communicate with the DAX server.
delegateThe delegate that receives upload events.
partnerIdThe partner identifier. This is a fixed GUID assigned by the Dragon partner relations team. For more information about your partner ID, contact the Dragon partner relations team at dragon_partners@microsoft.com.
Protocols
App Metadata Provider
Protocol for a class that provides metadata about the app that's using DAXKit.
@objc public protocol AppMetadataProvider: AnyObject {
var appID: String { get }
var appVersion: String { get }
var deviceID: String { get }
}
appIDThe bundle identifier for the app that's using DAXKit.
appVersionThe version of the app that's using DAXKit.
deviceIDA unique identifier for the device. Usually, identifierForVendor is used.
Access Token Provider
Protocol for a class that can provide a valid access token for DAXKit to stream audio to Dragon Copilot. For more information on access tokens, see: Acquiring access tokens.
@objc public protocol AccessTokenProvider: AnyObject {
func accessToken(onSuccess: @escaping (String) -> Void, onFailure: @escaping (Error) -> Void)
}
onSuccessThe callback that returns the access token if it could be retrieved.
onFailureThe callback that returns an error that retrieving the access token was unsuccessful.