Connected Headphone Identification

This guide explains how the connected headphone identification information can be provided to the SDK to enable certain hearing test paradigms e.g. PTT.

Introduction

In iOS MimiSDK 8.0.0, we introduced the PTT test type.

Accurate headphone selection is highly desirable for PTT, as accounting for the headphone’s characteristics through appropriate correction factors applied to the hearing assessment ultimately leads to a more suitable sound personalization experience.

For this reason, a headphone identification delegate mechanism has been implemented which enables the partner app to provide the model identifier of the connected headphone.

Prerequisites

  • This feature is mostly relevant for partner apps that are aware of the headphone model they are currently connected with.
  • The partner and Mimi need to be aligned on the headphone model name, since Mimi creates configuration on Mimi backend with that model name.

Providing the headphone identifier

Note: The headphone identifier needs to be available before the test flow is launched.

The headphone identifier can be provided to the SDK as follows:

Implementing the MimiConnectedHeadphoneProvider

The MimiConnectedHeadphoneProvider conformance can be added to any object that can provide the model name of the currently connected headphone.

An example of a class conforming to the delegate:

class HeadphoneController: MimiConnectedHeadphoneProvider {

    func getMimiHeadphoneIdentifier() -> MimiHeadphoneIdentifier? {        
        return MimiHeadphoneIdentifier(model: "example-headphone-identifier")
    }
}

Updating MimiTestController with the MimiConnectedHeadphoneProvider object

The conforming delegate object from the example above can now be set on the MimiTestController as follows:

let headphoneController = HeadphoneController()
MimiCore.shared.test.connectedHeadphoneProvider = headphoneController

Note: The delegate object is referenced weakly by MimiTestController.