プロジェクトのトランスクリプトをエクスポート
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プロジェクトのトランスクリプトをエクスポート
内部Webアプリのエンドポイントを使用せずに、既存の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 | 要求されたトランスクリプトは現在処理中です |
このページは役に立ちましたか?

