# 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 Drive, 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ดังนั้นการแก้ไขในภายหลังจึงไม่ส่งผลกระทบต่อAงานที่เสร็จสมบูรณ์แล้วใช่ครับ API การคัดลอกเสียงของ Rask จะคัดลอกเสียงของผู้พูดแต่ละคนเป็นส่วนหนึ่งของกระบวนการพากย์เสียงวิดีโอ คุณสามารถสร้างโครงการโดยกำหนดภาษาเป้าหมาย และผู้พูดทุกคนจะได้รับ Instant Voice Clone ในภาษาที่รองรับ นอกจากนี้ คุณยังสามารถกำหนด Custom Voice Clone ที่คุณสร้างไว้ในแอป Rask ให้กับผู้พูดคนใดก็ได้
Instant Voice Clone ใช้เสียงของผู้พูดจากวิดีโอต้นฉบับสำหรับภาษาเป้าหมายที่รองรับ หากต้องการสร้าง Custom Voice Clone ที่สามารถใช้ซ้ำได้ ให้สร้างในแอป Rask โดยได้รับความยินยอมจากผู้พูดก่อน แล้วกำหนดผ่าน API ผลลัพธ์จะขึ้นอยู่กับเสียงต้นฉบับ รวมถึงภาษาและเสียงที่เลือก
Instant Voice Clone ถูกสร้างขึ้นอัตโนมัติจากเสียงในวิดีโอที่คุณกำลังพากย์ โดยไม่ต้องบันทึกตัวอย่างเสียงสั้นๆ ส่วน Custom Voice Clone ได้รับการฝึกจากตัวอย่างเสียงที่คุณอัปโหลดเพียงครั้งเดียว ซึ่งจะถูกเก็บไว้ในไลบรารีเสียงของคุณ และสามารถนำกลับมาใช้ใหม่ในโครงการใดก็ได้โดยใช้ voice_id ในรายการเสียง Instant Voice Clone จะมีป้ายกำกับว่า "Voice Clone" และเพศ "auto"
การสร้างเสียงแบบคัสตอม (Custom Voice Clone) มีให้บริการบนแพลตฟอร์มเว็บ Rask เมื่อบันทึกเสียงแบบคัสตอมแล้ว ให้เรียกใช้ endpoint get project voices เพื่อรับค่า voice_id ของเสียงนั้น และกำหนดค่าดังกล่าวให้กับผู้พูดผ่าน API
อัปโหลดไฟล์เสียงหรือวิดีโอความยาว 1 ถึง 10 นาที ได้สูงสุด 10 ไฟล์ โดยแต่ละไฟล์มีขนาดไม่เกิน 10 MB ในรูปแบบ MP4, MOV, WEBM, MKV, MP3, M4A หรือ WAV หรือวางลิงก์ YouTube หรือ Google Drive ลงในช่องที่กำหนด เพื่อผลลัพธ์ที่ดีที่สุด ให้ใช้ผู้พูดเพียงคนเดียวที่มีสไตล์การพูดที่สม่ำเสมอ บันทึกในห้องที่เงียบสงบด้วยไมโครโฟนคุณภาพดี และไม่มีเสียงรบกวนจากพื้นหลัง
การโคลนเสียงรองรับ 57 ภาษาหลักและสำเนียงท้องถิ่น โดยสำเนียงท้องถิ่นจะใช้โมเดลการโคลนพื้นฐาน เช่น ข้อความภาษาอังกฤษแบบสหราชอาณาจักรจะใช้โมเดลเสียงภาษาอังกฤษแบบสหรัฐอเมริกา สำหรับภาษาเป้าหมายอื่นๆ ให้เลือกเสียง AI ที่มีให้เลือก ดูรายชื่อภาษาทั้งหมดได้ที่ API แคตตาล็อก
API นี้สามารถสร้างเสียงบรรยายได้ทั้งสำหรับวิดีโอและเสียงบันทึก รวมถึงพอดแคสต์และบทสัมภาษณ์ที่มีเพียงเสียงเท่านั้น หากต้องการใช้คำพูดของคุณเอง คุณสามารถแก้ไขข้อความที่แปลแล้วส่วนละส่วน หรือสร้างบทถอดเสียงจากไฟล์ .srt ของคุณเองก่อนที่จะสร้างโครงการ และเสียงที่สร้างขึ้นจะอ่านข้อความของคุณตามนั้น ข้อมูลเข้าจะเป็นไฟล์บันทึกเสียงเสมอ ดังนั้น สำหรับการบรรยายด้วยข้อความเท่านั้น API แปลงข้อความเป็นเสียง (Text-to-Speech) จะเหมาะสมกว่า
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.
แพ็กเกจ Creator Pro มีเสียงที่ปรับแต่งได้สูงสุด 3 เสียง แพ็กเกจ Business มีเสียงที่ใช้ร่วมกันในทีมสูงสุด 10 เสียง และแพ็กเกจ Enterprise มีคลังเสียงที่ปรับแต่งได้
ใช่ครับ การสร้างเสียงโคลนตามสั่งจะดำเนินการด้วยความยินยอมของผู้พูด และคุณควรใช้เสียงโคลนนี้เพื่อพากย์วิดีโอเฉพาะในกรณีที่ผู้พูดได้ให้ความยินยอมเท่านั้น Rask ใช้ระบบโคลนเสียงที่อิงตามความยินยอมและมาตรการควบคุมความปลอดภัยของ AI และเสียงของคุณจะไม่ถูกนำไปใช้เพื่อฝึกโมเดลทั่วไปเลย
ระบบโคลนเสียงจะถอดแบบเอกลักษณ์เสียงของผู้พูด ทั้งโทนเสียงและระดับเสียง เพื่อให้พวกเขายังคงเสียงเหมือนเดิมเมื่อพูดภาษาอื่น โทนอารมณ์ จังหวะ และความเร็วจะอิงตามเสียงต้นฉบับและบทที่แปล ดังนั้น เสียงต้นฉบับที่ชัดเจนและสื่ออารมณ์ได้ดีจึงให้ผลลัพธ์ที่ดีที่สุด
คุณสามารถเผยแพร่วิดีโอพากย์เสียงที่โคลนในเนื้อหาเชิงพาณิชย์ของคุณได้ เมื่อคุณมีสิทธิ์ในวิดีโอต้นฉบับและได้รับความยินยอมจากผู้พูดแล้ว โปรดตรวจสอบเงื่อนไขการให้บริการของ Rask สำหรับรายละเอียดเพิ่มเติมที่ตรงกับแพ็กเกจของคุณ
การโคลนเสียงเป็นส่วนหนึ่งของการพากย์เสียงและไม่มีค่าใช้จ่ายแยกต่างหาก โดยการใช้งาน API จะคิดค่าบริการตามนาทีของวิดีโอ ปัดเศษขึ้นเป็นนาทีเต็ม โดยหักจากโควตานาทีเดียวกันกับในแอป Rask นาทีที่เกินจากแพ็กเกจจะมีราคา 3 ดอลลาร์ต่อนาที การพากย์เสียงใหม่หลังจากเปลี่ยนเสียงจะคิดค่าบริการเฉพาะส่วนที่มีการเปลี่ยนแปลงเท่านั้น เริ่มต้นใช้งานฟรีโดยไม่ต้องใช้บัตรเครดิต