# 1. import the audio or video
curl -X POST https://api.rask.ai/v3/media/import \
-H "Authorization: Bearer $RASK_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com/interview.mp3"}'
# 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": "en-us"}'
# 3. create the project - 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": "en-us",
"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などの直接リンクを投稿してください。料金が発生する前に、メディアIDとファイルのメタデータを確認できます。
media_idと翻訳先の言語を指定します。可能であれば、元の言語や話者の数も指定してください。すぐに認識処理が始まります。
翻訳されたメディアの処理が進んでいる間、セグメントの準備ができ次第、すぐに文字起こしを確認できます。プロジェクトが完了したら、字幕やメディアファイルをダウンロードしてください。
# pip install rask-sdk
from rask_sdk import Rask
rask = Rask() # reads RASK_API_KEY
uploaded = rask.jobs.wait(rask.uploads.upload_file("interview.mp3").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']}"}
job = requests.post(f"{API}/media/import", headers=h,
json={"url": "https://example.com/interview.mp3"}).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": "en-us"}
# 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()
for o in outputs["data"]:
print(o["kind"], o["url"])// 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://example.com/interview.mp3' }),
}).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: 'en-us' };
// 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());
outputs.data.forEach(o => console.log(o.kind, o.url));API=https://api.rask.ai/v3
AUTH="Authorization: Bearer $RASK_API_KEY"
JSON="Content-Type: application/json"
# 1. import the file, then wait for the media id
JOB=$(curl -s -X POST $API/media/import -H "$AUTH" -H "$JSON" \
-d '{"url": "https://example.com/interview.mp3"}' | 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\":\"en-us\"}"
# 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 transcript and every other output
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')],
]);
$job = json_decode($http->post('media/import',
['json' => ['url' => 'https://example.com/interview.mp3']])->getBody(), true);
$media = json_decode($http->get("jobs/{$job['id']}?wait_seconds=20")->getBody(), true);
$order = ['media_id' => $media['result']['media_id'], 'target_language' => 'en-us'];
// 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 speaker labels
72s succeeded the transcript is in the project outputs

es-mx および es-es 同様に。プロジェクトの記録 glossary.versionのため、後から編集しても完成した作業が勝手に変更されることはありません。はい。音声認識は、すべてのRaskプロジェクトの最初のステップです。音声や動画をインポートしてプロジェクトを作成し、GET /v3/projects/{project_id}/transcriptから、話者のラベルやタイムスタンプ付きのセグメントとして文字起こしを確認できます。同じプロジェクト内で文字起こしの翻訳を行い、字幕や音声の吹き替えデータを取得できます。
APIでは75の言語を入力として利用できます。元の言語を指定せずに空欄にしておくと自動で検出されます。また、「en」や「de」などのコードを指定することも可能です。文字起こしテキストは、135以上の言語や地域設定に翻訳できます。
話者の識別(の話者分離)に対応していますか?
はい。異なる話者が自動的に検出され、各セグメントにはSPEAKER_XX形式の話者ラベルが付与されます。人数が分かっている場合は「num_speakers」を指定でき、API経由でどのセグメントの話者でも修正できます。
いいえ。タイムスタンプはセグメント単位です。各セグメントには「HH:MM:SS,mmm」形式の開始時間と終了時間が設定されます。これはキャプションや字幕で使用されるタイミングです。単語ごとにタイムスタンプが必要な場合は、音声認識専用のAPIをご利用ください。
いいえ。Raskは、録音・録画済みの完成した音声や動画をテキスト化します。話者がまだ話している最中にテキストを表示する必要があるリアルタイムのキャプション、音声エージェント、対話型AI、コールセンターなどの用途には、ストリーミング対応の音声認識APIが適しています。
精度は音声の品質によって異なります。マイクの種類、アクセント、話者の声の重なり、背景の雑音などが影響します。実際の録音データの一部でAPIをテストし、公開や翻訳の前にAPI経由でセグメントを修正することをおすすめします。
認識処理にはカスタム用語リストを直接指定できません。特定の単語を修正するには、セグメントエンドポイントを使用します。テキストが翻訳される際、用語集機能によって製品名、固有名詞、専門用語が一貫して維持されます。
完成したプロジェクトには、ターゲット言語のSRTおよびVTT形式の字幕ファイルが含まれます。ソース言語のテキストは、開始時間と終了時間を含むJSONセグメントとして取得でき、数行のコードでSRTに変換できます。
はい。テキストインポート機能を利用できるプランでは、プロジェクト作成時に既存のソーステキスト、承認済みのターゲット言語翻訳、あるいはその両方をSRTファイルやタイムスタンプ付きテキストセグメントとして提供できます。Raskはお手持ちのソーススクリプトを翻訳するか、承認済みの翻訳を使用して吹き替えを行うことができます。
プロジェクトの料金は、音声や動画の再生時間1分単位で計算され、端数は切り上げられます。Raskアプリの共通の利用枠から消費されます。料金には、文字起こし、翻訳、音声吹き替え、字幕が含まれます。対象となる標準プランでは、追加の利用時間は1分あたり3ドルです。企業向けプランの料金は契約内容に合わせて個別設定されます。文字起こしのみが必要な場合は、専用の音声認識APIをより低価格でご利用いただけます。
Raskアプリの無料トライアルから始めましょう。クレジットカードの登録は不要で、ご自身のファイルを使って文字起こしや翻訳を試すことができます。APIのご利用はCreator Pro、Business、Enterpriseプランで可能であり、利用できる機能はプランによって異なります。
APIアクセスはCreator Pro、Business、Enterpriseプランでご利用いただけます(機能はプランにより異なります)。アプリでAPIキーを作成すれば、すぐに利用を開始できます。Enterpriseプランのご契約、大量利用時の割引、カスタム言語への対応については、チームまでお問い合わせください。