メディアの文字起こし
curl --request POST \
--url https://api.voicecheap.ai/v1/transcribe \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--data '
{
"outputFormat": "<string>",
"originalLanguage": "<string>",
"numberOfSpeakers": "<string>",
"brandVocabulary": "<string>",
"removeFillerWords": true,
"includeSpeakerLabels": true
}
'import requests
url = "https://api.voicecheap.ai/v1/transcribe"
payload = {
"outputFormat": "<string>",
"originalLanguage": "<string>",
"numberOfSpeakers": "<string>",
"brandVocabulary": "<string>",
"removeFillerWords": True,
"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({
outputFormat: '<string>',
originalLanguage: '<string>',
numberOfSpeakers: '<string>',
brandVocabulary: '<string>',
removeFillerWords: true,
includeSpeakerLabels: true
})
};
fetch('https://api.voicecheap.ai/v1/transcribe', 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/transcribe",
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([
'outputFormat' => '<string>',
'originalLanguage' => '<string>',
'numberOfSpeakers' => '<string>',
'brandVocabulary' => '<string>',
'removeFillerWords' => true,
'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/transcribe"
payload := strings.NewReader("{\n \"outputFormat\": \"<string>\",\n \"originalLanguage\": \"<string>\",\n \"numberOfSpeakers\": \"<string>\",\n \"brandVocabulary\": \"<string>\",\n \"removeFillerWords\": true,\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/transcribe")
.header("x-api-key", "<x-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"outputFormat\": \"<string>\",\n \"originalLanguage\": \"<string>\",\n \"numberOfSpeakers\": \"<string>\",\n \"brandVocabulary\": \"<string>\",\n \"removeFillerWords\": true,\n \"includeSpeakerLabels\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.voicecheap.ai/v1/transcribe")
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 \"outputFormat\": \"<string>\",\n \"originalLanguage\": \"<string>\",\n \"numberOfSpeakers\": \"<string>\",\n \"brandVocabulary\": \"<string>\",\n \"removeFillerWords\": true,\n \"includeSpeakerLabels\": true\n}"
response = http.request(request)
puts response.read_body文字起こし
メディアの文字起こし
オーディオまたはビデオファイルを完全なJSON、SRT、またはVTTとして文字起こしします
メディアの文字起こし
curl --request POST \
--url https://api.voicecheap.ai/v1/transcribe \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--data '
{
"outputFormat": "<string>",
"originalLanguage": "<string>",
"numberOfSpeakers": "<string>",
"brandVocabulary": "<string>",
"removeFillerWords": true,
"includeSpeakerLabels": true
}
'import requests
url = "https://api.voicecheap.ai/v1/transcribe"
payload = {
"outputFormat": "<string>",
"originalLanguage": "<string>",
"numberOfSpeakers": "<string>",
"brandVocabulary": "<string>",
"removeFillerWords": True,
"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({
outputFormat: '<string>',
originalLanguage: '<string>',
numberOfSpeakers: '<string>',
brandVocabulary: '<string>',
removeFillerWords: true,
includeSpeakerLabels: true
})
};
fetch('https://api.voicecheap.ai/v1/transcribe', 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/transcribe",
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([
'outputFormat' => '<string>',
'originalLanguage' => '<string>',
'numberOfSpeakers' => '<string>',
'brandVocabulary' => '<string>',
'removeFillerWords' => true,
'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/transcribe"
payload := strings.NewReader("{\n \"outputFormat\": \"<string>\",\n \"originalLanguage\": \"<string>\",\n \"numberOfSpeakers\": \"<string>\",\n \"brandVocabulary\": \"<string>\",\n \"removeFillerWords\": true,\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/transcribe")
.header("x-api-key", "<x-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"outputFormat\": \"<string>\",\n \"originalLanguage\": \"<string>\",\n \"numberOfSpeakers\": \"<string>\",\n \"brandVocabulary\": \"<string>\",\n \"removeFillerWords\": true,\n \"includeSpeakerLabels\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.voicecheap.ai/v1/transcribe")
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 \"outputFormat\": \"<string>\",\n \"originalLanguage\": \"<string>\",\n \"numberOfSpeakers\": \"<string>\",\n \"brandVocabulary\": \"<string>\",\n \"removeFillerWords\": true,\n \"includeSpeakerLabels\": true\n}"
response = http.request(request)
puts response.read_bodyメディアの文字起こし
オーディオまたはビデオファイルをアップロードして、そのトランスクリプトを直接受け取ります。このスタンドアロンエンドポイントは、吹き替えプロジェクトを作成しません。 このエンドポイントは、最大200 MBかつ2時間までのファイルを受け付けます。翻訳APIと同じAPIキーアクセスルールを使用します。 リクエストが成功すると、HTTP200 が返されます。
リクエスト
以下のフィールドを含むmultipart/form-data を送信します。
string
必須
お客様の VoiceCheap APIキー。
file
必須
文字起こしするオーディオまたはビデオファイル。サポートされている形式は、MP4、MOV、MKV、WebM、MPEG、MP3、WAV、M4A、FLAC、OGG、およびAACです。
string
デフォルト:"json"
レスポンス形式:
json、srt、または vtt。string
デフォルト:"auto-detect"
サポートされているソース言語のISOコード。ソース言語が不明な場合を除き、これを
auto-detect のままにしてください。サポートされていない明示的な言語を指定すると、処理開始前に検証エラーが返されます。string
デフォルト:"auto-detect"
auto-detect または 1 から 32 までの整数。string
認識させる名前、ブランド、頭字語、またはドメイン用語のJSON文字列配列。リクエストされた用語は、保存されたアカウントまたはチームの用語集とマージされます。
["VoiceCheap", "SmartSync", "ITC Global"]
boolean
デフォルト:"true"
トランスクリプトから一般的なフィラーワードを削除します。
boolean
デフォルト:"false"
SRTキューに
Speaker N: をプレフィックスとして付けるか、VTT音声タグを追加します。JSONには常に、すべてのセグメントと単語に数値のスピーカーが含まれます。JSONレスポンス
JSONは最も完全な出力です。全文、言語の信頼度、メディアの長さ、スピーカー、タイムスタンプ付きセグメント、およびタイムスタンプ付き単語が含まれています。{
"source": "standalone",
"language": "en",
"languageConfidence": 0.99,
"duration": 12.4,
"text": "Welcome to VoiceCheap.",
"speakers": [{ "id": 0, "label": "Speaker 1" }],
"segments": [
{
"index": 0,
"text": "Welcome to VoiceCheap.",
"begin": 0.18,
"end": 1.74,
"duration": 1.56,
"speaker": 0,
"language": "en",
"confidence": 0.94,
"words": [
{
"index": 0,
"text": "Welcome",
"speaker": 0,
"confidence": 0.96,
"begin": 0.18,
"end": 0.62,
"duration": 0.44
}
]
}
],
"words": [
{
"index": 0,
"text": "Welcome",
"speaker": 0,
"confidence": 0.96,
"begin": 0.18,
"end": 0.62,
"duration": 0.44
}
]
}
例
curl -X POST "https://api.voicecheap.ai/v1/transcribe" \
-H "x-api-key: vc_your-api-key" \
-F "file=@interview.mp4" \
-F "outputFormat=json" \
-F "numberOfSpeakers=2" \
-F 'brandVocabulary=["VoiceCheap","SmartSync"]'
curl -X POST "https://api.voicecheap.ai/v1/transcribe" \
-H "x-api-key: vc_your-api-key" \
-F "file=@interview.mp4" \
-F "outputFormat=srt" \
-F "includeSpeakerLabels=true" \
--output interview.srt
curl -X POST "https://api.voicecheap.ai/v1/transcribe" \
-H "x-api-key: vc_your-api-key" \
-F "file=@interview.mp4" \
-F "outputFormat=vtt" \
--output interview.vtt
エラー
| ステータス | コード | 説明 |
|---|---|---|
| 400 | FILE_REQUIRED | ファイルがアップロードされていません |
| 400 | INVALID_FILE_TYPE | ファイルタイプはサポートされていません |
| 400 | INVALID_MEDIA_STREAM | ファイルにオーディオストリームがありません |
| 400 | DURATION_DETECTION_FAILED | メディアの長さを読み取れませんでした |
| 400 | DURATION_TOO_LONG | メディアが2時間を超えています |
| 400 | INVALID_BRAND_VOCABULARY | 1つ以上の用語集エントリが無効です |
| 400 | INVALID_BOOLEAN_VALUE | マルチパートのブール値が true または false ではありません |
| 400 | INVALID_JSON_FORMAT | JSONエンコードされたマルチパートフィールドの形式が正しくありません |
| 400 | INVALID_MULTIPART_REQUEST | マルチパートフォームデータの形式が正しくないか、大きすぎます |
| 413 | FILE_TOO_LARGE | ファイルが200 MBを超えています |
| 502 | TRANSCRIPTION_EMPTY | 文字起こしで利用可能な音声が返されませんでした |
| 502 | TRANSCRIPTION_FAILED | 文字起こしエンジンが完了できませんでした |
このページは役に立ちましたか?

