AssemblyAI
curl --request POST \
--url https://mavi-backend.memories.ai/serve/api/v2/transcriptions/speech-to-text \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"provider": "<string>",
"asset_id": "<string>",
"url": "<string>",
"source_url": "<string>",
"language_code": "<string>",
"punctuate": true,
"format_text": true,
"speaker_labels": true,
"speakers_expected": 123,
"language_detection": true,
"language_confidence_threshold": 123,
"speech_model": "<string>",
"speech_threshold": 123,
"disfluencies": true,
"sentiment_analysis": true,
"entity_detection": true,
"auto_highlights": true,
"content_safety": true,
"iab_categories": true,
"auto_chapters": true,
"summarization": true,
"summary_model": "<string>",
"summary_type": "<string>",
"redact_pii": true,
"redact_pii_policies": [
"<string>"
],
"redact_pii_sub": "<string>",
"redact_pii_audio": true,
"redact_pii_audio_quality": "<string>",
"filter_profanity": true,
"word_boost": [
"<string>"
],
"boost_param": "<string>",
"custom_spelling": [
{}
],
"webhook_url": "<string>",
"multichannel": true,
"audio_start_from": 123,
"audio_end_at": 123,
"custom_topics": true,
"topics": [
"<string>"
]
}
'import requests
url = "https://mavi-backend.memories.ai/serve/api/v2/transcriptions/speech-to-text"
payload = {
"provider": "<string>",
"asset_id": "<string>",
"url": "<string>",
"source_url": "<string>",
"language_code": "<string>",
"punctuate": True,
"format_text": True,
"speaker_labels": True,
"speakers_expected": 123,
"language_detection": True,
"language_confidence_threshold": 123,
"speech_model": "<string>",
"speech_threshold": 123,
"disfluencies": True,
"sentiment_analysis": True,
"entity_detection": True,
"auto_highlights": True,
"content_safety": True,
"iab_categories": True,
"auto_chapters": True,
"summarization": True,
"summary_model": "<string>",
"summary_type": "<string>",
"redact_pii": True,
"redact_pii_policies": ["<string>"],
"redact_pii_sub": "<string>",
"redact_pii_audio": True,
"redact_pii_audio_quality": "<string>",
"filter_profanity": True,
"word_boost": ["<string>"],
"boost_param": "<string>",
"custom_spelling": [{}],
"webhook_url": "<string>",
"multichannel": True,
"audio_start_from": 123,
"audio_end_at": 123,
"custom_topics": True,
"topics": ["<string>"]
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
provider: '<string>',
asset_id: '<string>',
url: '<string>',
source_url: '<string>',
language_code: '<string>',
punctuate: true,
format_text: true,
speaker_labels: true,
speakers_expected: 123,
language_detection: true,
language_confidence_threshold: 123,
speech_model: '<string>',
speech_threshold: 123,
disfluencies: true,
sentiment_analysis: true,
entity_detection: true,
auto_highlights: true,
content_safety: true,
iab_categories: true,
auto_chapters: true,
summarization: true,
summary_model: '<string>',
summary_type: '<string>',
redact_pii: true,
redact_pii_policies: ['<string>'],
redact_pii_sub: '<string>',
redact_pii_audio: true,
redact_pii_audio_quality: '<string>',
filter_profanity: true,
word_boost: ['<string>'],
boost_param: '<string>',
custom_spelling: [{}],
webhook_url: '<string>',
multichannel: true,
audio_start_from: 123,
audio_end_at: 123,
custom_topics: true,
topics: ['<string>']
})
};
fetch('https://mavi-backend.memories.ai/serve/api/v2/transcriptions/speech-to-text', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://mavi-backend.memories.ai/serve/api/v2/transcriptions/speech-to-text",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'provider' => '<string>',
'asset_id' => '<string>',
'url' => '<string>',
'source_url' => '<string>',
'language_code' => '<string>',
'punctuate' => true,
'format_text' => true,
'speaker_labels' => true,
'speakers_expected' => 123,
'language_detection' => true,
'language_confidence_threshold' => 123,
'speech_model' => '<string>',
'speech_threshold' => 123,
'disfluencies' => true,
'sentiment_analysis' => true,
'entity_detection' => true,
'auto_highlights' => true,
'content_safety' => true,
'iab_categories' => true,
'auto_chapters' => true,
'summarization' => true,
'summary_model' => '<string>',
'summary_type' => '<string>',
'redact_pii' => true,
'redact_pii_policies' => [
'<string>'
],
'redact_pii_sub' => '<string>',
'redact_pii_audio' => true,
'redact_pii_audio_quality' => '<string>',
'filter_profanity' => true,
'word_boost' => [
'<string>'
],
'boost_param' => '<string>',
'custom_spelling' => [
[
]
],
'webhook_url' => '<string>',
'multichannel' => true,
'audio_start_from' => 123,
'audio_end_at' => 123,
'custom_topics' => true,
'topics' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://mavi-backend.memories.ai/serve/api/v2/transcriptions/speech-to-text"
payload := strings.NewReader("{\n \"provider\": \"<string>\",\n \"asset_id\": \"<string>\",\n \"url\": \"<string>\",\n \"source_url\": \"<string>\",\n \"language_code\": \"<string>\",\n \"punctuate\": true,\n \"format_text\": true,\n \"speaker_labels\": true,\n \"speakers_expected\": 123,\n \"language_detection\": true,\n \"language_confidence_threshold\": 123,\n \"speech_model\": \"<string>\",\n \"speech_threshold\": 123,\n \"disfluencies\": true,\n \"sentiment_analysis\": true,\n \"entity_detection\": true,\n \"auto_highlights\": true,\n \"content_safety\": true,\n \"iab_categories\": true,\n \"auto_chapters\": true,\n \"summarization\": true,\n \"summary_model\": \"<string>\",\n \"summary_type\": \"<string>\",\n \"redact_pii\": true,\n \"redact_pii_policies\": [\n \"<string>\"\n ],\n \"redact_pii_sub\": \"<string>\",\n \"redact_pii_audio\": true,\n \"redact_pii_audio_quality\": \"<string>\",\n \"filter_profanity\": true,\n \"word_boost\": [\n \"<string>\"\n ],\n \"boost_param\": \"<string>\",\n \"custom_spelling\": [\n {}\n ],\n \"webhook_url\": \"<string>\",\n \"multichannel\": true,\n \"audio_start_from\": 123,\n \"audio_end_at\": 123,\n \"custom_topics\": true,\n \"topics\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://mavi-backend.memories.ai/serve/api/v2/transcriptions/speech-to-text")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"provider\": \"<string>\",\n \"asset_id\": \"<string>\",\n \"url\": \"<string>\",\n \"source_url\": \"<string>\",\n \"language_code\": \"<string>\",\n \"punctuate\": true,\n \"format_text\": true,\n \"speaker_labels\": true,\n \"speakers_expected\": 123,\n \"language_detection\": true,\n \"language_confidence_threshold\": 123,\n \"speech_model\": \"<string>\",\n \"speech_threshold\": 123,\n \"disfluencies\": true,\n \"sentiment_analysis\": true,\n \"entity_detection\": true,\n \"auto_highlights\": true,\n \"content_safety\": true,\n \"iab_categories\": true,\n \"auto_chapters\": true,\n \"summarization\": true,\n \"summary_model\": \"<string>\",\n \"summary_type\": \"<string>\",\n \"redact_pii\": true,\n \"redact_pii_policies\": [\n \"<string>\"\n ],\n \"redact_pii_sub\": \"<string>\",\n \"redact_pii_audio\": true,\n \"redact_pii_audio_quality\": \"<string>\",\n \"filter_profanity\": true,\n \"word_boost\": [\n \"<string>\"\n ],\n \"boost_param\": \"<string>\",\n \"custom_spelling\": [\n {}\n ],\n \"webhook_url\": \"<string>\",\n \"multichannel\": true,\n \"audio_start_from\": 123,\n \"audio_end_at\": 123,\n \"custom_topics\": true,\n \"topics\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://mavi-backend.memories.ai/serve/api/v2/transcriptions/speech-to-text")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"provider\": \"<string>\",\n \"asset_id\": \"<string>\",\n \"url\": \"<string>\",\n \"source_url\": \"<string>\",\n \"language_code\": \"<string>\",\n \"punctuate\": true,\n \"format_text\": true,\n \"speaker_labels\": true,\n \"speakers_expected\": 123,\n \"language_detection\": true,\n \"language_confidence_threshold\": 123,\n \"speech_model\": \"<string>\",\n \"speech_threshold\": 123,\n \"disfluencies\": true,\n \"sentiment_analysis\": true,\n \"entity_detection\": true,\n \"auto_highlights\": true,\n \"content_safety\": true,\n \"iab_categories\": true,\n \"auto_chapters\": true,\n \"summarization\": true,\n \"summary_model\": \"<string>\",\n \"summary_type\": \"<string>\",\n \"redact_pii\": true,\n \"redact_pii_policies\": [\n \"<string>\"\n ],\n \"redact_pii_sub\": \"<string>\",\n \"redact_pii_audio\": true,\n \"redact_pii_audio_quality\": \"<string>\",\n \"filter_profanity\": true,\n \"word_boost\": [\n \"<string>\"\n ],\n \"boost_param\": \"<string>\",\n \"custom_spelling\": [\n {}\n ],\n \"webhook_url\": \"<string>\",\n \"multichannel\": true,\n \"audio_start_from\": 123,\n \"audio_end_at\": 123,\n \"custom_topics\": true,\n \"topics\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"code": 200,
"msg": "success",
"data": {
"id": "9a27d0d5-d2db-448c-823c-f098507789be",
"status": "completed",
"language_code": "en_us",
"audio_url": "https://storage.googleapis.com/...",
"audio_duration": 52,
"text": "Hello, how are you today? I'm doing well, thank you.",
"words": [
{
"text": "Hello,",
"start": 0,
"end": 520,
"confidence": 0.99,
"speaker": "A"
},
{
"text": "how",
"start": 520,
"end": 780,
"confidence": 0.98,
"speaker": "A"
}
],
"utterances": [
{
"confidence": 0.97,
"start": 0,
"end": 2980,
"text": "Hello, how are you today?",
"speaker": "A"
},
{
"confidence": 0.95,
"start": 2980,
"end": 5200,
"text": "I'm doing well, thank you.",
"speaker": "B"
}
],
"confidence": 0.97,
"punctuate": true,
"format_text": true,
"speaker_labels": true,
"speakers_expected": 2
},
"failed": false,
"success": true
}
Audio File Transcription
AssemblyAI
Transcribe audio to text using AssemblyAI Universal-2 model.
POST
/
serve
/
api
/
v2
/
transcriptions
/
speech-to-text
AssemblyAI
curl --request POST \
--url https://mavi-backend.memories.ai/serve/api/v2/transcriptions/speech-to-text \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"provider": "<string>",
"asset_id": "<string>",
"url": "<string>",
"source_url": "<string>",
"language_code": "<string>",
"punctuate": true,
"format_text": true,
"speaker_labels": true,
"speakers_expected": 123,
"language_detection": true,
"language_confidence_threshold": 123,
"speech_model": "<string>",
"speech_threshold": 123,
"disfluencies": true,
"sentiment_analysis": true,
"entity_detection": true,
"auto_highlights": true,
"content_safety": true,
"iab_categories": true,
"auto_chapters": true,
"summarization": true,
"summary_model": "<string>",
"summary_type": "<string>",
"redact_pii": true,
"redact_pii_policies": [
"<string>"
],
"redact_pii_sub": "<string>",
"redact_pii_audio": true,
"redact_pii_audio_quality": "<string>",
"filter_profanity": true,
"word_boost": [
"<string>"
],
"boost_param": "<string>",
"custom_spelling": [
{}
],
"webhook_url": "<string>",
"multichannel": true,
"audio_start_from": 123,
"audio_end_at": 123,
"custom_topics": true,
"topics": [
"<string>"
]
}
'import requests
url = "https://mavi-backend.memories.ai/serve/api/v2/transcriptions/speech-to-text"
payload = {
"provider": "<string>",
"asset_id": "<string>",
"url": "<string>",
"source_url": "<string>",
"language_code": "<string>",
"punctuate": True,
"format_text": True,
"speaker_labels": True,
"speakers_expected": 123,
"language_detection": True,
"language_confidence_threshold": 123,
"speech_model": "<string>",
"speech_threshold": 123,
"disfluencies": True,
"sentiment_analysis": True,
"entity_detection": True,
"auto_highlights": True,
"content_safety": True,
"iab_categories": True,
"auto_chapters": True,
"summarization": True,
"summary_model": "<string>",
"summary_type": "<string>",
"redact_pii": True,
"redact_pii_policies": ["<string>"],
"redact_pii_sub": "<string>",
"redact_pii_audio": True,
"redact_pii_audio_quality": "<string>",
"filter_profanity": True,
"word_boost": ["<string>"],
"boost_param": "<string>",
"custom_spelling": [{}],
"webhook_url": "<string>",
"multichannel": True,
"audio_start_from": 123,
"audio_end_at": 123,
"custom_topics": True,
"topics": ["<string>"]
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
provider: '<string>',
asset_id: '<string>',
url: '<string>',
source_url: '<string>',
language_code: '<string>',
punctuate: true,
format_text: true,
speaker_labels: true,
speakers_expected: 123,
language_detection: true,
language_confidence_threshold: 123,
speech_model: '<string>',
speech_threshold: 123,
disfluencies: true,
sentiment_analysis: true,
entity_detection: true,
auto_highlights: true,
content_safety: true,
iab_categories: true,
auto_chapters: true,
summarization: true,
summary_model: '<string>',
summary_type: '<string>',
redact_pii: true,
redact_pii_policies: ['<string>'],
redact_pii_sub: '<string>',
redact_pii_audio: true,
redact_pii_audio_quality: '<string>',
filter_profanity: true,
word_boost: ['<string>'],
boost_param: '<string>',
custom_spelling: [{}],
webhook_url: '<string>',
multichannel: true,
audio_start_from: 123,
audio_end_at: 123,
custom_topics: true,
topics: ['<string>']
})
};
fetch('https://mavi-backend.memories.ai/serve/api/v2/transcriptions/speech-to-text', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://mavi-backend.memories.ai/serve/api/v2/transcriptions/speech-to-text",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'provider' => '<string>',
'asset_id' => '<string>',
'url' => '<string>',
'source_url' => '<string>',
'language_code' => '<string>',
'punctuate' => true,
'format_text' => true,
'speaker_labels' => true,
'speakers_expected' => 123,
'language_detection' => true,
'language_confidence_threshold' => 123,
'speech_model' => '<string>',
'speech_threshold' => 123,
'disfluencies' => true,
'sentiment_analysis' => true,
'entity_detection' => true,
'auto_highlights' => true,
'content_safety' => true,
'iab_categories' => true,
'auto_chapters' => true,
'summarization' => true,
'summary_model' => '<string>',
'summary_type' => '<string>',
'redact_pii' => true,
'redact_pii_policies' => [
'<string>'
],
'redact_pii_sub' => '<string>',
'redact_pii_audio' => true,
'redact_pii_audio_quality' => '<string>',
'filter_profanity' => true,
'word_boost' => [
'<string>'
],
'boost_param' => '<string>',
'custom_spelling' => [
[
]
],
'webhook_url' => '<string>',
'multichannel' => true,
'audio_start_from' => 123,
'audio_end_at' => 123,
'custom_topics' => true,
'topics' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://mavi-backend.memories.ai/serve/api/v2/transcriptions/speech-to-text"
payload := strings.NewReader("{\n \"provider\": \"<string>\",\n \"asset_id\": \"<string>\",\n \"url\": \"<string>\",\n \"source_url\": \"<string>\",\n \"language_code\": \"<string>\",\n \"punctuate\": true,\n \"format_text\": true,\n \"speaker_labels\": true,\n \"speakers_expected\": 123,\n \"language_detection\": true,\n \"language_confidence_threshold\": 123,\n \"speech_model\": \"<string>\",\n \"speech_threshold\": 123,\n \"disfluencies\": true,\n \"sentiment_analysis\": true,\n \"entity_detection\": true,\n \"auto_highlights\": true,\n \"content_safety\": true,\n \"iab_categories\": true,\n \"auto_chapters\": true,\n \"summarization\": true,\n \"summary_model\": \"<string>\",\n \"summary_type\": \"<string>\",\n \"redact_pii\": true,\n \"redact_pii_policies\": [\n \"<string>\"\n ],\n \"redact_pii_sub\": \"<string>\",\n \"redact_pii_audio\": true,\n \"redact_pii_audio_quality\": \"<string>\",\n \"filter_profanity\": true,\n \"word_boost\": [\n \"<string>\"\n ],\n \"boost_param\": \"<string>\",\n \"custom_spelling\": [\n {}\n ],\n \"webhook_url\": \"<string>\",\n \"multichannel\": true,\n \"audio_start_from\": 123,\n \"audio_end_at\": 123,\n \"custom_topics\": true,\n \"topics\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://mavi-backend.memories.ai/serve/api/v2/transcriptions/speech-to-text")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"provider\": \"<string>\",\n \"asset_id\": \"<string>\",\n \"url\": \"<string>\",\n \"source_url\": \"<string>\",\n \"language_code\": \"<string>\",\n \"punctuate\": true,\n \"format_text\": true,\n \"speaker_labels\": true,\n \"speakers_expected\": 123,\n \"language_detection\": true,\n \"language_confidence_threshold\": 123,\n \"speech_model\": \"<string>\",\n \"speech_threshold\": 123,\n \"disfluencies\": true,\n \"sentiment_analysis\": true,\n \"entity_detection\": true,\n \"auto_highlights\": true,\n \"content_safety\": true,\n \"iab_categories\": true,\n \"auto_chapters\": true,\n \"summarization\": true,\n \"summary_model\": \"<string>\",\n \"summary_type\": \"<string>\",\n \"redact_pii\": true,\n \"redact_pii_policies\": [\n \"<string>\"\n ],\n \"redact_pii_sub\": \"<string>\",\n \"redact_pii_audio\": true,\n \"redact_pii_audio_quality\": \"<string>\",\n \"filter_profanity\": true,\n \"word_boost\": [\n \"<string>\"\n ],\n \"boost_param\": \"<string>\",\n \"custom_spelling\": [\n {}\n ],\n \"webhook_url\": \"<string>\",\n \"multichannel\": true,\n \"audio_start_from\": 123,\n \"audio_end_at\": 123,\n \"custom_topics\": true,\n \"topics\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://mavi-backend.memories.ai/serve/api/v2/transcriptions/speech-to-text")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"provider\": \"<string>\",\n \"asset_id\": \"<string>\",\n \"url\": \"<string>\",\n \"source_url\": \"<string>\",\n \"language_code\": \"<string>\",\n \"punctuate\": true,\n \"format_text\": true,\n \"speaker_labels\": true,\n \"speakers_expected\": 123,\n \"language_detection\": true,\n \"language_confidence_threshold\": 123,\n \"speech_model\": \"<string>\",\n \"speech_threshold\": 123,\n \"disfluencies\": true,\n \"sentiment_analysis\": true,\n \"entity_detection\": true,\n \"auto_highlights\": true,\n \"content_safety\": true,\n \"iab_categories\": true,\n \"auto_chapters\": true,\n \"summarization\": true,\n \"summary_model\": \"<string>\",\n \"summary_type\": \"<string>\",\n \"redact_pii\": true,\n \"redact_pii_policies\": [\n \"<string>\"\n ],\n \"redact_pii_sub\": \"<string>\",\n \"redact_pii_audio\": true,\n \"redact_pii_audio_quality\": \"<string>\",\n \"filter_profanity\": true,\n \"word_boost\": [\n \"<string>\"\n ],\n \"boost_param\": \"<string>\",\n \"custom_spelling\": [\n {}\n ],\n \"webhook_url\": \"<string>\",\n \"multichannel\": true,\n \"audio_start_from\": 123,\n \"audio_end_at\": 123,\n \"custom_topics\": true,\n \"topics\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"code": 200,
"msg": "success",
"data": {
"id": "9a27d0d5-d2db-448c-823c-f098507789be",
"status": "completed",
"language_code": "en_us",
"audio_url": "https://storage.googleapis.com/...",
"audio_duration": 52,
"text": "Hello, how are you today? I'm doing well, thank you.",
"words": [
{
"text": "Hello,",
"start": 0,
"end": 520,
"confidence": 0.99,
"speaker": "A"
},
{
"text": "how",
"start": 520,
"end": 780,
"confidence": 0.98,
"speaker": "A"
}
],
"utterances": [
{
"confidence": 0.97,
"start": 0,
"end": 2980,
"text": "Hello, how are you today?",
"speaker": "A"
},
{
"confidence": 0.95,
"start": 2980,
"end": 5200,
"text": "I'm doing well, thank you.",
"speaker": "B"
}
],
"confidence": 0.97,
"punctuate": true,
"format_text": true,
"speaker_labels": true,
"speakers_expected": 2
},
"failed": false,
"success": true
}
Product: Visual Intelligence — Audio File Transcription
Use case: Transcribe an uploaded audio/video file to text — async batch or sync, multiple providers (Whisper, ElevenLabs, AssemblyAI) with optional speaker labels. For live streams, see Live Audio Transcription.
Host:
https://mavi-backend.memories.ai/serve/api/v2
Auth: Authorization: sk-mavi-... (no Bearer prefix)Pricing: $0.15/hour of audio, billed by actual audio duration (in seconds).
Audio Source
You must provide one of the following (priority:asset_id > url > source_url).
Parameters
string
required
API key for authentication (e.g.
sk-mavi-...).string
required
STT provider. Must be
assemblyai.string
The unique identifier of an uploaded audio/video asset (e.g.
re_xxx). Resolved to a signed GCS URL.string
A publicly accessible audio URL.
string
A
gs:// GCS path or public HTTP URL. GCS paths are converted to signed URLs automatically.string
Language code (ISO 639-1, e.g.
en, zh). If omitted, the provider auto-detects the language.boolean
default:"true"
Add punctuation.
boolean
default:"true"
Format numbers, dates, etc.
boolean
Enable speaker diarization.
integer
Expected number of speakers.
boolean
Enable automatic language detection.
number
Confidence threshold for language detection (0.0–1.0).
string
Speech recognition model to use.
number
Speech confidence threshold (0.0–1.0).
boolean
Include disfluencies (um, uh, etc.).
boolean
Enable sentiment analysis per utterance.
boolean
Enable entity detection (names, locations, etc.).
boolean
Automatically highlight key phrases.
boolean
Enable content safety detection.
boolean
Enable IAB topic categorization.
boolean
Automatically generate chapters.
boolean
Enable summarization.
string
Summarization model:
informative or conversational.string
Summary format:
bullets, bullets_verbose, headline, paragraph, or gist.boolean
Enable PII redaction.
string[]
PII types to redact (e.g.
email_address, phone_number, person_name).string
PII replacement strategy:
hash or entity_name.boolean
Redact PII from audio output.
string
Redacted audio quality:
mp3 or wav.boolean
Filter profanity from transcript.
string[]
List of words to boost recognition.
string
Boost strength:
low, default, or high.object[]
Custom spelling corrections.
string
AssemblyAI webhook callback URL.
boolean
Enable multi-channel transcription.
integer
Start transcription from this time (milliseconds).
integer
End transcription at this time (milliseconds).
boolean
Enable custom topic detection.
string[]
Custom topic labels.
Code Examples
curl --request POST \
--url https://mavi-backend.memories.ai/serve/api/v2/transcriptions/speech-to-text \
--header 'Authorization: sk-mavi-...' \
--header 'Content-Type: application/json' \
--data '{
"provider": "assemblyai",
"asset_id": "re_657929111888723968",
"language_code": "en",
"speaker_labels": true,
"speakers_expected": 2,
"punctuate": true,
"format_text": true
}'
const BASE_URL = "https://mavi-backend.memories.ai/serve/api/v2/transcriptions";
const API_KEY = "sk-mavi-...";
const response = await fetch(`${BASE_URL}/speech-to-text`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': API_KEY
},
body: JSON.stringify({
provider: 'assemblyai',
asset_id: 're_657929111888723968',
language_code: 'en',
speaker_labels: true,
speakers_expected: 2,
punctuate: true,
format_text: true
})
});
const data = await response.json();
console.log(data);
import requests
BASE_URL = "https://mavi-backend.memories.ai/serve/api/v2/transcriptions"
API_KEY = "sk-mavi-..."
HEADERS = {
"Authorization": API_KEY,
"Content-Type": "application/json"
}
response = requests.post(f"{BASE_URL}/speech-to-text", json={
"provider": "assemblyai",
"asset_id": "re_657929111888723968",
"language_code": "en",
"speaker_labels": True,
"speakers_expected": 2,
"punctuate": True,
"format_text": True
}, headers=HEADERS)
print(response.json())
Response
{
"code": 200,
"msg": "success",
"data": {
"id": "9a27d0d5-d2db-448c-823c-f098507789be",
"status": "completed",
"language_code": "en_us",
"audio_url": "https://storage.googleapis.com/...",
"audio_duration": 52,
"text": "Hello, how are you today? I'm doing well, thank you.",
"words": [
{
"text": "Hello,",
"start": 0,
"end": 520,
"confidence": 0.99,
"speaker": "A"
},
{
"text": "how",
"start": 520,
"end": 780,
"confidence": 0.98,
"speaker": "A"
}
],
"utterances": [
{
"confidence": 0.97,
"start": 0,
"end": 2980,
"text": "Hello, how are you today?",
"speaker": "A"
},
{
"confidence": 0.95,
"start": 2980,
"end": 5200,
"text": "I'm doing well, thank you.",
"speaker": "B"
}
],
"confidence": 0.97,
"punctuate": true,
"format_text": true,
"speaker_labels": true,
"speakers_expected": 2
},
"failed": false,
"success": true
}
Response Parameters
| Parameter | Type | Description |
|---|---|---|
| data.id | string | AssemblyAI transcript ID |
| data.status | string | Transcript status: completed |
| data.language_code | string | Detected language code |
| data.audio_duration | integer | Audio duration in seconds |
| data.text | string | Full transcription text |
| data.confidence | number | Overall transcription confidence (0.0–1.0) |
| data.words | array[object] | Word-level transcription with timing (milliseconds) |
| data.words[].text | string | The transcribed word |
| data.words[].start | integer | Start time in milliseconds |
| data.words[].end | integer | End time in milliseconds |
| data.words[].confidence | number | Word confidence score |
| data.words[].speaker | string | Speaker label (e.g. A, B). Only present when speaker_labels=true. |
| data.utterances | array[object] | Sentence-level segments (only when speaker_labels=true) |
| data.utterances[].text | string | Utterance text |
| data.utterances[].start | integer | Start time in milliseconds |
| data.utterances[].end | integer | End time in milliseconds |
| data.utterances[].confidence | number | Utterance confidence score |
| data.utterances[].speaker | string | Speaker label |
Timestamps are in milliseconds (e.g.
520).⌘I
