Crea progetto
curl --request POST \
--url https://api.voicecheap.ai/v1/projects \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--data '
{
"targetLanguage": "<string>",
"originalLanguage": "<string>",
"projectName": "<string>",
"webhookUrl": "<string>",
"numberOfSpeakers": "<string>",
"brandVocabulary": "<string>",
"removeFillerWords": true,
"sourceSrt": "<string>"
}
'import requests
url = "https://api.voicecheap.ai/v1/projects"
payload = {
"targetLanguage": "<string>",
"originalLanguage": "<string>",
"projectName": "<string>",
"webhookUrl": "<string>",
"numberOfSpeakers": "<string>",
"brandVocabulary": "<string>",
"removeFillerWords": True,
"sourceSrt": "<string>"
}
headers = {
"x-api-key": "<x-api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<x-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
targetLanguage: '<string>',
originalLanguage: '<string>',
projectName: '<string>',
webhookUrl: '<string>',
numberOfSpeakers: '<string>',
brandVocabulary: '<string>',
removeFillerWords: true,
sourceSrt: '<string>'
})
};
fetch('https://api.voicecheap.ai/v1/projects', 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.voicecheap.ai/v1/projects",
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([
'targetLanguage' => '<string>',
'originalLanguage' => '<string>',
'projectName' => '<string>',
'webhookUrl' => '<string>',
'numberOfSpeakers' => '<string>',
'brandVocabulary' => '<string>',
'removeFillerWords' => true,
'sourceSrt' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <x-api-key>"
],
]);
$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.voicecheap.ai/v1/projects"
payload := strings.NewReader("{\n \"targetLanguage\": \"<string>\",\n \"originalLanguage\": \"<string>\",\n \"projectName\": \"<string>\",\n \"webhookUrl\": \"<string>\",\n \"numberOfSpeakers\": \"<string>\",\n \"brandVocabulary\": \"<string>\",\n \"removeFillerWords\": true,\n \"sourceSrt\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<x-api-key>")
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.voicecheap.ai/v1/projects")
.header("x-api-key", "<x-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"targetLanguage\": \"<string>\",\n \"originalLanguage\": \"<string>\",\n \"projectName\": \"<string>\",\n \"webhookUrl\": \"<string>\",\n \"numberOfSpeakers\": \"<string>\",\n \"brandVocabulary\": \"<string>\",\n \"removeFillerWords\": true,\n \"sourceSrt\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.voicecheap.ai/v1/projects")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<x-api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"targetLanguage\": \"<string>\",\n \"originalLanguage\": \"<string>\",\n \"projectName\": \"<string>\",\n \"webhookUrl\": \"<string>\",\n \"numberOfSpeakers\": \"<string>\",\n \"brandVocabulary\": \"<string>\",\n \"removeFillerWords\": true,\n \"sourceSrt\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyTraduzione
Crea progetto
Carica un file video o audio e crea un progetto senza avviare la traduzione
Crea progetto
curl --request POST \
--url https://api.voicecheap.ai/v1/projects \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--data '
{
"targetLanguage": "<string>",
"originalLanguage": "<string>",
"projectName": "<string>",
"webhookUrl": "<string>",
"numberOfSpeakers": "<string>",
"brandVocabulary": "<string>",
"removeFillerWords": true,
"sourceSrt": "<string>"
}
'import requests
url = "https://api.voicecheap.ai/v1/projects"
payload = {
"targetLanguage": "<string>",
"originalLanguage": "<string>",
"projectName": "<string>",
"webhookUrl": "<string>",
"numberOfSpeakers": "<string>",
"brandVocabulary": "<string>",
"removeFillerWords": True,
"sourceSrt": "<string>"
}
headers = {
"x-api-key": "<x-api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<x-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
targetLanguage: '<string>',
originalLanguage: '<string>',
projectName: '<string>',
webhookUrl: '<string>',
numberOfSpeakers: '<string>',
brandVocabulary: '<string>',
removeFillerWords: true,
sourceSrt: '<string>'
})
};
fetch('https://api.voicecheap.ai/v1/projects', 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.voicecheap.ai/v1/projects",
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([
'targetLanguage' => '<string>',
'originalLanguage' => '<string>',
'projectName' => '<string>',
'webhookUrl' => '<string>',
'numberOfSpeakers' => '<string>',
'brandVocabulary' => '<string>',
'removeFillerWords' => true,
'sourceSrt' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <x-api-key>"
],
]);
$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.voicecheap.ai/v1/projects"
payload := strings.NewReader("{\n \"targetLanguage\": \"<string>\",\n \"originalLanguage\": \"<string>\",\n \"projectName\": \"<string>\",\n \"webhookUrl\": \"<string>\",\n \"numberOfSpeakers\": \"<string>\",\n \"brandVocabulary\": \"<string>\",\n \"removeFillerWords\": true,\n \"sourceSrt\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<x-api-key>")
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.voicecheap.ai/v1/projects")
.header("x-api-key", "<x-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"targetLanguage\": \"<string>\",\n \"originalLanguage\": \"<string>\",\n \"projectName\": \"<string>\",\n \"webhookUrl\": \"<string>\",\n \"numberOfSpeakers\": \"<string>\",\n \"brandVocabulary\": \"<string>\",\n \"removeFillerWords\": true,\n \"sourceSrt\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.voicecheap.ai/v1/projects")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<x-api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"targetLanguage\": \"<string>\",\n \"originalLanguage\": \"<string>\",\n \"projectName\": \"<string>\",\n \"webhookUrl\": \"<string>\",\n \"numberOfSpeakers\": \"<string>\",\n \"brandVocabulary\": \"<string>\",\n \"removeFillerWords\": true,\n \"sourceSrt\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyCrea progetto
Crea un nuovo progetto caricando un file video o audio. L’API avvia solo la trascrizione (nessuna traduzione o sincronizzazione labiale). Puoi aprire il progetto nell’app VoiceCheap in un secondo momento per attivare la traduzione, oppure utilizzare Ottieni dettagli progetto per ispezionare lo stato del progetto.Limite di concorrenza
Questo endpoint condivide lo stesso limite di concorrenza diPOST /v1/translate: fino a 10 traduzioni in corso per account. Se il limite viene raggiunto, le richieste restituiscono CONCURRENT_TRANSLATION_LIMIT_REACHED (HTTP 429).
Richiesta
Questo endpoint accettamultipart/form-data con un caricamento di file.
Intestazioni
string
obbligatorio
La tua chiave API VoiceCheap. Ottienine una da app.voicecheap.ai/page-api.
Parametri del corpo
file
obbligatorio
Il file video o audio da caricare.Formati video supportati:
video/mp4, video/quicktime, video/x-matroska, video/webm, video/mpegFormati audio supportati: audio/mpeg, audio/wav, audio/mp4, audio/x-m4a, audio/flac, audio/ogg, audio/aac, audio/webmDimensione massima del file per piano: Beginner 5 GB, Starter 10 GB, Creator 20 GB, Pro 30 GB, Scale 40 GB e Enterprise 60 GB.string
obbligatorio
La lingua di destinazione da associare a questo progetto. Deve essere in minuscolo.Valori consentiti (70+):
afrikaans, albanian, amharic, arabic, armenian, assamese, azerbaijani, basque, belarusian, bengali, bosnian, bulgarian, catalan, croatian, czech, danish, dutch, english, british english, estonian, finnish, french, french canadian, galician, german, greek, gujarati, hebrew, hindi, hungarian, icelandic, indonesian, irish, italian, japanese, kannada, kazakh, khmer, korean, lao, latvian, lithuanian, macedonian, malay, malayalam, mandarin, marathi, mongolian, nepali, norwegian, persian, polish, portuguese, brazilian portuguese, punjabi, romanian, russian, serbian, slovak, slovenian, spanish, swahili, swedish, tagalog, tamil, telugu, thai, turkish, ukrainian, urdu, vietnamese, welsh, yoruba, zulustring
La lingua di origine del contenuto utilizzando i codici lingua ISO (es. Predefinito:
en, es, fr, de, ja, zh).Fortemente consigliato: lasciare vuoto per il rilevamento automatico.Fornisci questo parametro solo se sei sicuro al 100% che il codice lingua sia corretto e nel formato ISO valido. Codici lingua errati causeranno errori di trascrizione. Il nostro rilevamento automatico supporta oltre 80 lingue ed è altamente accurato.
auto-detectstring
Un nome personalizzato per il progetto. Utile per identificare i progetti nella tua dashboard.Predefinito: Se non fornito, verrà utilizzato l’ID progetto.
string
Un endpoint https che riceve il eventi webhook per questo progetto,
sovrascrivendo l’endpoint configurato sul tuo account.Predefinito: L’endpoint webhook dell’account, quando configurato.
string
auto-detect o un numero intero da 1 a 32. Fornire il numero noto di parlanti può migliorare la diarizzazione.Predefinito: auto-detectstring
Un array di stringhe JSON di nomi, marchi, acronimi o termini specialistici specifici della richiesta. Questi termini vengono uniti al glossario salvato dell’account o del team.
["VoiceCheap", "SmartSync", "ITC Global"]
boolean
Rimuovi le comuni parole riempitive durante la trascrizione.Predefinito:
truestring
Una trascrizione SRT esistente nella lingua di origine. Quando fornito,
originalLanguage deve essere un codice lingua esplicito anziché auto-detect.POST /v1/translate.
Esempio di richiesta
curl -X POST "https://api.voicecheap.ai/v1/projects" \
-H "x-api-key: YOUR_API_KEY" \
-F "file=@/path/to/video.mp4" \
-F "targetLanguage=french" \
-F "projectName=Launch Demo" \
-F "numberOfSpeakers=2" \
-F 'brandVocabulary=["VoiceCheap","SmartSync"]' \
-F "removeFillerWords=true"
Esempio di risposta
{
"success": true,
"message": "Project created. Transcription started.",
"projectId": "project_123",
"projectName": "Launch Demo",
"targetLanguage": "french",
"status": "processing"
}
Errori
| Stato | Codice | Descrizione |
|---|---|---|
| 400 | FILE_REQUIRED | Nessun file è stato caricato con la richiesta |
| 400 | INVALID_FILE_TYPE | Il tipo di file caricato non è supportato |
| 400 | DURATION_DETECTION_FAILED | Impossibile rilevare la durata del file caricato |
| 400 | INVALID_MULTIPART_REQUEST | I dati del modulo multipart sono malformati o superano i limiti di campo |
| 400 | INVALID_BRAND_VOCABULARY | Una voce del glossario specifica per la richiesta non è valida |
| 400 | INVALID_SOURCE_SRT | Il file SRT sorgente fornito è malformato |
| 400 | SOURCE_LANGUAGE_REQUIRED_FOR_SRT | sourceSrt richiede un originalLanguage esplicito |
| 400 | VIDEO_TOO_LONG | La durata del file multimediale supera il limite del piano dell’utente |
| 413 | FILE_TOO_LARGE | Il file caricato supera il limite del piano dell’utente |
| 401 | MISSING_API_KEY | La chiave API è richiesta |
| 401 | INVALID_API_KEY_FORMAT | La chiave API deve iniziare con vc_ |
| 401 | INVALID_API_KEY | La chiave API fornita non è valida |
| 403 | API_ACCESS_REQUIRED | L’accesso all’API è richiesto per questo account |
| 403 | SUBSCRIPTION_REQUIRED | L’accesso all’API richiede un abbonamento a pagamento |
| 429 | RATE_LIMIT_EXCEEDED | Troppe richieste (limite: 10 richieste al minuto) |
| 429 | CONCURRENT_TRANSLATION_LIMIT_REACHED | Troppe traduzioni in corso (limite: 10 traduzioni simultanee) |
| 500 | INTERNAL_ERROR | Errore imprevisto del server |
Questa pagina è stata utile?

