Create an upload
curl --request POST \
--url https://api.myvocal.ai/sound_clone/api/v1/stt/uploads \
--header 'Content-Type: application/json' \
--header 'accessKey: <accesskey>' \
--data '
{
"fileName": "<string>",
"sizeBytes": 123,
"contentType": "<string>"
}
'import requests
url = "https://api.myvocal.ai/sound_clone/api/v1/stt/uploads"
payload = {
"fileName": "<string>",
"sizeBytes": 123,
"contentType": "<string>"
}
headers = {
"accessKey": "<accesskey>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {accessKey: '<accesskey>', 'Content-Type': 'application/json'},
body: JSON.stringify({fileName: '<string>', sizeBytes: 123, contentType: '<string>'})
};
fetch('https://api.myvocal.ai/sound_clone/api/v1/stt/uploads', 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://api.myvocal.ai/sound_clone/api/v1/stt/uploads",
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([
'fileName' => '<string>',
'sizeBytes' => 123,
'contentType' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"accessKey: <accesskey>"
],
]);
$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://api.myvocal.ai/sound_clone/api/v1/stt/uploads"
payload := strings.NewReader("{\n \"fileName\": \"<string>\",\n \"sizeBytes\": 123,\n \"contentType\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("accessKey", "<accesskey>")
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://api.myvocal.ai/sound_clone/api/v1/stt/uploads")
.header("accessKey", "<accesskey>")
.header("Content-Type", "application/json")
.body("{\n \"fileName\": \"<string>\",\n \"sizeBytes\": 123,\n \"contentType\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.myvocal.ai/sound_clone/api/v1/stt/uploads")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["accessKey"] = '<accesskey>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"fileName\": \"<string>\",\n \"sizeBytes\": 123,\n \"contentType\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"code": 123,
"message": "<string>",
"data": {
"uploadId": "<string>",
"state": "<string>",
"partSizeBytes": 123,
"totalParts": 123,
"media": {}
}
}Speech to Text
Create an upload
Reserve a presigned multi-part upload for a Batch transcription source.
POST
/
sound_clone
/
api
/
v1
/
stt
/
uploads
Create an upload
curl --request POST \
--url https://api.myvocal.ai/sound_clone/api/v1/stt/uploads \
--header 'Content-Type: application/json' \
--header 'accessKey: <accesskey>' \
--data '
{
"fileName": "<string>",
"sizeBytes": 123,
"contentType": "<string>"
}
'import requests
url = "https://api.myvocal.ai/sound_clone/api/v1/stt/uploads"
payload = {
"fileName": "<string>",
"sizeBytes": 123,
"contentType": "<string>"
}
headers = {
"accessKey": "<accesskey>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {accessKey: '<accesskey>', 'Content-Type': 'application/json'},
body: JSON.stringify({fileName: '<string>', sizeBytes: 123, contentType: '<string>'})
};
fetch('https://api.myvocal.ai/sound_clone/api/v1/stt/uploads', 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://api.myvocal.ai/sound_clone/api/v1/stt/uploads",
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([
'fileName' => '<string>',
'sizeBytes' => 123,
'contentType' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"accessKey: <accesskey>"
],
]);
$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://api.myvocal.ai/sound_clone/api/v1/stt/uploads"
payload := strings.NewReader("{\n \"fileName\": \"<string>\",\n \"sizeBytes\": 123,\n \"contentType\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("accessKey", "<accesskey>")
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://api.myvocal.ai/sound_clone/api/v1/stt/uploads")
.header("accessKey", "<accesskey>")
.header("Content-Type", "application/json")
.body("{\n \"fileName\": \"<string>\",\n \"sizeBytes\": 123,\n \"contentType\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.myvocal.ai/sound_clone/api/v1/stt/uploads")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["accessKey"] = '<accesskey>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"fileName\": \"<string>\",\n \"sizeBytes\": 123,\n \"contentType\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"code": 123,
"message": "<string>",
"data": {
"uploadId": "<string>",
"state": "<string>",
"partSizeBytes": 123,
"totalParts": 123,
"media": {}
}
}Creates a multi-part upload. Send the parts to the returned presigned URLs, then complete the upload.
The server probes the file and builds the canonical audio used for the transcription.
Continue with sign a part,
complete the upload and
read the upload.
Header
string
required
API key for authentication.
Body
string
required
The original file name.
number
required
The exact file size in bytes, within the technical upload ceiling. This is the request field; the response reports the stored size as
media/fileSizeBytes.string
Media type, for example
audio/wav. The uploaded bytes are inspected before transcription.Response
Successful REST calls return{ code: 1, message, data }. The fields below are inside data;
JSON downloads are the documented exception and return the transcript view directly.
number
1 for success.string
Result message.
object
Hide properties
Hide properties
string
The upload id to pass to create-transcription.
string
UPLOADING initially; complete the upload and read its state before submitting. Analysis can
result in READY or FAILED.number
The required part size.
number
How many parts to send.
object
After the file is probed:
mediaType, containerLabel, containerDurationMs and the audioTracks
(each with index, codec, channels, sampleRateHz, durationMs, language and
defaultTrack).Signed part URLs expire. Request new signatures if an upload takes long, and complete the upload
before submitting the transcription.
