# 1. import the video - YouTube, Drive, Vimeo or a direct URL
curl -X POST https://api.rask.ai/v3/media/import \
-H "Authorization: Bearer $RASK_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://youtu.be/..."}'
# 2. the price first - free, and it changes nothing
curl -X POST https://api.rask.ai/v3/projects/estimate \
-H "Authorization: Bearer $RASK_API_KEY" \
-H "Content-Type: application/json" \
-d '{"media_id": "...", "target_language": "es-mx"}'
# 3. dub with the speakers' own voices - the price you accepted is the ceiling
curl -X POST https://api.rask.ai/v3/projects \
-H "Authorization: Bearer $RASK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"media_id": "...",
"target_language": "es-mx",
"expected_cost_minutes": 12
}'# Wait on the job instead of polling: one request, up to 20 seconds.
curl -s "https://api.rask.ai/v3/jobs/$JOB_ID?wait_seconds=20" \
-H "Authorization: Bearer $RASK_API_KEY" | jq .statusファイルをマルチパートフォームデータとして送信するか、YouTube、Googleドライブ、S3、Vimeo、または任意の直接URLからリンクを投稿します。このビデオの音声は、各インスタントボイスクローンのサンプル音声となります。
media_idと翻訳先の言語を指定します。検知された話者ごとに対応言語でのインスタント音声クローンが作成され、すぐに吹き替えが始まります。
プロジェクトの音声を一覧表示し、任意のスピーカーにカスタムクローンまたはプリセットを割り当てます。その後、/generateを呼び出し、吹き替えが完了したらファイルをダウンロードします。
# pip install rask-sdk
from rask_sdk import Rask
rask = Rask() # reads RASK_API_KEY
uploaded = rask.jobs.wait(rask.uploads.upload_file("keynote.mp4").id)
media_id = uploaded.result.media_id
# the price first - free, and it changes nothing
estimate = rask.projects.estimate_project(
media_id=media_id, target_language="es-mx"
)
# the price you accepted is the ceiling
created = rask.projects.create_project(
media_id=media_id,
target_language="es-mx",
expected_cost_minutes=estimate.total_minutes,
)
processed = rask.jobs.wait(created.id)
outputs = rask.exports.list_project_outputs(processed.result.project_id).data
print(next(o.url for o in outputs if o.kind == "dubbed_video"))import os, requests
API = "https://api.rask.ai/v3"
h = {"Authorization": f"Bearer {os.environ['RASK_API_KEY']}"}
job = requests.post(f"{API}/media/import", headers=h,
json={"url": "https://youtu.be/..."}).json()
media_id = requests.get(f"{API}/jobs/{job['id']}?wait_seconds=20",
headers=h).json()["result"]["media_id"]
order = {"media_id": media_id, "target_language": "es-mx"}
# the price first - free, and it changes nothing
estimate = requests.post(f"{API}/projects/estimate", headers=h, json=order).json()
# the price you accepted is the ceiling
project = requests.post(f"{API}/projects", headers=h,
json={**order,
"expected_cost_minutes": estimate["total_minutes"]}).json()
outputs = requests.get(f"{API}/projects/{project['project_id']}/outputs",
headers=h).json()
print(next(o["url"] for o in outputs["data"] if o["kind"] == "dubbed_video"))// no dependencies, Node 18+ global fetch
const API = 'https://api.rask.ai/v3';
const h = {
Authorization: `Bearer ${process.env.RASK_API_KEY}`,
'Content-Type': 'application/json',
};
const imported = await fetch(`${API}/media/import`, {
method: 'POST', headers: h,
body: JSON.stringify({ url: 'https://youtu.be/...' }),
}).then(r => r.json());
const job = await fetch(`${API}/jobs/${imported.id}?wait_seconds=20`, { headers: h })
.then(r => r.json());
const order = { media_id: job.result.media_id, target_language: 'es-mx' };
// the price first - free, and it changes nothing
const estimate = await fetch(`${API}/projects/estimate`, {
method: 'POST', headers: h, body: JSON.stringify(order),
}).then(r => r.json());
// the price you accepted is the ceiling
const project = await fetch(`${API}/projects`, {
method: 'POST', headers: h,
body: JSON.stringify({ ...order, expected_cost_minutes: estimate.total_minutes }),
}).then(r => r.json());
const outputs = await fetch(`${API}/projects/${project.project_id}/outputs`, { headers: h })
.then(r => r.json());
console.log(outputs.data.find(o => o.kind === 'dubbed_video')?.url);API=https://api.rask.ai/v3
AUTH="Authorization: Bearer $RASK_API_KEY"
JSON="Content-Type: application/json"
# 1. import the video, then wait for the media id
JOB=$(curl -s -X POST $API/media/import -H "$AUTH" -H "$JSON" \
-d '{"url": "https://youtu.be/..."}' | jq -r .id)
MEDIA=$(curl -s "$API/jobs/$JOB?wait_seconds=20" -H "$AUTH" | jq -r .result.media_id)
ORDER="{\"media_id\":\"$MEDIA\",\"target_language\":\"es-mx\"}"
# 2. the price first - free, and it changes nothing
CAP=$(curl -s -X POST $API/projects/estimate -H "$AUTH" -H "$JSON" \
-d "$ORDER" | jq -r .total_minutes)
# 3. the price you accepted is the ceiling
ID=$(curl -s -X POST $API/projects -H "$AUTH" -H "$JSON" \
-d "$(jq -c --argjson cap "$CAP" '. + {expected_cost_minutes:$cap}' <<<"$ORDER")" \
| jq -r .project_id)
# 4. collect the dubbed video, in the speakers' own voices
curl -s $API/projects/$ID/outputs -H "$AUTH" \
| jq -r '.data[] | select(.kind == "dubbed_video") | .url'<?php
use GuzzleHttp\Client;
$http = new Client([
'base_uri' => 'https://api.rask.ai/v3/',
'headers' => ['Authorization' => 'Bearer ' . getenv('RASK_API_KEY')],
]);
$job = json_decode($http->post('media/import',
['json' => ['url' => 'https://youtu.be/...']])->getBody(), true);
$media = json_decode($http->get("jobs/{$job['id']}?wait_seconds=20")->getBody(), true);
$order = ['media_id' => $media['result']['media_id'], 'target_language' => 'es-mx'];
// the price first - free, and it changes nothing
$estimate = json_decode($http->post('projects/estimate',
['json' => $order])->getBody(), true);
// the price you accepted is the ceiling
$project = json_decode($http->post('projects', ['json' => $order + [
'expected_cost_minutes' => $estimate['total_minutes'],
]])->getBody(), true);
$outputs = json_decode(
$http->get("projects/{$project['project_id']}/outputs")->getBody(), true); 0s queued
3s running transcribing
48s running translating
72s running voicing
128s running merging
150s succeeded

es-mx および es-es 同様に。プロジェクトの記録 glossary.versionのため、後から編集しても完成した作業が勝手に変更されることはありません。はい。Raskの音声クローンAPIは、動画の吹き替えの一環として話者の音声を再現します。翻訳先の言語を指定してプロジェクトを作成すると、対応言語において各話者の「インスタント音声クローン」が自動的に作成されます。また、Raskアプリで作成した「カスタム音声クローン」を任意の話し手に割り当てることも可能です。
インスタント音声クローンは、対応言語において元の動画内の話者の音声を利用します。再利用可能なカスタム音声クローンを作成するには、話者の同意を得た上でRaskアプリで作成し、API経由で割り当てます。結果は元の音声や選択した言語、音声によって異なります。
インスタント音声クローンは、短い音声サンプルを録音することなく、吹き替える動画の音声から自動的に作成されます。カスタム音声クローンは、一度アップロードした音声サンプルから学習され、音声ライブラリに保存されるため、voice_idを指定すればどのプロジェクトでも再利用できます。音声リストでは、インスタント音声クローンには「音声クローン」というラベルが付き、性別は「自動」と表示されます。
カスタム音声クローンの作成は、Raskのウェブプラットフォームで行えます。クローンが保存されたら、プロジェクト音声取得エンドポイントからvoice_idを取得し、API経由で話者に割り当ててください。
1〜10分の音声または動画(1ファイルあたり最大10MB、合計10ファイルまで)を、MP4、MOV、WEBM、MKV、MP3、M4A、WAV形式でアップロードするか、YouTubeやGoogleドライブのリンクを貼り付けてください。より良い結果を得るためには、静かな部屋で優れたマイクを使用し、背景音のない状態で、安定した話し方の1人の話者の音声をご用意ください。
音声クローンは57の基本言語と、それに対応する各地域の方言をサポートしています。地域の方言には基本のクローンモデルが適用されます(例:イギリス英語のテキストにはアメリカ英語の音声モデルを使用)。その他のターゲット言語については、AI音声のプリセットをお選びください。詳細な言語リストについては、APIの言語カタログをご確認ください。
このAPIは、音声のみのポッドキャストやインタビューを含め、動画と音声の録音データの両方の吹き替えを行います。独自の言い回しを使用したい場合は、翻訳されたテキストをセグメントごとに編集するか、プロジェクトを作成する前に独自の.srtファイルからトランスクリプトを作成してください。クローンされた音声がそのテキストを読み上げます。入力は常に録音データとなるため、音声データのないテキストのみのナレーションには、テキスト読み上げ用APIの方が適しています。
Read the speakers with GET /v3/projects/{project_id}/speakers, then assign a voice to one of them with PUT /v3/projects/{project_id}/speakers/{speaker_id}/voice and re-dub with POST /v3/projects/{project_id}/dub. Estimate the re-dub first and the price comes back before anything runs: it is billed on the combined duration of changed segments, with a one-minute minimum per charged run.
クリエイターProプランでは最大3つ、ビジネスプランでは最大10個のチーム共有音声、エンタープライズプランではカスタム音声ライブラリを利用できます。
はい。カスタム音声クローンは話者の同意を得て作成されるものであり、話者の合意が得られている動画のみを吹き替える必要があります。Raskでは同意に基づいた音声クローン機能とAIの安全性管理を行っており、お客様の音声が一般的なモデルの学習に使用されることは一切ありません。
クローンは音色やピッチを含む話者の声の個性を再現するため、別の言語でも本人らしく聞こえます。感情のトーン、緩急、リズムは元の音声と翻訳されたスクリプトに従うため、クリアで表現力豊かな元の音声を使用すると、より良い結果が得られます。
元動画の権利と話者の同意を得ている場合、クローン音声を使用した吹き替え動画を商用コンテンツとして公開できます。ご利用のプランに適用される詳細については、Raskの利用規約をご確認ください。
音声クローンは吹き替え機能の一部であり、追加料金はかかりません。APIの利用料金は動画の分数単位(1分未満は切り上げ)で、Raskアプリと同じ分数プールから差し引かれます。プランの分量を超過した場合は1分あたり3ドルかかります。音声変更後の再吹き替えは、変更されたセグメントの分数のみが課金されます。クレジットカード不要の無料トライアルからお気軽にお試しください。