The AlphaEdge Audio & Transcription API lets you transcribe audio files to text. This feature is optimized for high performance and accuracy.
This page guides you through using the Audio & Transcription API, from the basics to advanced use cases.
Real-time audio transcription and audio file analysis
chef amond 1989 est un système cbr qui réalise des recettes de cuisine.
The AlphaEdge Audio & Transcription API lets you transcribe audio files to text. This feature is optimized for high performance and accuracy.
This page guides you through using the Audio & Transcription API, from the basics to advanced use cases.
Here is a minimal example to get started with the Audio & Transcription API:
import requests
url = "https://api-endpoints.alphaedge-ai.com/models/alpha-audio-v1/transcript"
headers = {"X-API-Key": "TA_CLE"}
with open("/chemin/audio.wav", "rb") as f:
files = {"audio": ("audio.wav", f, "audio/wav")}
data = {
"enable_diarization": "true",
"enable_postcorrect": "true",
}
r = requests.post(url, headers=headers, files=files, data=data, timeout=300)
print(r.status_code)
print(r.json())
curl https://api-endpoints.alphaedge-ai.com/models/alpha-audio-v1/transcript \
-H "X-API-Key: TA_CLE" \
-F "file=@audio.mp3" \
-F "model=alphaedge-audio-3"
import fs from "node:fs";
const form = new FormData();
form.append("audio", new Blob([fs.readFileSync("/chemin/audio.wav")]), "audio.wav");
form.append("enable_diarization", "true");
form.append("enable_postcorrect", "true");
const res = await fetch("https://api-endpoints.alphaedge-ai.com/models/alpha-audio-v1/transcript", {
method: "POST",
headers: { "X-API-Key": "TA_CLE" },
body: form
});
console.log(res.status, await res.json());
Here are the available parameters for the Audio & Transcription API:
| PARAMETER | TYPE | REQUIRED | DEFAULT | DESCRIPTION |
|---|---|---|---|---|
model |
string | Yes | - | Le nom du modèle à utiliser (ex: alphaedge-audio-3) |
file |
File | Yes | - | Le fichier audio à transcrire |
enable_diarization |
boolean | No | false | Active la diarisation des locuteurs. |
enable_postcorrection |
boolean | No | false | Active la post-correction de la transcription. |
The AlphaEdge Audio & Transcription API supports a wide variety of audio formats for transcription. Here is the full list of supported formats:
The API can also extract and transcribe audio from video files:
L'API Audio & Transcription retourne une réponse au format JSON. Voici un exemple de structure de réponse :
{
"id": "req_abc123",
"object": "audio.response",
"created": 1677652288,
"model": "alphaedge-audio-3",
"text": "Le texte transcrit depuis l'audio...",
"usage": {
"total_tokens": 60
}
}
Obtenez une transcription avec des timestamps pour chaque segment :
import requests
url = "https://api-endpoints.alphaedge-ai.com/models/alpha-audio-v1/transcript"
headers = {"X-API-Key": "TA_CLE"}
with open("/chemin/audio.wav", "rb") as f:
files = {"audio": ("audio.wav", f, "audio/wav")}
data = {
"enable_diarization": "true",
"enable_postcorrect": "true",
}
r = requests.post(url, headers=headers, files=files, data=data, timeout=300)
print(r.status_code)
print(r.json())
Here is how to handle errors properly:
import requests
url = "https://api-endpoints.alphaedge-ai.com/models/alpha-audio-v1/transcript"
headers = {"X-API-Key": "TA_CLE"}
with open("/chemin/audio.wav", "rb") as f:
files = {"audio": ("audio.wav", f, "audio/wav")}
data = {
"enable_diarization": "true",
"enable_postcorrect": "true",
}
r = requests.post(url, headers=headers, files=files, data=data, timeout=300)
print(r.status_code)
print(r.json())
import fs from "node:fs";
const form = new FormData();
form.append("audio", new Blob([fs.readFileSync("/chemin/audio.wav")]), "audio.wav");
form.append("enable_diarization", "true");
form.append("enable_postcorrect", "true");
const res = await fetch("https://api-endpoints.alphaedge-ai.com/models/alpha-audio-v1/transcript", {
method: "POST",
headers: { "X-API-Key": "TA_CLE" },
body: form
});
console.log(res.status, await res.json());
Here are some common use cases for the Audio & Transcription API:
Automatically transcribe meetings for archiving and search.
Generate automatic subtitles for your video content.
Create transcriptions to improve accessibility and SEO.
To view all available audio & transcription models with their detailed specifications, visit the Our models and filter by type.