프로젝트 대본 내보내기
curl --request POST \
--url https://api.voicecheap.ai/v1/projects/{projectId}/transcript \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--data '
{
"source": "<string>",
"targetLanguage": "<string>",
"outputFormat": "<string>",
"includeSpeakerLabels": true
}
'import requests
url = "https://api.voicecheap.ai/v1/projects/{projectId}/transcript"
payload = {
"source": "<string>",
"targetLanguage": "<string>",
"outputFormat": "<string>",
"includeSpeakerLabels": True
}
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({
source: '<string>',
targetLanguage: '<string>',
outputFormat: '<string>',
includeSpeakerLabels: true
})
};
fetch('https://api.voicecheap.ai/v1/projects/{projectId}/transcript', 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/{projectId}/transcript",
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([
'source' => '<string>',
'targetLanguage' => '<string>',
'outputFormat' => '<string>',
'includeSpeakerLabels' => true
]),
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/{projectId}/transcript"
payload := strings.NewReader("{\n \"source\": \"<string>\",\n \"targetLanguage\": \"<string>\",\n \"outputFormat\": \"<string>\",\n \"includeSpeakerLabels\": true\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/{projectId}/transcript")
.header("x-api-key", "<x-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"source\": \"<string>\",\n \"targetLanguage\": \"<string>\",\n \"outputFormat\": \"<string>\",\n \"includeSpeakerLabels\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.voicecheap.ai/v1/projects/{projectId}/transcript")
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 \"source\": \"<string>\",\n \"targetLanguage\": \"<string>\",\n \"outputFormat\": \"<string>\",\n \"includeSpeakerLabels\": true\n}"
response = http.request(request)
puts response.read_body전사
프로젝트 대본 내보내기
원본 또는 번역된 프로젝트 대본을 JSON, SRT 또는 VTT 형식으로 검색
프로젝트 대본 내보내기
curl --request POST \
--url https://api.voicecheap.ai/v1/projects/{projectId}/transcript \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--data '
{
"source": "<string>",
"targetLanguage": "<string>",
"outputFormat": "<string>",
"includeSpeakerLabels": true
}
'import requests
url = "https://api.voicecheap.ai/v1/projects/{projectId}/transcript"
payload = {
"source": "<string>",
"targetLanguage": "<string>",
"outputFormat": "<string>",
"includeSpeakerLabels": True
}
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({
source: '<string>',
targetLanguage: '<string>',
outputFormat: '<string>',
includeSpeakerLabels: true
})
};
fetch('https://api.voicecheap.ai/v1/projects/{projectId}/transcript', 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/{projectId}/transcript",
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([
'source' => '<string>',
'targetLanguage' => '<string>',
'outputFormat' => '<string>',
'includeSpeakerLabels' => true
]),
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/{projectId}/transcript"
payload := strings.NewReader("{\n \"source\": \"<string>\",\n \"targetLanguage\": \"<string>\",\n \"outputFormat\": \"<string>\",\n \"includeSpeakerLabels\": true\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/{projectId}/transcript")
.header("x-api-key", "<x-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"source\": \"<string>\",\n \"targetLanguage\": \"<string>\",\n \"outputFormat\": \"<string>\",\n \"includeSpeakerLabels\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.voicecheap.ai/v1/projects/{projectId}/transcript")
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 \"source\": \"<string>\",\n \"targetLanguage\": \"<string>\",\n \"outputFormat\": \"<string>\",\n \"includeSpeakerLabels\": true\n}"
response = http.request(request)
puts response.read_body프로젝트 대본 내보내기
내부 웹 앱 엔드포인트를 사용하지 않고 기존 VoiceCheap 프로젝트에서 대본을 검색합니다. 이 엔드포인트는 원본 대본과 사용 가능한 모든 대상 언어 대본을 지원합니다. 성공적인 요청은 HTTP200을 반환합니다.
요청
string
필수
귀하의 VoiceCheap API 키.
string
필수
original 또는 translated.string
source이 translated일 때 필요합니다. french와 같이 프로젝트에 저장된 대상 언어 이름을 사용하십시오.string
기본값:"json"
json, srt 또는 vtt.boolean
기본값:"false"
SRT 또는 VTT에 표시 가능한 화자 레이블을 포함합니다. JSON에는 항상 화자 번호가 포함됩니다.
예시
cURL — Original JSON
curl -X POST "https://api.voicecheap.ai/v1/projects/project_123/transcript" \
-H "x-api-key: vc_your-api-key" \
-H "Content-Type: application/json" \
-d '{
"source": "original",
"outputFormat": "json"
}'
cURL — Translated SRT
curl -X POST "https://api.voicecheap.ai/v1/projects/project_123/transcript" \
-H "x-api-key: vc_your-api-key" \
-H "Content-Type: application/json" \
-d '{
"source": "translated",
"targetLanguage": "french",
"outputFormat": "srt",
"includeSpeakerLabels": true
}' \
--output project_123-fr.srt
workId이 포함됩니다.
오류
| 상태 | 코드 | 설명 |
|---|---|---|
| 400 | TARGET_LANGUAGE_REQUIRED | 언어 없이 번역된 출력이 요청되었습니다 |
| 401 | INVALID_API_KEY | API 키가 없거나 유효하지 않습니다 |
| 403 | FORBIDDEN | API 키로 이 프로젝트에 액세스할 수 없습니다 |
| 404 | PROJECT_NOT_FOUND | 프로젝트가 존재하지 않습니다 |
| 404 | TRANSCRIPT_NOT_FOUND | 요청한 원본 또는 번역된 대본이 없습니다 |
| 409 | TRANSCRIPT_NOT_READY | 요청한 대본이 아직 처리 중입니다 |
이 페이지가 도움이 되었나요?

