Get Voice Clip Upload Channel Sample URL
curl --request GET \
--url https://api.usetuner.ai/api/v1/workspaces/{workspace_id}/agents/{agent_id}/voice-clip-uploads/{voice_clip_upload_id}/samples/{channel_index} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.usetuner.ai/api/v1/workspaces/{workspace_id}/agents/{agent_id}/voice-clip-uploads/{voice_clip_upload_id}/samples/{channel_index}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.usetuner.ai/api/v1/workspaces/{workspace_id}/agents/{agent_id}/voice-clip-uploads/{voice_clip_upload_id}/samples/{channel_index}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.usetuner.ai/api/v1/workspaces/{workspace_id}/agents/{agent_id}/voice-clip-uploads/{voice_clip_upload_id}/samples/{channel_index}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.usetuner.ai/api/v1/workspaces/{workspace_id}/agents/{agent_id}/voice-clip-uploads/{voice_clip_upload_id}/samples/{channel_index}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.usetuner.ai/api/v1/workspaces/{workspace_id}/agents/{agent_id}/voice-clip-uploads/{voice_clip_upload_id}/samples/{channel_index}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.usetuner.ai/api/v1/workspaces/{workspace_id}/agents/{agent_id}/voice-clip-uploads/{voice_clip_upload_id}/samples/{channel_index}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"url": "<string>",
"expires_at": "2023-11-07T05:31:56Z"
}{
"detail": "Not authenticated"
}{
"detail": "User does not have access to workspace 42"
}{
"detail": "Voice clip upload with ID 9 not found"
}{
"detail": "Voice clip upload 9 has no channel samples yet (status='uploaded')."
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Replay Testing
Get Voice Clip Upload Channel Sample URL
Get a short-lived presigned URL for one channel’s preview sample.
Only available once analysis has reached awaiting_selection.
GET
/
api
/
v1
/
workspaces
/
{workspace_id}
/
agents
/
{agent_id}
/
voice-clip-uploads
/
{voice_clip_upload_id}
/
samples
/
{channel_index}
Get Voice Clip Upload Channel Sample URL
curl --request GET \
--url https://api.usetuner.ai/api/v1/workspaces/{workspace_id}/agents/{agent_id}/voice-clip-uploads/{voice_clip_upload_id}/samples/{channel_index} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.usetuner.ai/api/v1/workspaces/{workspace_id}/agents/{agent_id}/voice-clip-uploads/{voice_clip_upload_id}/samples/{channel_index}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.usetuner.ai/api/v1/workspaces/{workspace_id}/agents/{agent_id}/voice-clip-uploads/{voice_clip_upload_id}/samples/{channel_index}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.usetuner.ai/api/v1/workspaces/{workspace_id}/agents/{agent_id}/voice-clip-uploads/{voice_clip_upload_id}/samples/{channel_index}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.usetuner.ai/api/v1/workspaces/{workspace_id}/agents/{agent_id}/voice-clip-uploads/{voice_clip_upload_id}/samples/{channel_index}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.usetuner.ai/api/v1/workspaces/{workspace_id}/agents/{agent_id}/voice-clip-uploads/{voice_clip_upload_id}/samples/{channel_index}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.usetuner.ai/api/v1/workspaces/{workspace_id}/agents/{agent_id}/voice-clip-uploads/{voice_clip_upload_id}/samples/{channel_index}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"url": "<string>",
"expires_at": "2023-11-07T05:31:56Z"
}{
"detail": "Not authenticated"
}{
"detail": "User does not have access to workspace 42"
}{
"detail": "Voice clip upload with ID 9 not found"
}{
"detail": "Voice clip upload 9 has no channel samples yet (status='uploaded')."
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Use Tuner API key (tr_api_...) or user session token. Find your API key in Workspace Settings > API Keys.
Path Parameters
ID of the voice clip upload
index of the speaker channel, as listed in the upload's speakers
Tuner's internal numeric ID for the agent.
Workspace ID. Find this in Workspace > General Settings.