Our Batch Transcription API allows you to accurately transcribe pre-recorded audio files. The process is asynchronous, meaning you start a transcription job and we notify you (or you can check) when it's complete.
This guide covers the entire workflow, from uploading your audio to retrieving the final transcription.
using System.Net.Http;
public static async Task UploadAudio(string presignedUrl, byte[] audioFile, string mimeType)
{
using var client = new HttpClient();
var content = new ByteArrayContent(audioFile);
content.Headers.ContentType = new System.Net.Http.Headers.MediaTypeHeaderValue(mimeType);
var response = await client.PutAsync(presignedUrl, content);
if (response.IsSuccessStatusCode)
{
Console.WriteLine("Upload successful! Transcription is now processing.");
}
else
{
Console.WriteLine($"Upload failed: {response.ReasonPhrase}");
}
}
Once the upload is complete, our servers will begin processing the audio. You can get the result using one of the following methods.
Option A: Webhooks (Recommended)
If you provided a callbackUrl in Step 1, our server will send an HTTP POST request to your URL once the transcription is complete.
Your endpoint should be prepared to receive the following body:
using System.Security.Cryptography;
using System.Text;
public static bool ValidateSignature(string signature)
{
try
{
var secret = Environment.GetEnvironmentVariable("APP_SECRET")!;
var appId = Environment.GetEnvironmentVariable("APP_ID")!;
var apiKey = Environment.GetEnvironmentVariable("API_KEY")!;
var expectedValue = $"{appId}~{apiKey}";
// Decrypt AES (CryptoJS-compatible)
var keyBytes = Encoding.UTF8.GetBytes(secret);
using var aes = Aes.Create();
aes.Key = keyBytes;
aes.Mode = CipherMode.CBC;
var cipherBytes = Convert.FromBase64String(signature);
var iv = cipherBytes[..16];
var encrypted = cipherBytes[16..];
aes.IV = iv;
using var decryptor = aes.CreateDecryptor();
var decrypted = decryptor.TransformFinalBlock(encrypted, 0, encrypted.Length);
var originalText = Encoding.UTF8.GetString(decrypted);
return originalText == expectedValue;
}
catch
{
return false;
}
}