Skip to main content

Preparation

The Speech Verifier is included in the Amani Core SDK for iOS. It is not distributed as a separate SDK or framework.

The module presents a camera-based verification screen where the user reads a passphrase aloud and, optionally, answers knowledge-based identity questions. Speech is evaluated live, matching passphrase words are highlighted on screen, and the session can be recorded as video evidence for upload to the Amani backend.

let verifier = amani.speechVerifier()
iOS implementation

The iOS Speech Verifier is different from the Android standalone package. On iOS it is part of the Amani Core SDK and uses Apple's speech-recognition APIs. Do not document the iOS module as a separate dependency or as a fully offline recognizer.

Requirements​

  • iOS 13.0 or later
  • Amani Core SDK integrated and initialized
  • A valid customer/profile context for evidence upload
  • A valid customer/profile context when identity answers will be fetched automatically
  • A physical device is recommended for camera, microphone, and speech-recognition testing

SDK Integration​

No additional Speech Verifier dependency is required. If the Amani Core SDK is already integrated, the module is available through:

let verifier = amani.speechVerifier()

There is no iOS equivalent of the Android Speech Verifier Maven/JFrog dependency, ProGuard configuration, or R8 consumer rules.

Feature activation is server-side

For remote-configured KYC journeys, the Speech Verifier step and its document type must also be enabled for the customer profile on the Amani backend. Calling the SDK API alone does not make a remote-configured Speech Verifier step appear in a KYC flow.

Required Permissions​

Add the following usage-description keys to the host application's Info.plist:

<key>NSCameraUsageDescription</key>
<string>Camera access is required to record the speech verification session.</string>

<key>NSMicrophoneUsageDescription</key>
<string>Microphone access is required to verify the spoken text.</string>

<key>NSSpeechRecognitionUsageDescription</key>
<string>Speech recognition is required to verify the spoken text.</string>

The module requests camera, microphone, and speech-recognition authorization when the flow starts.

Missing usage descriptions

Calling an Apple permission API without the corresponding Info.plist usage-description key can terminate the host application. Configure all required keys before using Speech Verifier.

When permission is denied, the module reports the corresponding SpeechVerifierFailureReason through onFailure and presents the supported retry/settings UX.

Location is optional. Add NSLocationWhenInUseUsageDescription only when the host application itself obtains a CLLocation and passes it to upload(location:completion:).

Important Integration Notes​

  • Keep a strong reference to the SpeechVerifier instance until verification and upload are complete.
  • Keep the returned UIView in the view hierarchy while the flow is active.
  • start() returns a view; the host application is responsible for presenting and constraining it.
  • Keep video recording enabled for production evidence collection unless the Amani team specifies otherwise.
  • Do not release the verifier inside onSuccess before calling upload(...).
  • onSuccess indicates that the local verification flow has succeeded. It does not upload evidence automatically.
  • Apple's speech recognizer can temporarily become unavailable. Treat speechRecognitionUnavailable as a real runtime state.
  • Supported mismatch/timeout failures show the module's own Retry UI. Do not immediately remove the view for every onFailure callback.

Direct Core SDK vs AmaniUI​

Speech Verifier can be used in two ways:

Direct Core SDK integration​

The host application creates and configures SpeechVerifier directly:

let verifier = amani.speechVerifier()
.documentType("XXX_ST_0")
.setText("I approve this verification", 90)

The host application owns presentation, lifecycle, callbacks, and the final upload call.

AmaniUI / remote-configured flow​

When Speech Verifier is started through AmaniUI, AmaniUI maps the backend configuration into the Core SDK. This can include:

  • document type;
  • timeout;
  • passphrase / identity-question steps;
  • per-step match thresholds;
  • identity prompts;
  • UI texts;
  • UI colors;
  • exempt words;
  • Voice Assistant configuration.

In that flow, applications normally do not create a second SpeechVerifier instance manually.

Android Differences​

TopiciOSAndroid
DistributionIncluded in Amani Core SDKStandalone Speech Verifier package
RecognitionApple Speech APIsAndroid module's offline recognizer
UI objectUIViewFragment
PermissionsHost Info.plist usage descriptionsManifest permissions + runtime request
Customer/profile sessionExisting Amani Core SDK contextStandalone session(serverURL, token) API
ProGuard / R8Not applicableAndroid-specific
Voice guidanceBuilt into iOS Speech Verifier through AmaniVoiceAssistantPlatform-specific Android behavior