Search Identity
Search for matching identities based on an audio sample.
HTTP Request
POST https://app.resemble.ai/api/v2/identity/search
Request Body
Parameter | Type | Description |
---|---|---|
url | Required | The 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
Field | Type | Description |
---|---|---|
success | boolean | Indicates whether the operation was successful |
item | object | An object containing matching identity information |
identity_id | string | Unique identifier for the matched identity (used as key in the item object) |
name | string | The name of the matched identity |
distance | number | A 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 uniqueidentity_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
- Audio Quality: For the best results, ensure the audio sample is of good quality and contains clear speech.
- 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.
- Background Noise: Minimize background noise in the audio sample for more accurate results.
- 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.