Audio processing
This section contains audio processing proto files.
Notes:
- To download Gatekeeper proto files, click download Gatekeeper proto files.
- Default values are determined by the gRPC specification. For more information, go to protocol buffers language guide .
audio_processing_service.proto
AudioProcessor
This service offers methods to ensure audio is genuine and valid. Available operations are:
- Antispoofing - Detects if the audio is a playback or contains synthetic speech.
- Text Validation - Checks if the speaker in the supplied audio says the expected text.
- Transcription and Redaction - Transcribes supplied spoken audio into text, and optionally remove sensitive data.
- Liveness Detection - Compares audio samples to determine if the Media Segment is a recording.
Normally, these operations are executed after a successful authentication to confirm that the audio is trustworthy.
gRPC method definitions
| Method Name | Request Type | Response Type | Description |
|---|---|---|---|
| DetectAudioSpoofing | DetectAudioSpoofing Request |
DetectAudioSpoofing Response |
Detects playback or synthesized audio attacks. Supported playback detection includes:
|
| ValidateText | ValidateText Request |
ValidateText Response |
Checks that the speaker in the supplied audio is saying the required text. |
| DetectLiveness | DetectLiveness Request |
DetectLiveness Response |
Detects intra-session voice variation using a random prompt in order to confirm that a real live person is seeking access. Liveness detection is performed after successful text-dependent voice biometrics authentication. See Verify. During liveness detection, the audio is compared with the text-dependent utterance to make sure that the same person is speaking in both recordings. The randomness of the prompts ensures that fraudsters cannot use the pre-recorded audio of the authentic speaker. Text validation ensures that the speaker is saying the expected random phrase. The input is a reference audio for active authentication and one or more recordings of random phrases. The system can assist with selecting a random phrase using the GetLivenessPrompt method. |
| GetLivenessPrompt | GetLivenessPrompt Request |
GetLivenessPrompt Response |
Randomly selects a prompt from a large list of pre-configured prompts. The semi-random prompt can be used for liveness detection. |
| Transcribe | Transcribe Request |
Transcribe Response |
Provides a transcription of an audio segment and returns details about each recognized word. When specified via input parameters or configuration, the method also redacts all credit card information and returns locations of the redacted text. |
| Redact | Transcribe Request |
Transcribe Response |
Provides a transcription of an audio segment after redacting all credit card information. If the audio was already transcribed, unless the input parameters or configuration require transcribing again, the method performs redaction on the transcribed audio. |
Methods with HTTP bindings
Notes:
-
REST API responses use the camel case naming convention, such as gkPersonId, but the REST API requests can either use the camel case or snake case naming convention, such as gk_person_id.
-
The following example displays root prefix and endpoint to build a complete URL, such as
https://gatekeeper.api.nuance.com/v1/audios/upload-url:- Root prefix for API:
https://gatekeeper.api.nuance.com - Endpoint:
/v1/audios/upload-url
To know more about root prefixes for API that can be used for different geographies, go to Sites.
- Root prefix for API:
DetectAudioSpoofing
ValidateText
DetectLiveness
GetLivenessPrompt
Transcribe
Redact
audio_processing_messages.proto
ChannelPlaybackDetectionParameters
Enables Channel Playback Detection. Included in DetectAudioSpoofingRequest.
ChannelPlaybackDetectionResult
Contains the Channel Playback Detection scores and decision. Included in DetectAudioSpoofing.
| Field | Type | Description |
|---|---|---|
| gk_media_segment_id | nuance.biosec.v1.UniqueId | Unique ID of the media segment used for detection (if only a subset of audio was used, the value may be different from the input). |
| gk_processed_audio_id | nuance.biosec.v1.UniqueId | Unique ID of the processed audio. |
| decision | nuance.biosec.v1.Decision | Indicates whether the given audio was identified as playback. |
| reason | DecisionReason | The reason of the decision. |
| result | nuance.biosec.v1.RiskEngineResult | Level of risk and its reliability, computed by the risk engine. |
| score | google.protobuf.FloatValue | Raw Channel Playback Detection score. |
| playback_version | google.protobuf.Int32Value | Playback algorithm version that the system used to compute the score. |
| gk_playback_calibration_model_revision_id | nuance.biosec.v1.UniqueId | Unique ID of the calibration model that the system used to compute the score. |
DataPack
Contains details about the data pack that the system used to perform transcription.
| Field | Type | Description |
|---|---|---|
| language | google.protobuf.StringValue | Optional. Data pack language. List of available languages can be found here: https://docs.nuance.com/mix/overview/mix-geographies/ . |
| topic | google.protobuf.StringValue | Optional. Data pack topic. Range and semantic is the same values as returned by Nuance Recognizer API . |
| version | google.protobuf.StringValue | Optional. Data pack version. Range and semantic is the same values as returned by Nuance Recognizer API . |
| id | google.protobuf.StringValue | Optional. Data pack identifier string, including nightly build information if applicable. Range and semantic is the same values as returned by Nuance Recognizer API . |
DetectAudioSpoofingRequest
Input message that defines parameters for DetectAudioSpoofing.
Uses the context field as follows:
- gk_engagement_id: Mandatory
- gk_session_id: Mandatory
- gk_scope_id: Mandatory
- configset_id: Mandatory
| Field | Type | Description |
|---|---|---|
| context | nuance.biosec.v1.Context | Mandatory. General request context. |
| One of input: | Mandatory. Specified the audio for processing. |
|
| gk_media_segment_id | nuance.biosec.v1.UniqueId | Unique ID of the new media segment. |
| gk_processed_audio_id | nuance.biosec.v1.UniqueId | Unique ID of the processed audio. |
| gk_person_id | nuance.biosec.v1.UniqueId | Optional, owner of the audio. When set, the system handles the audio as personal information. |
| syntheticSpeechDetectionParameters | SyntheticSpeechDetectionParameters | Optional. Setting this value enables Synthetic Speech Detection. |
| channelPlaybackDetectionParameters | ChannelPlaybackDetectionParameters | Optional. Setting this value enables Channel Playback Detection. |
| footprintPlaybackDetectionParameters | FootprintPlaybackDetectionParameters | Optional. Setting this value enables Footprint Playback Detection. |
| channel_selector | nuance.biosec.v1.AudioChannelSelector | Optional. Specifies the processed channel when processing media with multiple channels. This parameter is ignored if the media has a single channel or if the input is gk_processed_audio_id. |
DetectAudioSpoofingResponse
Output message that defines parameters returned by DetectAudioSpoofing.
| Field | Type | Description |
|---|---|---|
| status | nuance.rpc.Status | General operation status. |
| audio_details | nuance.biosec.v1.AudioDetails | General audio metrics, such as gross audio, net audio, SNR, and so on. |
| validity | nuance.biosec.v1.AudioValidity | Audio validity status. For invalid audio, indicates the invalidity reason. |
| synthetic_speech_detection_result | SyntheticSpeechDetectionResult | Result of Synthetic Speech Detection. |
| channel_playback_detection_result | ChannelPlaybackDetectionResult | Result of Channel Playback Detection. |
| footprint_playback_detection_result | FootprintPlaybackDetectionResult | Result of Footprint Playback Detection. |
DetectLivenessRequest
Input message that defines parameters for DetectLiveness.
Uses the context field as follows:
- gk_engagement_id: Mandatory
- gk_session_id: Mandatory
- gk_scope_id: Mandatory
- configset_id: Mandatory
| Field | Type | Description |
|---|---|---|
| context | nuance.biosec.v1.Context | Mandatory. General request context. |
| One of audio: | Mandatory. Audio that the system uses as reference when comparing it with the random audio. |
|
| gk_media_segment_id | nuance.biosec.v1.UniqueId | Unique ID of the new media segment. |
| gk_processed_audio_id | nuance.biosec.v1.UniqueId | Unique ID of the processed audio. |
| random_audio_set | repeated RandomAudio | Mandatory. One or more audio samples of the person responding to a liveness prompt. |
| gk_person_id | nuance.biosec.v1.UniqueId | Optional, owner of the audio. When set, the system handles the audio as personal information. |
| channel_selector | nuance.biosec.v1.AudioChannelSelector | Optional. Specifies the processed channel when processing media with multiple channels. This parameter is ignored, if the media has a single channel or if the input is gk_processed_audio_id. |
DetectLivenessResponse
Output message that defines parameters returned by DetectLiveness.
| Field | Type | Description |
|---|---|---|
| status | nuance.rpc.Status | General operation status. |
| result | DetectLivenessResult | Liveness Detection result. |
DetectLivenessResult
Contains the liveness Detection scores and decision. Included in DetectLivenessResponse.
| Field | Type | Description |
|---|---|---|
| risk_engine_result | nuance.biosec.v1.RiskEngineResult | Level of risk and its reliability, computed by the risk engine. |
| liveness_detection_score | google.protobuf.FloatValue | Raw liveness detection score. |
| decision | nuance.biosec.v1.Decision | Indicates if the media segment is a recording. |
| reason | DecisionReason | The reason of the decision. |
| details | repeated RandomAudioDetails | Detailed information for each random phrase recording. |
| gk_reference_processed_audio_id | nuance.biosec.v1.UniqueId | Unique ID of the processed audio that the system uses as reference when comparing it with the random audio. |
FootprintPlaybackDetectionParameters
Enables Footprint Playback Detection. Included in DetectAudioSpoofingRequest.
| Field | Type | Description |
|---|---|---|
| gk_voiceprint_profile_id | nuance.biosec.v1.UniqueId | Mandatory. Unique ID of the voiceprint that the method uses to retrieve previous footprints. |
FootprintPlaybackDetectionResult
Contains the Footprint Playback Detection scores and decision. Included in DetectAudioSpoofing.
| Field | Type | Description |
|---|---|---|
| gk_media_segment_id | nuance.biosec.v1.UniqueId | Unique ID of the media segment used for detection (if only a subset of audio was used, the value may be different from the input). |
| gk_processed_audio_id | nuance.biosec.v1.UniqueId | Unique ID of the processed audio. |
| decision | nuance.biosec.v1.Decision | Indicates whether the given audio was detected as playback. |
| reason | DecisionReason | The reason of the decision. |
| result | nuance.biosec.v1.RiskEngineResult | Level of risk and its reliability, computed by the risk engine. |
| score | google.protobuf.FloatValue | Raw Footprint Playback Detection score. |
GetLivenessPromptRequest
Input message that defines parameters for GetLivenessPrompt.
Uses the context field as follows:
- gk_engagement_id: Mandatory
- gk_session_id: Mandatory
- gk_scope_id: Mandatory
- configset_id: Mandatory
| Field | Type | Description |
|---|---|---|
| context | nuance.biosec.v1.Context | Mandatory. General request context. |
GetLivenessPromptResponse
Output message that defines parameters returned by GetLivenessPrompt.
| Field | Type | Description |
|---|---|---|
| status | nuance.rpc.Status | General operation status. |
| expected_text | string | The expected text. |
| ivr_info | string | Additional information meant to assist with prompting the caller to say the expected phrase. |
RandomAudio
Contains text and an audio recording of a random phrase. Included in DetectLivenessRequest.
| Field | Type | Description |
|---|---|---|
| One of audio: | Mandatory. Audio for processing. |
|
| gk_media_segment_id | nuance.biosec.v1.UniqueId | Unique ID of the new media segment. |
| gk_processed_audio_id | nuance.biosec.v1.UniqueId | Unique ID of the processed audio. |
| expected_text | string | Mandatory. Expected text. |
| channel_selector | nuance.biosec.v1.AudioChannelSelector | Optional. Specifies the processed channel when processing media with multiple channels. This parameter is ignored if the media has a single channel or if the input is gk_processed_audio_id. |
RandomAudioDetails
Contains detailed scores and decision for each random phrase recording. Included in DetectLivenessResult.
| Field | Type | Description |
|---|---|---|
| gk_media_segment_id | nuance.biosec.v1.UniqueId | Unique ID of the media segment used (if only a subset of audio was used, the value may be different from the input). |
| gk_processed_audio_id | nuance.biosec.v1.UniqueId | Unique ID of the processed audio. |
| validity | nuance.biosec.v1.AudioValidity | Audio validity status. In case audio is not valid, the field contains the invalidity reason. |
| biometric_score | google.protobuf.FloatValue | Raw score from comparing this audio with the fixed text phrase used in Verify. |
| text_validation_score | google.protobuf.FloatValue | Raw text validation score for this media segment. |
SyntheticSpeechDetectionParameters
Enables Synthetic Speech Detection. Included in DetectAudioSpoofingRequest.
SyntheticSpeechDetectionResult
Contains the Synthetic Speech Detection scores and decision. Included in DetectAudioSpoofingResponse.
| Field | Type | Description |
|---|---|---|
| gk_media_segment_id | nuance.biosec.v1.UniqueId | Unique ID of the media segment used for detection (if only a subset of audio was used, the value may be different from the input). |
| gk_processed_audio_id | nuance.biosec.v1.UniqueId | Unique ID of the processed audio. |
| decision | nuance.biosec.v1.Decision | Indicates whether audio was classified as synthetic. |
| reason | DecisionReason | The reason of the decision. |
| result | nuance.biosec.v1.RiskEngineResult | Level of risk and reliability, computed by the risk engine. |
| score | google.protobuf.FloatValue | Raw Synthetic Speech Detection score. |
TextDetails
Contains details about the transcribed text.
| Field | Type | Description |
|---|---|---|
| gk_text_id | nuance.biosec.v1.UniqueId | Optional. Unique ID of the transcribed text. |
| formatted_text | google.protobuf.StringValue | Optional. Formatted text of the result, for example, $500. Word details are referred to this field. |
| minimally_formatted_text | google.protobuf.StringValue | Optional. Slightly formatted text of the result, for example, five hundred dollars. |
| data_pack | DataPack | Optional. Data pack information. |
| word_details | repeated WordDetails | Optional. Repeated. One or more recognized words in the result. |
| redaction_status | RedactionStatus | Optional. Indicates if the text is plain, masked, or redacted. |
| quality_check | google.protobuf.FloatValue | —————— Convoprints-Only —————— Optional. A score between 0 and 1 that represents the quality of the text. Relevant only for Convoprint APIs. |
| raw_quality | google.protobuf.FloatValue | Optional. A uncapped score that represents the quality of the text. Relevant only for Convoprint APIs. |
| gk_calibration_model_revision_id | nuance.biosec.v1.UniqueId | Optional. Unique ID of the calibration model that the system used to create the text model. |
| text_model_created | google.protobuf.BoolValue | Optional. Indicates if a text model has been created. |
TranscribeAudioDetails
Information about the audio.
| Field | Type | Description |
|---|---|---|
| gk_media_segment_id | nuance.biosec.v1.UniqueId | Optional. Unique ID of the media segment. |
| gk_processed_audio_id | nuance.biosec.v1.UniqueId | Optional. Unique ID of the audio returned by a processing method. |
| gross_audio | google.protobuf.Duration | Optional. Amount of gross audio including speech, noise, and silence. Range and semantic is the same values as returned by Nuance Recognizer API . |
| net_audio | google.protobuf.Duration | Optional. Amount of speech is equal to the utterance duration. Range and semantic is the same values as returned by Nuance Recognizer API . |
| abs_start_ms | google.protobuf.UInt32Value | Optional. Audio stream start time. Range and semantic is the same values as returned by Nuance Recognizer API . |
| abs_end_ms | google.protobuf.UInt32Value | Optional. Audio stream end time. Range and semantic is the same values as returned by Nuance Recognizer API . |
| initial_silence | google.protobuf.Duration | Optional. Silence observed before start of utterance. Range and semantic is the same values as returned by Nuance Recognizer API . |
| media_number_of_channels | google.protobuf.UInt32Value | Optional. Number of audio input channels. Values are 1 for mono and 2 for stereo. |
| media_sampling_rate_hz | google.protobuf.UInt32Value | Optional. Sampling rate of the input audio in Hertz. It can be different from the one used for processing. |
| selected_channel | nuance.biosec.v1.AudioChannelSelector | Optional. Specifies the processed channel when processing media with multiple channels. This parameter is not set if the media has a single channel. |
| processed_audio_number_of_channels | google.protobuf.UInt32Value | Optional. Number of audio channels in the processed audio. Values are 1 for mono and 2 for stereo. |
| processed_audio_sampling_rate_hz | google.protobuf.UInt32Value | Optional. Sampling rate used for processing the audio. Value is in Hertz and can differ from the value of the input audio. |
TranscribeRequest
Input message that defines parameters for Transcribe.
Uses the context field as follows:
- gk_engagement_id: Mandatory
- gk_session_id: Mandatory
- gk_scope_id: Mandatory
- configset_id: Mandatory
| Field | Type | Description |
|---|---|---|
| context | nuance.biosec.v1.Context | Mandatory. General request context. |
| One of audio: | Mandatory. Audio for processing. |
|
| gk_media_segment_id | nuance.biosec.v1.UniqueId | Unique ID of the new media segment. |
| gk_processed_audio_id | nuance.biosec.v1.UniqueId | Unique ID of the processed audio. |
| language | string | Optional. The language spoken in the audio. If not specified, the method uses the actual_language processed audio attribute or the configuration parameter. At least one of them must be valid. List of available languages can be found here: https://docs.nuance.com/mix/overview/mix-geographies/ Contact Nuance account manager to get the list of available languages in your region. |
| gk_person_id | nuance.biosec.v1.UniqueId | Optional, owner of the audio. When set, the system handles the audio as personal information. |
| channel_selector | nuance.biosec.v1.AudioChannelSelector | Optional. Specifies the processed channel when processing media with multiple channels. This parameter is ignored if the media has a single channel or if the input is gk_processed_audio_id. |
TranscribeResponse
Output message that defines parameters returned by Transcribe.
| Field | Type | Description |
|---|---|---|
| status | nuance.rpc.Status | Mandatory. General operation status. |
| result | TranscribeResult | Optional. Text validation result. |
TranscribeResult
Contains the text validation score and decision. Included in TranscribeResponse.
| Field | Type | Description |
|---|---|---|
| language | string | Optional. Spoken language. List of available languages can be found here: https://docs.nuance.com/mix/overview/mix-geographies/ . |
| text | string | Optional. Spoken text. |
| transcribed | bool | Indicates if a transcription has been triggered. |
| gk_processed_audio_id | nuance.biosec.v1.UniqueId | Optional. Unique ID of the processed audio. |
| gk_text_id | nuance.biosec.v1.UniqueId | Optional. Unique ID of the transcribed text. |
| transcribe_audio_details | TranscribeAudioDetails | Optional. Transcription audio metrics, such as gross audio, net audio, SNR, and so on. |
| text_details | TextDetails | Optional. Text details, such as Confidence, formatted text, word details, and so on. |
ValidateTextRequest
Input message that defines parameters for ValidateText.
Uses the context field as follows:
- gk_engagement_id: Mandatory
- gk_session_id: Mandatory
- gk_scope_id: Mandatory
- configset_id: Mandatory
| Field | Type | Description |
|---|---|---|
| context | nuance.biosec.v1.Context | Mandatory. General request context. |
| One of audio: | Mandatory. Audio for processing. |
|
| gk_media_segment_id | nuance.biosec.v1.UniqueId | Unique ID of the new media segment. |
| gk_processed_audio_id | nuance.biosec.v1.UniqueId | Unique ID of the processed audio. |
| expected_text | string | Mandatory, the expected text. |
| gk_person_id | nuance.biosec.v1.UniqueId | Optional, owner of the audio. When set, the system handles the audio as personal information. |
| channel_selector | nuance.biosec.v1.AudioChannelSelector | Optional. Specifies the processed channel when processing media with multiple channels. This parameter is ignored, if the media has a single channel or if the input is gk_processed_audio_id. |
ValidateTextResponse
Output message that defines parameters returned by ValidateText.
| Field | Type | Description |
|---|---|---|
| status | nuance.rpc.Status | General operation status. |
| result | ValidateTextResult | Text validation result. |
ValidateTextResult
Contains the text validation score and decision. Included in ValidateTextResponse.
| Field | Type | Description |
|---|---|---|
| result | nuance.biosec.v1.RiskEngineResult | Level of risk and its reliability, computed by the risk engine. |
| score | google.protobuf.FloatValue | Raw text validation score. |
| decision | nuance.biosec.v1.Decision | Indicates if the speaker said the required text. |
| reason | DecisionReason | Reason of the decision. |
| detected_text | string | Spoken text. |
| gk_processed_audio_id | nuance.biosec.v1.UniqueId | Unique ID of the processed audio. |
WordDetails
Contains details about the transcribed words.
| Field | Type | Description |
|---|---|---|
| text | google.protobuf.StringValue | Optional. The recognized word. |
| confidence | google.protobuf.FloatValue | Optional. The confidence score of the recognized word, 0 to 1. Range and semantic is the same values as returned by Nuance Recognizer API . |
| start_ms | google.protobuf.UInt32Value | Optional. Word start offset in the audio stream. Range and semantic is the same values as returned by Nuance Recognizer API . |
| end_ms | google.protobuf.UInt32Value | Optional. Word end offset in the audio stream. Range and semantic is the same values as returned by Nuance Recognizer API . |
| silence_after_word | google.protobuf.Duration | Optional. The amount of silence, in ms, detected after the word. Range and semantic is the same values as returned by Nuance Recognizer API . |
| redaction_status | RedactionStatus | Optional. Indicates if the word is plain, masked, or redacted. |
audio_processing_common_types.proto
DecisionReason
Audio processing and spoofing detection decision reason.
| Name | Number | Description |
|---|---|---|
| DECISION_REASON_UNSPECIFIED | 0 | Decision reason is not specified. |
| DECISION_REASON_AUDIO_OK | 1 | Audio is valid. |
| DECISION_REASON_NOT_ENOUGH_SEGMENTS | 2 | Processing requires more audio segments than provided. |
| DECISION_REASON_INVALID_AUDIO | 3 | Audio format is invalid or not supported. |
| DECISION_REASON_AUDIO_TOO_SHORT | 4 | Audio does not contain the amount of speech required to complete the process. |
| DECISION_REASON_AUDIO_TOO_SOFT | 5 | Audio speech level is lower than the level required to complete the process. |
| DECISION_REASON_AUDIO_TOO_LOUD | 6 | Audio is too loud and causes saturation. |
| DECISION_REASON_AUDIO_TOO_NOISY | 7 | Audio SNR (Signal to Noise Ratio) is too low. |
| DECISION_REASON_SYNTHETIC_SPEECH_DETECTED | 8 | Audio is likely to be generated by a synthesizer. |
| DECISION_REASON_PLAYBACK_INDICATION | 9 | Audio is likely to be a playback and not a live recording. |
| DECISION_REASON_LOW_RELIABILITY | 10 | The system could not reach a reliable decision. |
| DECISION_REASON_INTERNAL_ERROR | 999 | An error occurred while making the decision. |
RedactionStatus
Redaction status of word or full text.
| Name | Number | Description |
|---|---|---|
| REDACTION_STATUS_UNSPECIFIED | 0 | Unspecified value. |
| REDACTION_STATUS_PLAIN | 1 | The text is written in plain. |
| REDACTION_STATUS_MASKED | 2 | The text is written in plain but it is marked as masked. |
| REDACTION_STATUS_REDACTED | 3 | The text is redacted and cannot be read in any way. |