# 1. send the video as a link - YouTube, Google Drive, Vimeo, S3 or direct URL
curl -X POST https://api.rask.ai/api/library/v1/media/link \
-H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
-d '{"link": "https://youtu.be/...", "name": "camera review"}'
# 2. create the project - the language of the video is detected automatically
curl -X POST https://api.rask.ai/v2/projects \
-H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
-d "{\"video_id\": \"$VIDEO_ID\", \"dst_lang\": \"es-mx\"}"# The transcript as plain text with timestamps and speakers
curl -s https://api.rask.ai/v2/projects/$ID/transcription -H "Authorization: Bearer $TOKEN" \
| jq -r '.segments[] | "\(.start) \(.speaker): \(.src.text)"'



อัปโหลดไฟล์วิดีโอในรูปแบบฟอร์มข้อมูล หรือวางลิงก์จาก YouTube, Google Drive, Vimeo, S3 หรือลิงก์ตรง คุณจะได้รับไอดีสื่อและข้อมูลวิดีโอก่อนที่จะเริ่มใช้งานจริง
ระบุไอดีสื่อเป็น video_id และเลือกภาษาที่ต้องการแปล โดยเว้นช่องภาษาต้นทางว่างไว้เพื่อให้ระบบตรวจจับภาษาให้อัตโนมัติ ระบบจะเริ่มถอดเสียงทันทีvideo_id
อ่านส่วนต่างๆ ของสคริปต์ได้ทันทีที่พร้อมใช้งาน เพื่อให้คุณเริ่มจัดทำดัชนีการบันทึกได้ในขณะที่ระบบกำลังประมวลผลสื่อที่แปลอยู่ และสามารถดาวน์โหลดไฟล์คำบรรยายและสื่อได้เมื่อโปรเจกต์เสร็จสมบูรณ์
# pip install git+ssh://[email protected]/braskai/rask-sdk.git@main
import asyncio
from rask_sdk import clients, enums, schemas
VIDEOS = ["https://youtu.be/aaa", "https://youtu.be/bbb", "https://vimeo.com/123"]
async def transcribe(client, i, link):
media = await client.create_media_link(data=schemas.MediaCreateLink(link=link))
while media.status is enums.MediaStatus.PROCESSING:
await asyncio.sleep(5)
media = await client.get_media(media_id=media.id)
job = await client.create_project(data=schemas.ProjectCreate(video_id=media.id, dst_lang="en-us"))
while job.status is not enums.ProjectStatus.MERGING_DONE:
await asyncio.sleep(10)
job = await client.get_project(project_id=job.id)
t = await client.get_project_transcription(project_id=job.id)
with open(f"video_{i}.txt", "w") as f: # plain text, one segment per line
f.write("\n".join(f"{s.speaker}: {s.src.text}" for s in t.segments))
async def main():
client = clients.RaskSDKClient(client_id=CLIENT_ID, client_secret=CLIENT_SECRET)
await asyncio.gather(*(transcribe(client, i, v) for i, v in enumerate(VIDEOS))) # no rate limits
asyncio.run(main())import os, time, requests
AUTH = "https://rask-prod.auth.us-east-2.amazoncognito.com/oauth2/token"
API = "https://api.rask.ai"
token = requests.post(AUTH, auth=(CLIENT_ID, CLIENT_SECRET),
data={"grant_type": "client_credentials"}).json()["access_token"]
h = {"Authorization": f"Bearer {token}"}
media = requests.post(f"{API}/api/library/v1/media/link", headers=h,
json={"link": "https://youtu.be/..."}).json()
project = requests.post(f"{API}/v2/projects", headers=h,
json={"video_id": media["id"], "dst_lang": "es-mx"}).json()
while project["status"] != "merging_done":
time.sleep(10)
project = requests.get(f"{API}/v2/projects/{project['id']}", headers=h).json()
print(project["translated_video"])// no dependencies, Node 18+ global fetch
const API = 'https://api.rask.ai';
const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
const auth = await fetch('https://rask-prod.auth.us-east-2.amazoncognito.com/oauth2/token', {
method: 'POST',
headers: { Authorization: 'Basic ' + btoa(`${CLIENT_ID}:${CLIENT_SECRET}`) },
body: new URLSearchParams({ grant_type: 'client_credentials' }),
}).then((r) => r.json());
const h = { Authorization: `Bearer ${auth.access_token}`, 'Content-Type': 'application/json' };
const call = (method, path, body) => fetch(API + path, { method, headers: h, body: body && JSON.stringify(body) }).then((r) => r.json());
let media = await call('POST', '/api/library/v1/media/link', { link: 'https://drive.google.com/file/d/...' });
while (media.status === 'processing') { await sleep(5000); media = await call('GET', `/api/library/v1/media/${media.id}`); }
let p = await call('POST', '/v2/projects', { video_id: media.id, dst_lang: 'fr-fr' });
while (p.status !== 'merging_done') { await sleep(10000); p = await call('GET', `/v2/projects/${p.id}`); }
const { segments } = await call('GET', `/v2/projects/${p.id}/transcription`);
const index = segments.map((s) => ({ t: s.start, speaker: s.speaker, text: s.src.text, fr: s.dst.text }));
console.log(JSON.stringify(index, null, 2)); // ready for your search index# 1. token (valid 1 hour - cache and reuse it)
TOKEN=$(curl -s -X POST https://rask-prod.auth.us-east-2.amazoncognito.com/oauth2/token \
-u "$CLIENT_ID:$CLIENT_SECRET" -d "grant_type=client_credentials" | jq -r .access_token)
# 2. upload a local video file
VIDEO_ID=$(curl -s -X POST "https://api.rask.ai/api/library/v1/media?kind=video" \
-H "Authorization: Bearer $TOKEN" -F "[email protected]" | jq -r .id)
# 3. create the project once the media status is ready
ID=$(curl -s -X POST https://api.rask.ai/v2/projects \
-H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
-d "{\"video_id\": \"$VIDEO_ID\", \"dst_lang\": \"de-de\", \"num_speakers\": 3}" | jq -r .id)
# 4. when status is merging_done, save the transcript as plain text
curl -s https://api.rask.ai/v2/projects/$ID/transcription -H "Authorization: Bearer $TOKEN" \
| jq -r '.segments[].src.text' > webinar.txt<?php
use GuzzleHttp\Client;
$http = new Client(['base_uri' => 'https://api.rask.ai']);
$json = fn($r) => json_decode($r->getBody(), true);
$auth = $json((new Client)->post('https://rask-prod.auth.us-east-2.amazoncognito.com/oauth2/token',
['auth' => [$clientId, $clientSecret], 'form_params' => ['grant_type' => 'client_credentials']]));
$h = ['Authorization' => 'Bearer ' . $auth['access_token']];
$media = $json($http->post('/api/library/v1/media/link', ['headers' => $h, 'json' => [
'link' => 'https://vimeo.com/123456']]));
while ($media['status'] === 'processing') {
sleep(5);
$media = $json($http->get("/api/library/v1/media/{$media['id']}", ['headers' => $h]));
}
$p = $json($http->post('/v2/projects', ['headers' => $h, 'json' => [
'video_id' => $media['id'], 'dst_lang' => 'pt-br']]));
while ($p['status'] !== 'merging_done') {
sleep(10);
$p = $json($http->get("/v2/projects/{$p['id']}", ['headers' => $h]));
}
$t = $json($http->get("/v2/projects/{$p['id']}/transcription", ['headers' => $h]));
file_put_contents('video.txt', implode("\n", array_map(fn($s) => $s['src']['text'], $t['segments'])));no_audio, no_words and forbidden_link are specific enough to show directly to your own user, for example a video without speech.00:00:00,320 SPEAKER_00 Welcome back. Today we test three cameras in low light.
00:00:06,180 SPEAKER_01 I brought the footage from last week's night shoot.
00:00:10,940 SPEAKER_00 Let's start with the smallest sensor, the hardest case.
00:00:15,500 SPEAKER_01 At ISO 6400 the noise is visible, but the colors hold up./transcriptiontranslation_srt_pathtranslation_vtt_pathtranslated_videotranslated_audiooriginal_video

es-mx และ es-es เช่นเดียวกัน บันทึกของโปรเจกต์ glossary_versionเพื่อให้การแก้ไขภายหลังไม่ไปกระทบงานที่เสร็จสมบูรณ์แล้วโดยไม่รู้ตัวมีครับ เพียงส่งไฟล์วิดีโอหรือลิงก์ สร้างโปรเจกต์ และอ่านข้อความถอดเสียงพร้อมป้ายกำกับผู้พูดและประทับเวลาได้จาก GET /v2/projects/{id}/transcription การถอดข้อความคือขั้นตอนแรกของทุกโปรเจกต์ใน Rask ซึ่งจะตามด้วยการแปลภาษา คำบรรยาย และเวอร์ชันพากย์เสียง
ได้ครับ คุณสามารถส่งลิงก์ YouTube, Google Drive, Vimeo, S3 หรือลิงก์ดาวน์โหลดโดยตรงไปยังจุดปลายทางของสื่อ แล้ว API จะดึงวิดีโอนั้นมาให้ทันที นอกจากนี้ คุณยังอัปโหลดไฟล์วิดีโอได้โดยตรงอีกด้วย
ได้ครับ สร้าง 1 โปรเจกต์ต่อวิดีโอหนึ่งรายการแล้วรันแบบขนานกันได้เลย API ไม่มีขีดจำกัดเรื่องอัตราการเรียกใช้งาน ไม่มีโควต้าการประมวลผลพร้อมกัน และไม่มีการจำกัดต่อคีย์ ดังนั้นคุณจึงสามารถถอดข้อความคลังวิดีโอทั้งหมดได้ด้วยการวนลูปเพียงครั้งเดียวในโค้ดของคุณ
ระบบจะตรวจจับผู้พูดแต่ละคนโดยอัตโนมัติ และแต่ละช่วงจะมีป้ายกำกับผู้พูด เช่น SPEAKER_00 หากคุณทราบจำนวนผู้พูด สามารถระบุ num_speakers ตอนสร้างโปรเจกต์ได้เลย
API รองรับการถอดข้อความต้นฉบับ 75 ภาษา รวมถึงภาษาอังกฤษ พร้อมระบบตรวจจับภาษาอัตโนมัติ: คุณสามารถปล่อยช่อง src_lang ว่างไว้ หรือใส่รหัส 2 ตัวอักษร เช่น en โดยข้อความถอดเสียงสามารถแปลเป็นภาษาและภูมิภาคต่างๆ ได้มากกว่า 135 แบบ เช่น en-us หรือ es-mx
ความแม่นยำขึ้นอยู่กับวิดีโอ: เสียงรบกวนในพื้นหลัง สภาพแวดล้อมที่มีเสียงดัง เสียงพูดทับซ้อนกัน สำเนียง และคำศัพท์เฉพาะทางล้วนมีผลทั้งสิ้น ลองทดสอบ API กับวิดีโอของคุณเอง และแก้ไขส่วนต่างๆ ผ่าน API ก่อนเผยแพร่
บทถอดเสียงจะมาในรูปแบบส่วนข้อมูล JSON พร้อมระบุผู้พูดและประทับเวลา คุณสามารถรวมข้อความเข้าด้วยกันเพื่อให้เป็นข้อความธรรมดา หรือเก็บบทประทับเวลาไว้เพื่อให้ค้นหาบทถอดเสียงได้ นอกจากนี้ยังมีคำบรรยายในรูปแบบ SRT และ VTT เป็นภาษาปลายทางให้อีกด้วย
ไม่ได้ครับ API จะส่งคืนบทถอดเสียง คำแปล คำบรรยาย และเวอร์ชันพากย์เสียง หากต้องการสร้างสรุปที่ขับเคลื่อนด้วย AI หรือบันทึกการประชุม ให้ส่งบทถอดเสียงไปยังเครื่องมือสรุปข้อมูลที่คุณเลือก
ได้ จากไฟล์บันทึกการประชุม โดยให้อัปโหลดการประชุมที่บันทึกไว้เป็นไฟล์วิดีโอหรือเสียง API ไม่ได้เชื่อมต่อกับแพลตฟอร์มการประชุมโดยตรง และไม่มีคำบรรยายแบบเรียลไทม์หรือการถอดข้อความการโทรสดแบบมีความหน่วงต่ำ
เอกสาร API ไม่ได้ระบุขีดจำกัดขนาดไฟล์ตายตัว แต่ละโปรเจกต์จะแสดงค่า original_duration และ duration หลังจากนำขีดจำกัดของแพ็กเกจของคุณมาปรับใช้แล้ว หากเป็นวิดีโอยาวมากหรือมีปริมาณมาก โปรดติดต่อทีมงานของเรา
โปรเจกต์จะถูกคิดเงินเป็นรายนาทีของวิดีโอ โดยปัดเศษขึ้นเป็นนาทีเต็มถัดไป จากโควต้านาทีเดียวกันกับแอป Rask ราคานี้รวมบริการถอดเสียง แปลภาษา คำบรรยาย และเวอร์ชันพากย์เสียงแล้ว นาทีส่วนเกินจะมีราคา $3/นาที สำหรับแพ็กเกจมาตรฐานที่มีสิทธิ์ ส่วนราคาระดับองค์กรจะปรับเปลี่ยนตามข้อตกลงของคุณ
เริ่มต้นทดลองใช้งานฟรีบนแอป Rask โดยไม่ต้องใช้บัตรเครดิต เพื่อลองแปลเสียงวิดีโอของคุณเอง คุณสามารถใช้งาน API ได้ในแพ็กเกจ Creator Pro, Business และ Enterprise ซึ่งฟีเจอร์ต่างๆ จะแตกต่างกันไปตามแพ็กเกจที่คุณเลือก
คุณสามารถใช้งาน API ได้ในแพ็กเกจ Creator Pro, Business และ Enterprise ซึ่งฟีเจอร์ต่างๆ จะแตกต่างกันไปตามแพ็กเกจที่คุณเลือก เพียงสร้าง Client ID และ Secret ของคุณในแอปก็เริ่มใช้งานได้ทันที สำหรับแพ็กเกจ Enterprise ราคาตามปริมาณการใช้งาน และการรองรับภาษาเฉพาะ โปรดติดต่อทีมงานของเรา