Chirp 2 Transcription
chirp-2Google Cloud Speech-to-Text Chirp 2 for transcription and supported speech translation workflows.
API Docs
Google Cloud Speech-to-Text Chirp 2 for transcription and supported speech translation workflows.
Text-to-speech, GPT audio chat, realtime sessions, transcription-oriented catalog rows, and voice settings. Endpoint: https://omixa.cloud/api/v1/audio
Google Cloud Speech-to-Text Chirp 2 for transcription and supported speech translation workflows.
Use Omixa's unified endpoint and your workspace API key. Provider routing, billing, failover, and usage records are handled by Omixa.
https://omixa.cloud/api/v1/audio
Only send options supported by this model. Required fields and accepted values are listed below.
| Field | يكتب | Required | Accepted values | وصف |
|---|---|---|---|---|
model |
string | Yes | chirp-2 | Use `chirp-2`. Omixa resolves the active provider route and failover key automatically. |
task |
string | No | transcription, translation | Speech workflow supported by this model. |
file_data |
base64|string | Yes | Any valid value | Source speech audio as raw base64 or an audio data URL. |
filename |
string | Yes | Any valid value | Original filename including a supported audio extension. |
mime_type |
string | Yes | Any valid value | Audio MIME type such as `audio/wav`, `audio/mpeg`, or `audio/flac`. |
language |
string | No | Any valid value | Source BCP-47 language code. Chirp 3 can use `auto` for automatic language recognition. |
response_format |
string | No | json | Normalized transcript response format. |
target_language |
string | No | en-US, ar-EG, fr-FR, ... | Target BCP-47 language for Chirp 2 speech translation. |
Start with this model-safe payload and expect the normalized Omixa response shape shown beside it.
{
"model": "chirp-2",
"task": "transcription",
"file_data": "data:audio/wav;base64,<base64-audio>",
"filename": "speech.wav",
"mime_type": "audio/wav",
"language": "en-US",
"response_format": "json"
}
{
"object": "audio.transcription",
"text": "Transcribed speech...",
"segments": [],
"words": [],
"usage": {
"estimated_audio_minutes": "0.100000"
}
}
Replace the example API key with a workspace key and keep model-specific fields unchanged unless the table above marks them optional.
curl -X POST https://omixa.cloud/api/v1/audio \
-H "Authorization: Bearer omx_live_xxx" \
-H "Content-Type: application/json" \
-d '{
"model": "chirp-2",
"task": "transcription",
"file_data": "data:audio/wav;base64,<base64-audio>",
"filename": "speech.wav",
"mime_type": "audio/wav",
"language": "en-US",
"response_format": "json"
}'
const response = await fetch('https://omixa.cloud/api/v1/audio', {
method: 'POST',
headers: {
'Authorization': 'Bearer omx_live_xxx',
'Content-Type': 'application/json'
},
body: "{\n \"model\": \"chirp-2\",\n \"task\": \"transcription\",\n \"file_data\": \"data:audio/wav;base64,<base64-audio>\",\n \"filename\": \"speech.wav\",\n \"mime_type\": \"audio/wav\",\n \"language\": \"en-US\",\n \"response_format\": \"json\"\n}"
});
const data = await response.json();
import requests
response = requests.post(
'https://omixa.cloud/api/v1/audio',
headers={'Authorization': 'Bearer omx_live_xxx', 'Content-Type': 'application/json'},
json={
"model": "chirp-2",
"task": "transcription",
"file_data": "data:audio/wav;base64,<base64-audio>",
"filename": "speech.wav",
"mime_type": "audio/wav",
"language": "en-US",
"response_format": "json"
}
)
print(response.json())
$ch = curl_init('https://omixa.cloud/api/v1/audio');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => ['Authorization: Bearer omx_live_xxx', 'Content-Type: application/json'],
CURLOPT_POSTFIELDS => '{
"model": "chirp-2",
"task": "transcription",
"file_data": "data:audio/wav;base64,<base64-audio>",
"filename": "speech.wav",
"mime_type": "audio/wav",
"language": "en-US",
"response_format": "json"
}',
CURLOPT_RETURNTRANSFER => true,
]);
$response = curl_exec($ch);
using var client = new HttpClient();
client.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Bearer", "omx_live_xxx");
var json = @"{
""model"": ""chirp-2"",
""task"": ""transcription"",
""file_data"": ""data:audio/wav;base64,<base64-audio>"",
""filename"": ""speech.wav"",
""mime_type"": ""audio/wav"",
""language"": ""en-US"",
""response_format"": ""json""
}";
var response = await client.PostAsync("https://omixa.cloud/api/v1/audio", new StringContent(json, System.Text.Encoding.UTF8, "application/json"));
var body = await response.Content.ReadAsStringAsync();
payload := []byte(`{
"model": "chirp-2",
"task": "transcription",
"file_data": "data:audio/wav;base64,<base64-audio>",
"filename": "speech.wav",
"mime_type": "audio/wav",
"language": "en-US",
"response_format": "json"
}`)
req, _ := http.NewRequest("POST", "https://omixa.cloud/api/v1/audio", bytes.NewReader(payload))
req.Header.Set("Authorization", "Bearer omx_live_xxx")
req.Header.Set("Content-Type", "application/json")
resp, err := http.DefaultClient.Do(req)