Get a leg recording's audio
/v1/voice/legs/{leg_id}/recordings/{recording_id}/audioconst audio = await bird.voice.legs.recordings.audio(
"vcl_01krdgeqcxet5s7t44vh8rt9mg",
"vrc_01krdgeqcxet5s7t44vh8rt9mg",
);
console.log(audio.contentType, audio.contentLength);audio = client.voice.legs.recordings.audio(
"vcl_01krdgeqcxet5s7t44vh8rt9mg", "vrc_01krdgeqcxet5s7t44vh8rt9mg"
)
print(audio.content_type, audio.content_length)audio, err := client.Voice.Legs.Recordings.Audio(context.Background(),
"vcl_01krdgeqcxet5s7t44vh8rt9mg", "vrc_01krdgeqcxet5s7t44vh8rt9mg")
if err != nil {
log.Fatal(err)
}
if err := os.WriteFile("recording.wav", audio.Data, 0o600); err != nil {
log.Fatal(err)
}$audio = $bird->voice->legs->recordings->audio(
'vcl_01krdgeqcxet5s7t44vh8rt9mg',
'vrc_01krdgeqcxet5s7t44vh8rt9mg',
);
file_put_contents('recording.wav', $audio->data);bird voice legs recordings audio <leg-id> <recording-id>curl -L -X GET "https://us1.platform.bird.com/v1/voice/legs/{leg_id}/recordings/{recording_id}/audio" \
-H "Authorization: Bearer $TOKEN" \
--url-query "disposition=inline"Redirects to a short-lived URL for this recording's audio.
The bytes live in object storage and are served straight from there, so they never transit the API and no list response carries a link to them. Each request to this operation signs a fresh one.
The response is a 302 whose Location is that pre-authorized storage
URL, valid for 15 minutes, so your client must follow redirects. The
Authorization header has to be absent from the request that fetches that
URL. A client that attaches credentials centrally, at its transport,
interceptor or middleware layer rather than per request, re-adds the header
on every hop including the redirect, so the storage URL needs a client that
carries none. With curl, use version 7.58.0 or later when following the
redirect: earlier versions forward custom authorization headers to other hosts.
Treat the URL as secret for as long as it lasts. Anyone holding one can hear the audio.
Audio download is available for 30 days after the source audio starts.
The API returns 404 after that cutoff without issuing a storage URL.
An in-progress capture can appear in the inventory with its media stream
listed as open. This operation answers 425 while its audio is not ready.
If capture metadata is delayed, the recording may not appear immediately.
A recording whose capture failed has no audio to serve and answers 404.
Its transcript, if one ran, stays readable.
Answers 501 where the workspace's region has no voice media store
configured. The audio has nowhere to be read from there.
Parametry
leg_idstringThe leg the recording belongs to.
recording_idstringThe id of an entry in recordings from listVoiceCallRecordings.
Parametry zapytania
dispositionstringWhether the signed URL plays the audio or saves it. inline, the default, streams it in a browser. attachment asks the browser to save it under a filename naming the recording and when it started.
Possible values: inline, attachment
Powiązane zasoby
Przejdź do dokumentacji, przewodników i przykładów dotyczących tego tematu.