Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:Elevenlabs Elevenlabs python VerificationAttemptResponse

From Leeroopedia
Revision as of 12:26, 16 February 2026 by Admin (talk | contribs) (Auto-imported from implementations/Elevenlabs_Elevenlabs_python_VerificationAttemptResponse.md)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Attribute Value
Sources src/elevenlabs/types/verification_attempt_response.py
Domains Voice Verification, Identity
Last Updated 2026-02-15

Overview

Description

The VerificationAttemptResponse model represents the result of a voice verification attempt in the ElevenLabs SDK. Voice verification is used to confirm that a user has the right to use a particular voice by having them read a specific text passage and comparing the recording against the original voice. This model captures the verification text, timestamp, acceptance status, similarity score, Levenshtein distance (for text accuracy), and an optional recording reference.

Usage

This model is returned as part of the voice verification workflow. After a user submits a verification recording, the API evaluates it and returns a VerificationAttemptResponse indicating whether the attempt was accepted, along with quantitative metrics (similarity score and Levenshtein distance) for the match quality.

Code Reference

Source Location

src/elevenlabs/types/verification_attempt_response.py

Class Signature

class VerificationAttemptResponse(UncheckedBaseModel):
    ...

Import Statement

from elevenlabs.types import VerificationAttemptResponse

Base Class

UncheckedBaseModel (from elevenlabs.core.unchecked_base_model)

I/O Contract

Field Type Required Description
text str Yes The text of the verification attempt.
date_unix int Yes The date of the verification attempt in Unix time.
accepted bool Yes Whether the verification attempt was accepted.
similarity float Yes The similarity score of the verification attempt.
levenshtein_distance float Yes The Levenshtein distance of the verification attempt (measures text accuracy).
recording Optional[RecordingResponse] No The recording of the verification attempt.

Usage Examples

from elevenlabs import ElevenLabs

client = ElevenLabs(api_key="your_api_key")

# Access verification attempts through voice verification data
voice = client.voices.get(voice_id="voice_abc123")

if voice.voice_verification:
    for attempt in voice.voice_verification.verification_attempts:
        print(f"Text: {attempt.text}")
        print(f"Date: {attempt.date_unix}")
        print(f"Accepted: {attempt.accepted}")
        print(f"Similarity: {attempt.similarity}")
        print(f"Levenshtein Distance: {attempt.levenshtein_distance}")

        if attempt.recording:
            print(f"Recording available: {attempt.recording}")
        print("---")

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment