# 1. import your own script as the project transcript
curl -X POST https://api.rask.ai/v3/projects/$ID/transcript/import \
-H "Authorization: Bearer $RASK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"target": {
"format": "srt",
"content": "1\n00:00:00,000 --> 00:00:04,200\nWelcome to the Q3 release.\n"
}
}'
# 2. the price first - free, and it changes nothing
curl -X POST https://api.rask.ai/v3/projects/$ID/dub/estimate \
-H "Authorization: Bearer $RASK_API_KEY"
# 3. voice it - the price you accepted is the ceiling
curl -X POST https://api.rask.ai/v3/projects/$ID/dub \
-H "Authorization: Bearer $RASK_API_KEY" \
-H "Content-Type: application/json" \
-d '{"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ファイルまたは対応するメディアのURLを使用して、音声の元となる動画や音声ファイルをアップロードします。タイムラインによって台本のタイミングが調整されます。
タイムスタンプと話者情報が含まれるテキストセグメント、またはSRTファイルからトランスクリプトを作成し、翻訳先の言語を指定してプロジェクトを作成したら、そこにスクリプトをインポートします。
音声の一覧表示、各話し手へのプリセットまたはクローンの割り当て、必要に応じた再生成を行い、音声、動画、字幕ファイルをダウンロードします。
# pip install rask-sdk
from rask_sdk import Rask
rask = Rask() # reads RASK_API_KEY
uploaded = rask.jobs.wait(rask.uploads.upload_file("explainer.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="en-us"
)
# the price you accepted is the ceiling
created = rask.projects.create_project(
media_id=media_id,
target_language="en-us",
expected_cost_minutes=estimate.total_minutes,
)
processed = rask.jobs.wait(created.id)
for o in rask.exports.list_project_outputs(processed.result.project_id).data:
print(o.kind, o.url)import os, requests
API = "https://api.rask.ai/v3"
h = {"Authorization": f"Bearer {os.environ['RASK_API_KEY']}"}
# your own script becomes the project transcript
requests.post(f"{API}/projects/{project_id}/transcript/import", headers=h, json={
"target": {
"format": "srt",
"content": open("script.srt").read(),
},
})
# the price first - free, and it changes nothing
estimate = requests.post(f"{API}/projects/{project_id}/dub/estimate", headers=h).json()
# the price you accepted is the ceiling
job = requests.post(f"{API}/projects/{project_id}/dub", headers=h,
json={"expected_cost_minutes": estimate["total_minutes"]}).json()
requests.get(f"{API}/jobs/{job['id']}?wait_seconds=20", headers=h).json()// no dependencies, Node 18+ global fetch
import { readFileSync } from 'node:fs';
const API = 'https://api.rask.ai/v3';
const h = {
Authorization: `Bearer ${process.env.RASK_API_KEY}`,
'Content-Type': 'application/json',
};
// your own script becomes the project transcript
await fetch(`${API}/projects/${projectId}/transcript/import`, {
method: 'POST', headers: h,
body: JSON.stringify({
target: { format: 'srt', content: readFileSync('script.srt', 'utf8') },
}),
});
// the price first - free, and it changes nothing
const estimate = await fetch(`${API}/projects/${projectId}/dub/estimate`, {
method: 'POST', headers: h,
}).then(r => r.json());
// the price you accepted is the ceiling
const job = await fetch(`${API}/projects/${projectId}/dub`, {
method: 'POST', headers: h,
body: JSON.stringify({ expected_cost_minutes: estimate.total_minutes }),
}).then(r => r.json());
await fetch(`${API}/jobs/${job.id}?wait_seconds=20`, { headers: h }).then(r => r.json());API=https://api.rask.ai/v3
AUTH="Authorization: Bearer $RASK_API_KEY"
JSON="Content-Type: application/json"
# 1. import your SRT as the project transcript
jq -n --rawfile srt script.srt '{target: {format: "srt", content: $srt}}' \
| curl -s -X POST $API/projects/$ID/transcript/import -H "$AUTH" -H "$JSON" -d @-
# 2. the price first - free, and it changes nothing
CAP=$(curl -s -X POST $API/projects/$ID/dub/estimate -H "$AUTH" | jq -r .total_minutes)
# 3. voice it - the price you accepted is the ceiling
JOB=$(curl -s -X POST $API/projects/$ID/dub -H "$AUTH" -H "$JSON" \
-d "{\"expected_cost_minutes\":$CAP}" | jq -r .id)
# 4. wait on the job, then collect the voiceover
curl -s "$API/jobs/$JOB?wait_seconds=20" -H "$AUTH" | jq .status
curl -s $API/projects/$ID/outputs -H "$AUTH" \
| jq -r '.data[] | "\(.kind)\t\(.url)"'<?php
use GuzzleHttp\Client;
$http = new Client([
'base_uri' => 'https://api.rask.ai/v3/',
'headers' => ['Authorization' => 'Bearer ' . getenv('RASK_API_KEY')],
]);
// your own script becomes the project transcript
$http->post("projects/{$projectId}/transcript/import", ['json' => [
'target' => ['format' => 'srt', 'content' => file_get_contents('script.srt')],
]]);
// the price first - free, and it changes nothing
$estimate = json_decode(
$http->post("projects/{$projectId}/dub/estimate")->getBody(), true);
// the price you accepted is the ceiling
$job = json_decode($http->post("projects/{$projectId}/dub", ['json' => [
'expected_cost_minutes' => $estimate['total_minutes'],
]])->getBody(), true);
$http->get("jobs/{$job['id']}?wait_seconds=20"); 0s queued
3s running preparing the transcript
40s running voicing
110s running merging
135s succeeded

es-mx および es-es 同様に。プロジェクトの記録 glossary.versionのため、後から編集しても完成した作業が勝手に変更されることはありません。はい、動画のナレーション用にご利用いただけます。タイムコード付きのテキストセグメントまたはSRTファイルを動画と一緒に送信すると、APIが映像のタイミングに合わせた自然な音声(AI音声またはボイスクローン)を生成し、同じプロジェクト内で字幕や音声トラックも作成します。
Raskはプロジェクト全体の音声を生成してファイルとして納品するため、公開用の動画やトレーニング、マーケティングコンテンツに適しています。音声の即時出力が必要な音声エージェントやコンタクトセンターなどの用途には、ストリーミング対応の音声合成APIのほうが適しています。
プロジェクトの生成が完了した時点で音声が納品されます。対象プランでは、WAV形式のナレーション、ミックス済み音声、動画が提供されます。APIの生成中に音声のチャンクやバイト単位でストリーミング配信されることはありません。
POST /v3/projects/{project_id}/transcript/import を使用して、独自の原稿を翻訳元または翻訳先のテキストとしてプロジェクトのトランスクリプトに取り込むことができます。すべてのバージョンが保存されるため、一覧表示、比較、復元が可能です。その後、プロジェクトを再ダビングすると、音声が原稿に追従します。
音声ライブラリでは、翻訳先の言語ごとに性別が設定されたAI音声プリセットを利用できます。GET /v3/projects/{project_id}/voices でプロジェクトのオプションを取得し、PUT /v3/projects/{project_id}/speakers/{speaker_id}/voice で話者ごとに音声を割り当ててください。音声クローンに対応している言語では、ボイスクローンも利用できます。
はい。話者の同意を得た上で、Raskアプリでカスタムボイスクローンを一度作成すれば、APIを通じて対応言語内のどの話者にもその音声IDを割り当てることができます。一貫したブランドボイスとして効果的です。
135以上の言語や地域から選択できます。原稿を1つの言語で入力してRaskに翻訳させることも、すでに翻訳された原稿をそのまま送信することも可能です。すべての対応言語でAI音声を利用できます。
APIではセグメントごとに通常のテキストを受け付けます。発音を調整したい場合は、スクリプト内のスペルを調整してください。用語集は単語の翻訳方法を制御するものであり、発音を制御するものではありません。
音声の表現は、選択した音声と句読点を含むテキストに従います。実際の演技のような豊かな感情表現を持たせるには、元の話者のボイスクローンを使用すると、その人らしさをより多く残すことができます。
動画または音声ファイルを使用できます。元のファイルをアップロードし、タイミングに合わせたスクリプトを提供することで、タイムラインに沿ったボイスオーバーを生成できます。ファイルのアップロードが必須となります。
いいえ。利用料金は動画の分数ごとに請求され、端数は次の1分に切り上げられます。Raskアプリと共通の分数プールから消化されます。対象となる標準プランでは、追加分数を1分あたり3ドルでご利用いただけます。エンタープライズプランの料金は、ご契約内容に合わせて個別に設定されます。再吹き替えは変更されたセグメント単位で請求され、1回あたりの最低請求時間は1分となります。
クレジットカードの登録不要でRaskアプリの無料トライアルから始められ、ご自身の動画でAI音声を確認できます。APIアクセスは、Creator Pro、Business、Enterpriseの各プランでご利用可能で、利用できる機能はプランによって異なります。
APIアクセスはCreator Pro、Business、Enterpriseプランでご利用いただけます(機能はプランにより異なります)。アプリでAPIキーを作成すれば、すぐに利用を開始できます。Enterpriseプランのご契約、大量利用時の割引、カスタム言語への対応については、チームまでお問い合わせください。