Skip to main content

Preparation

The Speech Verifier is distributed as a standalone SDK (AmaniSpeechVerifier). It was previously a module inside the Amani Core SDK; it is now released separately and can be used with or without AmaniUI.

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.

import AmaniSpeechVerifier

let verifier = try SpeechVerifier.Builder()
.session(serverURL: serverURL, token: token)
.build()
Migrating from the Core SDK module

amani.speechVerifier() is replaced by SpeechVerifier.Builder(). The session is now passed to the builder with session(serverURL:token:) instead of being read from the initialized Amani Core SDK.

Requirements​

  • iOS 13.0 or later
  • A valid serverURL and profile token (see Acquire Profile Token)
  • A physical device is recommended for camera, microphone, and speech-recognition testing

SDK Integration​

Choose one of the two integration options below.

Standalone (without AmaniUI)​

Add the following to your Podfile:

source "https://github.com/AmaniTechnologiesLtd/Mobile_SDK_Repo"
source "https://github.com/CocoaPods/Specs"

platform :ios, '13.0'

target 'YourApp' do
use_frameworks!

pod 'AmaniSpeechVerifier', '1.0.3'
end

Then run pod install.

With AmaniUI​

If you use the AmaniUI SDK, add the Speech Verifier subspec instead of the standalone pod:

pod 'AmaniUI/SpeechVerifier', '1.4.5'

When started through AmaniUI, the module is created and configured for you from the backend configuration. See Direct SDK vs AmaniUI.

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 SDK vs AmaniUI​

Direct SDK integration​

The host application creates and configures SpeechVerifier directly:

let verifier = try SpeechVerifier.Builder()
.session(serverURL: serverURL, token: token)
.documentType("XXX_ST_0")
.verificationSteps([
.spokenText([
SpeechVerifierTextConfiguration(
text: "I approve this verification",
matchThresholdPercent: 90
)
])
])
.build()

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 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
DistributionStandalone AmaniSpeechVerifier podStandalone Speech Verifier package
RecognitionApple Speech APIsAndroid module's offline recognizer
UI objectUIViewFragment
PermissionsHost Info.plist usage descriptionsManifest permissions + runtime request
Sessionsession(serverURL:token:) on the buildersession(serverURL, token)
ProGuard / R8Not applicableAndroid-specific
Voice guidanceOptional, through a SpeechVerifierVoiceProviderPlatform-specific Android behavior