https://retellai.com/?utm_source=discord&utm_medium=seo logo
For a given call, how can I figure out what voice ...
# ❓・ai-evy-support
s
@AI Evy For a given call, how can I figure out what voice was used
a
Thanks for tagging me @sperg. I'll look through relevant sources and get back to you shortly.
### Answer --- The call object itself doesn't directly include the
voice_id
field. However, you can determine the voice used by following these steps: 1. Get the
agent_id
and
agent_version
from the call
— The List Calls response includes both
agent_id
and
agent_version
fields for each call. [(1) ]() 2. Retrieve that specific agent version — Use the Get Agent Versions endpoint with the
agent_id
to get all versions of the agent, then find the version that matches the
agent_version
from your call. [(2) ]() The agent version object contains the
voice_id
field (e.g.,
"11labs-Adrian"
) .
Copy code
javascript
import Retell from 'retell-sdk';
const client = new Retell({
  apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const agentResponses = await client.agent.getVersions('16b980523634a6dc504898cda492e939') ;
console.log(agentResponses) ;
Each agent version in the response includes
voice_id
,
voice_model
,
fallback_voice_ids
, and other voice-related settings.
​ To learn more, see the sources I considered: [[1] List Calls](https://docs.retellai.com/api-references/list-calls) [[2] Get Agent Versions](https://docs.retellai.com/api-references/get-agent-versions) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
s
ok the agent version is 1 and I have the agent id - what next
@AI Evy ok the agent version is 1 and I have the agent id - what next
a
Thanks for the follow-up, @sperg. I'll get back to you soon.
### Answer --- Use the Get Voice Agent endpoint with your
agent_id
and pass the
version
as a query parameter to retrieve that specific version's configuration, including the
voice_id
. [(1) ]()
Copy code
javascript
import Retell from 'retell-sdk';
const client = new Retell({
  apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const agentResponse = await client.agent.retrieve('16b980523634a6dc504898cda492e939') ;
console.log(agentResponse.agent_id) ;
Replace the agent ID with yours. The
version
query parameter accepts an integer (in your case,
1
) . The response will include the
voice_id
field (e.g.,
"11labs-Adrian"
) , along with other voice settings like
voice_model
,
fallback_voice_ids
,
voice_temperature
, and
voice_speed
.
​ To learn more, see the sources I considered: [[1] Get Voice Agent](https://docs.retellai.com/api-references/get-agent) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
s
hmmm really interesting take a look "language": "en-US", "data_storage_setting": "everything", "end_call_after_silence_ms": 60000, "version": 1, "is_published": false, "voice_id": "custom_voice_95f836dc753c283764ced85ad5", "fallback_voice_ids": [ "openai-Nova" ], @AI Evy
a
Thanks for the follow-up, @sperg. I'll get back to you soon.
### Answer You've successfully retrieved the voice information for that agent version. The
voice_id
is
"custom_voice_95f836dc753c283764ced85ad5"
, which indicates a custom voice was used for this call. [(1) ]() If you want more details about this specific voice (like the voice name, provider, accent, gender, or a preview audio URL) , you can use the Get Voice endpoint: [(2) ]()
Copy code
javascript
import Retell from 'retell-sdk';
const client = new Retell({
  apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const voiceResponse = await client.voice.retrieve('custom_voice_95f836dc753c283764ced85ad5') ;
console.log(voiceResponse.provider) ;
This will return details like
voice_name
,
provider
(e.g.,
elevenlabs
,
openai
,
deepgram
) ,
gender
,
accent
,
age
, and
preview_audio_url
. You also have
"openai-Nova"
set as a fallback voice, which would be used if the primary voice provider experiences outages. [(1) ]()
​ To learn more, see the sources I considered: [[1] Get Voice Agent](https://docs.retellai.com/api-references/get-agent) [[2] Get Voice](https://docs.retellai.com/api-references/get-voice) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
s
hmmmm very fucking interestring { "voice_id": "custom_voice_95f836dc753c283764ced85ad5", "voice_type": "custom", "voice_name": "New York Nick - Modern NYC Wiseguy", "provider": "elevenlabs", "avatar_url": "https://retell-utils-public.s3.us-west-2.amazonaws.com/customvoice-icon.png", "preview_audio_url": "https://retell-utils-public.s3.us-west-2.amazonaws.com/custom_voice_95f836dc753c283764ced85ad5.mp3" } @AI Evy
a
Thanks for the follow-up, @sperg. I'll get back to you soon.
​ To learn more, see the sources I considered: [[1] Get Voice](https://docs.retellai.com/api-references/get-voice) [[2] Get Voice Agent](https://docs.retellai.com/api-references/get-agent) [[3] List Voices](https://docs.retellai.com/api-references/list-voices) ​
### Answer You've now got the full picture. The Get Voice endpoint returned exactly what you needed: [(1) ]() - **Voice Name**: "New York Nick - Modern NYC Wiseguy" - **Provider**:
elevenlabs
- **Voice Type**:
custom
(indicating this is a custom ElevenLabs voice, not one of the stock voices) - **Preview Audio**: You can listen to a sample at that
preview_audio_url
So for that call, your agent (version 1) used a custom ElevenLabs voice called "New York Nick - Modern NYC Wiseguy". , [(2) ]() If you ever want to see all voices available in your account, you can use the List Voices endpoint: [(3) ]()
Copy code
javascript
import Retell from 'retell-sdk';
const client = new Retell({
  apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const voiceResponses = await client.voice.list() ;
console.log(voiceResponses) ;
This will return all voices (both stock and custom) with their details.
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.