Whisper API
Whisper API, also known as Audio Scripter, is a powerful tool designed to streamline audio transcription and scripting processes.
Last updated
curl -X 'POST' \
'https://prod.api.market/api/v1/magicapi/whisper/whisper' \
-H 'accept: application/json' \
-H 'x-api-market-key: API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"audio": "https://replicate.delivery/mgxm/e5159b1b-508a-4be4-b892-e1eb47850bdc/OSR_uk_000_0050_8k.wav",
"model": "large-v3",
"translate": false,
"temperature": 0,
"transcription": "plain text",
"suppress_tokens": "-1",
"logprob_threshold": -1,
"no_speech_threshold": 0.6,
"condition_on_previous_text": true,
"compression_ratio_threshold": 2.4,
"temperature_increment_on_fallback": 0.2
}'import requests
headers = {
'accept': 'application/json',
'x-magicapi-key': 'API_KEY',
'Content-Type': 'application/json',
}
json_data = {
'audio': 'https://replicate.delivery/mgxm/e5159b1b-508a-4be4-b892-e1eb47850bdc/OSR_uk_000_0050_8k.wav',
'model': 'large-v3',
'translate': False,
'temperature': 0,
'transcription': 'plain text',
'suppress_tokens': '-1',
'logprob_threshold': -1,
'no_speech_threshold': 0.6,
'condition_on_previous_text': True,
'compression_ratio_threshold': 2.4,
'temperature_increment_on_fallback': 0.2,
}
response = requests.post('https://api.magicapi.dev/api/v1/magicapi/whisper/whisper', headers=headers, json=json_data)<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.magicapi.dev/api/v1/magicapi/whisper/whisper');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'accept: application/json',
'x-magicapi-key: API_KEY',
'Content-Type: application/json',
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, "{\n \"audio\": \"https://replicate.delivery/mgxm/e5159b1b-508a-4be4-b892-e1eb47850bdc/OSR_uk_000_0050_8k.wav\",\n \"model\": \"large-v3\",\n \"translate\": false,\n \"temperature\": 0,\n \"transcription\": \"plain text\",\n \"suppress_tokens\": \"-1\",\n \"logprob_threshold\": -1,\n \"no_speech_threshold\": 0.6,\n \"condition_on_previous_text\": true,\n \"compression_ratio_threshold\": 2.4,\n \"temperature_increment_on_fallback\": 0.2\n}");
$response = curl_exec($ch);
curl_close($ch);import axios from 'axios';
const response = await axios.post(
'https://api.magicapi.dev/api/v1/magicapi/whisper/whisper',
{
'audio': 'https://replicate.delivery/mgxm/e5159b1b-508a-4be4-b892-e1eb47850bdc/OSR_uk_000_0050_8k.wav',
'model': 'large-v3',
'translate': false,
'temperature': 0,
'transcription': 'plain text',
'suppress_tokens': '-1',
'logprob_threshold': -1,
'no_speech_threshold': 0.6,
'condition_on_previous_text': true,
'compression_ratio_threshold': 2.4,
'temperature_increment_on_fallback': 0.2
},
{
headers: {
'accept': 'application/json',
'x-magicapi-key': 'API_KEY',
'Content-Type': 'application/json'
}
}
);fetch('https://api.magicapi.dev/api/v1/magicapi/whisper/whisper', {
method: 'POST',
headers: {
'accept': 'application/json',
'x-magicapi-key': 'API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
'audio': 'https://replicate.delivery/mgxm/e5159b1b-508a-4be4-b892-e1eb47850bdc/OSR_uk_000_0050_8k.wav',
'model': 'large-v3',
'translate': false,
'temperature': 0,
'transcription': 'plain text',
'suppress_tokens': '-1',
'logprob_threshold': -1,
'no_speech_threshold': 0.6,
'condition_on_previous_text': true,
'compression_ratio_threshold': 2.4,
'temperature_increment_on_fallback': 0.2
})
});{
"request_id": REQUEST_ID
}curl -X 'GET' \
'https://api.magicapi.dev/api/v1/magicapi/whisper/predictions/REQUEST_ID' \
-H 'accept: application/json' \
-H 'x-api-market-key: API_KEY'import requests
headers = {
'accept': 'application/json',
'x-api-market-key': 'API_KEY',
}
response = requests.get('https://prod.api.market/api/v1/magicapi/whisper/predictions/REQUEST_ID', headers=headers)<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://prod.api.market/api/v1/magicapi/whisper/predictions/REQUEST_ID');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'accept: application/json',
'x-api-market-key: API_KEY',
]);
$response = curl_exec($ch);
curl_close($ch);import axios from 'axios';
const response = await axios.get('https://prod.api.market/api/v1/magicapi/whisper/predictions/REQUEST_ID', {
headers: {
'accept': 'application/json',
'x-api-market-key': 'API_KEY'
}
});fetch('https://prod.api.market/api/v1/magicapi/whisper/predictions/REQUEST_ID', {
headers: {
'accept': 'application/json',
'x-api-market-key': 'API_KEY'
}
});{
"status": "succeeded",
"result": "RESULT_URL"
}