Skip to main content
Version: 2.0.0

Search Identity

Search for matching identities based on an audio sample.

HTTP Request

POST https://app.resemble.ai/api/v2/identity/search

Request Body

ParameterTypeDescription
urlRequiredThe URL of the audio file to search identities with. Provide a valid HTTPS URL to the audio file.

HTTP Response

{
"success": true,
"item": {
"<identity_id>": {
"name": "<string>",
"distance": <number>
}
// ... potentially more identity matches
}
}

Response Fields

FieldTypeDescription
successbooleanIndicates whether the operation was successful
itemobjectAn object containing matching identity information
identity_idstringUnique identifier for the matched identity (used as key in the item object)
namestringThe name of the matched identity
distancenumberA score indicating the similarity between the provided audio and the matched identity. Lower values indicate higher similarity.

Example

curl --request POST \
--url https://app.resemble.ai/api/v2/identity/search \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-type: application/json' \
--data '{
"url": "https://example.com/audio/sample_to_search.wav"
}'

Replace YOUR_API_KEY with your actual Resemble AI API key.

Notes on Matching

  • The item object may contain multiple matches, each keyed by their unique identity_id.
  • The distance score represents the similarity between the provided audio and the matched identity. Higher distance values indicate higher similarity.
  • If no matches are found, the item object will be empty.

Best Practices

  1. Audio Quality: For the best results, ensure the audio sample is of good quality and contains clear speech.
  2. Sample Length: Provide an audio sample of sufficient length. While the exact requirements may vary, a sample of at least 5-10 seconds of speech is generally recommended for accurate matching.
  3. Background Noise: Minimize background noise in the audio sample for more accurate results.
  4. Multiple Searches: If you're unsure about the quality of your audio sample, consider performing multiple searches with different samples of the same speaker.

Privacy and Ethical Use

When using the Identity Search API, ensure that you comply with all applicable privacy laws and regulations. Only use audio samples for which you have the necessary rights and permissions. Resemble AI is committed to the ethical use of voice technology and expects its users to adhere to these principles.