Supporting PTT Hearing Tests¶
The MSDK provides multiples mechanisms to support PTT (Pure Tone Threshold) hearing tests.
This guide will help you understand the different mechanisms, their APIs and how to implement them in your app.
Introduction¶
PTT hearing tests require a known headphone environment to accurately account for the headphone's characteristics. This ultimately leads to a more accurate hearing test and suitable sound personalization experience.
The MSDK has two mechanisms to support headphone identification:
-
Mimi Partner Headphones - app-based detection and selection of connected Mimi-enabled Bluetooth headphones.
- This is only appropriate for apps interacting with Mimi-enabled headphones.
-
User selection of the connected headphone during the MSDK Test Flow.
- This is appropriate for apps which support a wide range of headphones, from a variety of manufacturers. For example: a hearing test app.
API Descriptions¶
Mimi Partner Headphones¶
Prerequisites¶
Prior to integration, you need to supply Mimi with the model identifiers of all headphones models to be supported. Please do this in consultation with your Mimi contact.
Mimi matches identifiers on our backend to determine the availability of the PTT test paradigm and to ensure the necessary correction factors are applied to the hearing assessment.
This would typically be the identifier you use currently for your own internal functionality.
Description¶
Mimi partner headphones are enabled with software to perform both Mimi Sound Personalization and PTT Hearing Tests.
During a PTT hearing test, the MSDK will interact with the headphones in order ensure the most accurate operating environment. The headphones will also notify the MSDK when the hearing test is paused.
Connecting¶
When the headphones are connected, call notifyMimiHeadphoneConnected()
:
MimiCore.testsController.notifyMimiHeadphoneConnected(
headphoneIdentifier = MimiHeadphoneIdentifier(model = TODO("the-current-headphone-identifier")),
applicatorConfiguration = HeadphoneApplicatorConfiguration(
onIsAbsoluteVolumeSupported = { TODO("send the Bluetooth query to determine if the headphone supports absolute volume") },
onSendHearingTestStartCommand = { TODO("send the Bluetooth command to start the hearing test: HT_START") },
onSendHearingTestEndCommand = { TODO("send the Bluetooth command to end the hearing test: HT_END") },
)
)
headphoneIdentifier
- determines the availability of the PTT test paradigm, through querying the Mimi backend.applicatorConfiguration
- defines the functions used to send the automatic volume adjustment sequence Bluetooth commands to the headphone.
These work in a similar way to the MimiParameterApplicator
used for Mimi sound personalization - they interact with the headphone firmware via Bluetooth and the implementation of these functions needs to be supplied by your app, as the details depend on the headphone firmware platform.
Note
Your app needs to call notifyMimiHeadphoneConnected()
before the TestFlow is launched, as this defines the configuration used throughout the test.
In addition, the MSDK needs to be notified of HT_PAUSE
events on the connected headphone:
When the headphone sends a HT_PAUSE notification, your app should call notifyHearingTestPaused()
:
Disconnecting¶
When the headphones are disconnected, simply call notifyMimiHeadphoneDisconnected()
:
This will set MimiCore.testsController.connectedMimiHeadphone
to null
.
User Selection¶
Description¶
If your app needs to support PTT hearing tests for non-Mimi partner headphone models, you can use the User Selection mechanism to allow the user to select the connected headphone as a step during the Test Flow.
There's no specific API for this mechanism; it is made available based upon your app's client credentials, as defined when calling MimiCore.start()
.
In addition, the hearing test volume adjustment will need to be performed manually by the user, again as a step during the Test Flow.