Get Audio
curl --request GET \
--url https://api.example.com/v1/recordings/{id}/audioimport requests
url = "https://api.example.com/v1/recordings/{id}/audio"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/v1/recordings/{id}/audio', 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.example.com/v1/recordings/{id}/audio",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.example.com/v1/recordings/{id}/audio"
req, _ := http.NewRequest("GET", url, nil)
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.example.com/v1/recordings/{id}/audio")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/recordings/{id}/audio")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"url": "<string>",
"contentType": "<string>",
"duration": 123
}Recordings
Get Audio
Get the audio file URL for a recording
GET
/
v1
/
recordings
/
{id}
/
audio
Get Audio
curl --request GET \
--url https://api.example.com/v1/recordings/{id}/audioimport requests
url = "https://api.example.com/v1/recordings/{id}/audio"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/v1/recordings/{id}/audio', 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.example.com/v1/recordings/{id}/audio",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.example.com/v1/recordings/{id}/audio"
req, _ := http.NewRequest("GET", url, nil)
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.example.com/v1/recordings/{id}/audio")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/recordings/{id}/audio")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"url": "<string>",
"contentType": "<string>",
"duration": 123
}Returns a URL to download or stream the audio file for a recording.
Path Parameters
string
required
The recording ID
Request
curl -X GET "https://app.transcord.app/api/v1/recordings/clx1234567890/audio" \
-H "Authorization: Bearer tr_live_your_api_key"
const recordingId = 'clx1234567890';
const response = await fetch(`https://app.transcord.app/api/v1/recordings/${recordingId}/audio`, {
headers: {
'Authorization': 'Bearer tr_live_your_api_key'
}
});
const { url } = await response.json();
// Download the audio file
const audioResponse = await fetch(url);
const audioBuffer = await audioResponse.arrayBuffer();
import requests
recording_id = 'clx1234567890'
response = requests.get(
f'https://app.transcord.app/api/v1/recordings/{recording_id}/audio',
headers={'Authorization': 'Bearer tr_live_your_api_key'}
)
data = response.json()
# Download the audio file
audio_response = requests.get(data['url'])
with open('recording.wav', 'wb') as f:
f.write(audio_response.content)
Response
string
Signed URL to download the audio file. Valid for 1 hour.
string
Audio MIME type (typically
audio/wav or audio/mpeg)number
Audio duration in seconds
Response
{
"url": "https://api.twilio.com/...",
"contentType": "audio/wav",
"duration": 342
}
The URL is a signed URL that expires after 1 hour. If you need long-term access, download the file and store it yourself.
Audio Not Ready
If the recording is still being processed, you’ll receive a202 Accepted response:
{
"error": "Recording not ready",
"status": "processing"
}
Errors
| Status | Description |
|---|---|
202 | Recording is still processing |
401 | Invalid or missing API key |
404 | Recording not found |
⌘I