# 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": "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



อัปโหลดไฟล์วิดีโอเป็นข้อมูลฟอร์มแบบ multipart หรือส่งลิงก์จาก YouTube, Google Drive, Vimeo, S3 หรือลิงก์ตรง คุณจะได้รับรหัสสื่อและข้อมูลเมตาของวิดีโอก่อนมีค่าใช้จ่าย
ส่งรหัสสื่อในพารามิเตอร์ media_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.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']}"}
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": "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://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: '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 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\":\"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://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' => '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);no_audio_track, no_speech_detected and source_unavailable are specific enough to show directly to your own user, for example a video without speech. 0s queued
3s running transcribing
48s running translating
72s running voicing
128s running merging
150s succeeded/transcriptiontarget_subtitlestarget_subtitles_speakersdubbed_videodubbed_audiosource

es-mx และ es-es เหมือนกัน โดยโปรเจกต์จะบันทึก glossary.versionไว้ การแก้ไขในภายหลังจึงไม่ทำให้งานที่เสร็จแล้วเปลี่ยนไปโดยที่คุณไม่รู้ตัวมี คุณส่งไฟล์หรือลิงก์วิดีโอ สร้างโปรเจกต์ แล้วอ่านบทถอดเสียงพร้อมป้ายระบุผู้พูดและเวลากำกับได้จาก GET /v3/projects/{project_id}/transcript การถอดเสียงเป็นขั้นตอนแรกของทุกโปรเจกต์ใน Rask จากนั้นระบบจะแปล สร้างคำบรรยาย และสร้างฉบับพากย์เสียง
ได้ ส่งลิงก์จาก YouTube, Google Drive, Vimeo หรือ S3 หรือลิงก์ดาวน์โหลดโดยตรงไปยังเอนด์พอยต์สื่อ แล้ว API จะดึงวิดีโอให้ คุณยังอัปโหลดไฟล์วิดีโอโดยตรงได้ด้วย
ได้ สร้างหนึ่งโปรเจกต์ต่อวิดีโอหนึ่งเรื่องแล้วประมวลผลพร้อมกัน คุณประเมินราคาแต่ละโปรเจกต์ล่วงหน้าได้ จึงรู้ค่าใช้จ่ายของวิดีโอทั้งคลังก่อนเริ่มโปรเจกต์แรก
ระบบตรวจจับผู้พูดแต่ละคนโดยอัตโนมัติและใส่ป้ายระบุผู้พูดในแต่ละช่วง เช่น SPEAKER_00 หากคุณทราบจำนวนผู้พูด ให้ส่งค่านั้นผ่าน num_speakers ตอนสร้างโปรเจกต์
API รองรับการถอดเสียงจากภาษาต้นทาง 75 ภาษา รวมถึงภาษาอังกฤษ เว้น source_language ไว้เพื่อให้ระบบตรวจจับภาษาอัตโนมัติ หรือระบุรหัสภาษา เช่น en บทถอดเสียงแปลได้เป็นภาษาและรูปแบบภาษาตามภูมิภาคมากกว่า 135 แบบ เช่น en-us หรือ es-mx
ความแม่นยำขึ้นอยู่กับวิดีโอของคุณ ทั้งเสียงรบกวนพื้นหลัง สภาพแวดล้อมที่มีเสียงดัง การพูดทับกัน สำเนียง และศัพท์เฉพาะทาง ล้วนมีผลต่อการถอดเสียง คุณลองใช้ API กับวิดีโอของคุณเองได้ แล้วแก้ไขบทถอดเสียงผ่าน API ได้ทุกช่วงก่อนเผยแพร่
บทถอดเสียงอยู่ในรูปแบบ JSON โดยแบ่งเป็นช่วง แต่ละช่วงระบุผู้พูดและเวลา คุณนำข้อความแต่ละช่วงมาต่อกันเป็นข้อความธรรมดาได้ หรือเก็บข้อมูลเวลาไว้เพื่อให้ค้นหาช่วงที่ต้องการในบทถอดเสียงได้ นอกจากนี้ยังมีคำบรรยายในภาษาเป้าหมายให้ทั้งรูปแบบ SRT และ VTT
ไม่ได้ API จะส่งคืนบทถอดเสียง คำแปลของบทถอดเสียง คำบรรยาย และเวอร์ชันพากย์เสียง หากต้องการใช้ AI สร้างบทสรุปหรือบันทึกการประชุม คุณสามารถส่งบทถอดเสียงให้เครื่องมือสรุปความที่คุณเลือกได้
ได้ หากคุณบันทึกการประชุมไว้ ให้อัปโหลดไฟล์วิดีโอหรือไฟล์เสียงที่บันทึกไว้ API ไม่เชื่อมต่อกับแพลตฟอร์มประชุม และไม่รองรับคำบรรยายแบบเรียลไทม์หรือการถอดเสียงการสนทนาสดแบบหน่วงต่ำ
เอกสาร API ไม่ได้ระบุขนาดไฟล์สูงสุดที่ตายตัว แต่ละโปรเจกต์จะรายงานค่า source_duration_seconds และ duration_seconds หลังจากใช้ข้อจำกัดตามแพ็กเกจของคุณแล้ว หากวิดีโอยาวมากหรือคุณต้องถอดเสียงในปริมาณมาก โปรดติดต่อทีมงานของเรา
แต่ละโปรเจกต์คิดค่าบริการตามจำนวนนาทีของวิดีโอ โดยปัดเศษขึ้นเป็นนาทีเต็มและหักจากยอดนาทีเดียวกับที่ใช้ในแอป Rask ราคานี้รวมการถอดเสียง การแปล คำบรรยาย และเวอร์ชันพากย์เสียงแล้ว สำหรับแพ็กเกจมาตรฐานที่เข้าเงื่อนไข นาทีเพิ่มเติมมีราคา $3/นาที ส่วนราคาแพ็กเกจ Enterprise เป็นไปตามข้อตกลงของคุณ
เริ่มทดลองใช้ฟรีในแอป Rask เพื่อทดสอบการถอดเสียงกับวิดีโอของคุณเองโดยไม่ต้องใช้บัตรเครดิต คุณใช้ API ได้ในแพ็กเกจ Creator Pro, Business และ Enterprise โดยฟีเจอร์ที่ใช้ได้ขึ้นอยู่กับแพ็กเกจของคุณ
คุณใช้ API ได้ในแพ็กเกจ Creator Pro, Business และ Enterprise โดยฟีเจอร์ที่ใช้ได้ขึ้นอยู่กับแพ็กเกจของคุณ เมื่อสร้างคีย์ API ในแอปแล้ว คุณก็เรียกใช้ API ได้ทันที สำหรับแพ็กเกจ Enterprise ราคาตามปริมาณการใช้งาน หรือการรองรับภาษาเพิ่มเติมตามความต้องการ โปรดติดต่อทีมงานของเรา