API การพากย์เสียงด้วยปัญญาประดิษฐ์

แปลและพากย์เสียงวิดีโอของคุณด้วย API พากย์เสียงด้วย AI พากย์เสียงวิดีโอเป็นภาษาต่างๆ กว่า 33 ภาษาโดยอัตโนมัติพร้อมระบบโคลนเสียง
33+ ภาษา
การโคลนเสียง
REST API
AI Dubbing Voice Tracks
EN
พีที
ES
33+ ภาษา
99.9%
เวลาทำงาน
ได้รับความไว้วางใจจากผู้ใช้มากกว่า 500,000+ ราย

คุณสมบัติ API ที่ทรงพลัง

ทุกสิ่งที่คุณต้องการเพื่อผสานการพากย์เสียงด้วย AI ระดับมืออาชีพเข้ากับแอปพลิเคชันของคุณ
การเข้าถึงทั่วโลก

33+ ภาษา

รองรับภาษาที่ได้รับความนิยมมากที่สุดในโลก รวมถึงภาษาอังกฤษ, โปรตุเกส, สเปน, ฝรั่งเศส, เยอรมัน, จีน, ญี่ปุ่น, และอื่น ๆ
เสียงที่แท้จริง

การโคลนเสียง

รักษาเสียงต้นฉบับของผู้พูดด้วยเทคโนโลยีการโคลนเสียงด้วย AI ขั้นสูงเพื่อให้ได้ผลลัพธ์การพากย์เสียงที่สมจริง
รวดเร็วและเชื่อถือได้

การประมวลผลที่รวดเร็ว

ทำให้โปรเจ็กต์การพากย์เสียงของคุณเสร็จสมบูรณ์ภายในไม่กี่นาที ไม่ใช่หลายชั่วโมง. ได้ผลลัพธ์อย่างรวดเร็วด้วยระบบประมวลผล AI ที่ได้รับการปรับแต่งให้เหมาะสมของเรา.
99.9%
เวลาทำงาน
<300ms
เวลาตอบสนอง
24/7
การสนับสนุน

กระบวนการทำงานของ API การพากย์เสียงด้วย AI

ผสานการพากย์เสียงด้วย AI เข้ากับแอปพลิเคชันของคุณได้อย่างง่ายดายเพียงไม่กี่คำสั่ง API
01

รับ URL สำหรับอัปโหลดและอัปโหลดไฟล์

รับ URL ที่ลงนามล่วงหน้าผ่าน API จากนั้นอัปโหลดไฟล์วิดีโอของคุณโดยใช้คำขอ PUT รองรับไฟล์ MP4, MOV, AVI และรูปแบบอื่น ๆ
API Request
# 1. Get upload URL
curl -X GET "https://dubsmart.ai/api/v1/upload" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "region": "EU",
    "fileExtension": "mp4"
  }'

# 2. Upload file using returned URL
curl -X PUT "PRESIGNED_URL_FROM_STEP_1" \
  -H "Content-Type: video/mp4" \
  --data-binary @video.mp4
02

สร้างโปรเจ็กต์

สร้างโปรเจกต์พากย์เสียงพร้อมการตั้งค่าภาษาเป้าหมายและเสียง รองรับหลายภาษาในคำขอเดียว
API Request
curl -X POST "https://dubsmart.ai/api/v1/project" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "input": {"path": "uploaded_file_key"},
    "targetLanguages": ["es", "fr", "de"],
    "voice": "voiceCloning"
  }'
03

แก้ไขโครงการ

ปรับการตั้งค่าโครงการ, ชื่อเรื่อง, ผู้บรรยาย, และระดับเสียงพื้นหลังตามที่ต้องการ
API Request
curl --request PUT \
  --url https://dubsmart.ai/api/v1/project \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
  "title": "Updated Project Title",
  "speakers": [
    "Speaker 1",
    "Speaker 2"
  ],
  "backgroundVolume": 0.5,
  "id": "64f8a2b1c3d4e5f6a7b8c9d0"
}'
04

ดาวน์โหลดผลลัพธ์

ดาวน์โหลดไฟล์วิดีโอหรือไฟล์เสียงที่พากย์เสียงแล้วของคุณ รับเฉพาะส่วนที่ต้องการหรือเนื้อหาที่พากย์เสียงครบถ้วนทั้งหมด
API Request
curl -X GET "https://dubsmart.ai/api/v1/project/PROJECT_ID" \
  -H "Authorization: Bearer YOUR_API_KEY"

จุดสิ้นสุด API การพากย์เสียงด้วย AI

เอกสารอ้างอิง API แบบสมบูรณ์พร้อมตัวอย่างสำหรับทุกเอนด์พอยต์
GET
/upload

รับ URL ไฟล์ที่อัปโหลด

รับ URL ที่ลงนามล่วงหน้าสำหรับการอัปโหลดไฟล์และส่งคีย์ไฟล์กลับ
Request
JSON
{
  "region": "EU",
  "fileExtension": "mp4"
}
Response
JSON
{
  "url": "https://storage.dubsmart.ai/...",
  "key": "uploads/user_id/filename.mp4"
}
POST
/voices

รับเสียง

ดึงเสียง AI ที่มีอยู่พร้อมตัวเลือกการกรอง
Request
JSON
{
  "limit": 50,
  "filter": {
    "language": "en",
    "gender": "female",
    "accent": "american"
  }
}
Response
JSON
{
  "items": [
    {
      "id": "voice_id_1",
      "name": "Anna",
      "value": "anna_en_v2",
      "language": "en",
      "provider": "elevenlabs"
    }
  ],
  "nextCursor": "next_cursor_value"
}
POST
/custom-voices

รับเสียงพูดที่ปรับแต่งตามความต้องการ

ดึงเสียงที่ผู้ใช้สร้างขึ้นเอง
Request
JSON
{
  "limit": 10,
  "cursor": "cursor_value"
}
Response
JSON
{
  "items": [
    {
      "id": "custom_voice_id",
      "name": "My Custom Voice",
      "examplePath": "https://..."
    }
  ],
  "nextCursor": "next_cursor_value"
}
POST
/project

สร้างโปรเจ็กต์

สร้างโปรเจ็กต์การพากย์เสียงใหม่พร้อมไฟล์วิดีโอและภาษาเป้าหมาย
Request
JSON
{
  "input": {
    "path": "uploaded_file_key",
    "type": "LOCAL_FILE",
    "voice": "voiceCloning",
    "textCheck": false
  },
  "targetLanguages": ["es", "fr", "de"],
  "title": "My Dubbing Project",
  "speakersAmount": 2
}
Response
JSON
{
  "id": "64f8a2b1c3d4e5f6a7b8c9d0",
  "groupId": "64f8a2b1c3d4e5f6a7b8c9d1",
  "base": {
    "title": "My Dubbing Project",
    "state": "Pending",
    "progress": 0
  },
  "targetLanguage": "es",
  "groupProjects": [
    {"id": "64f8a2b1c3d4e5f6a7b8c9d0", "targetLanguage": "es"},
    {"id": "64f8a2b1c3d4e5f6a7b8c9d2", "targetLanguage": "fr"},
    {"id": "64f8a2b1c3d4e5f6a7b8c9d3", "targetLanguage": "de"}
  ]
}
GET
/project

รับโครงการ

ดึงรายการโครงการพากย์เสียงทั้งหมดพร้อมการจัดหน้า
Request
JSON
{
  "cursor": "64f8a2b1c3d4e5f6a7b8c9d0",
  "limit": 10
}
Response
JSON
{
  "items": [
    {
      "id": "64f8a2b1c3d4e5f6a7b8c9d0",
      "base": {
        "title": "My Dubbing Project",
        "state": "Done",
        "progress": 100
      },
      "targetLanguage": "es",
      "createdAt": "2024-01-15T10:30:00Z"
    }
  ],
  "nextCursor": "64f8a2b1c3d4e5f6a7b8c9d4"
}
PUT
/project

แก้ไขโครงการ

อัปเดตการตั้งค่าโครงการ, ชื่อ, ผู้บรรยาย, และระดับเสียงพื้นหลัง
Request
JSON
{
  "title": "Updated Project Title",
  "speakers": [
    "Speaker 1",
    "Speaker 2"
  ],
  "backgroundVolume": 0.5,
  "id": "64f8a2b1c3d4e5f6a7b8c9d0"
}
Response
JSON
true
DELETE
/project

ลบโปรเจ็กต์

ลบโปรเจกต์การพากย์เสียงถาวร
Request
JSON
{
  "id": "64f8a2b1c3d4e5f6a7b8c9d0"
}
Response
JSON
true
GET
/project/{id}

รับโปรเจกต์โดยใช้รหัส

รับข้อมูลโดยละเอียดเกี่ยวกับโครงการเฉพาะ รวมถึงส่วนต่างๆ
Request
JSON
GET /project/64f8a2b1c3d4e5f6a7b8c9d0
Response
JSON
{
  "id": "64f8a2b1c3d4e5f6a7b8c9d0",
  "base": {
    "title": "My Dubbing Project",
    "state": "Done",
    "progress": 100
  },
  "segments": [
    {
      "id": "64f8a2b1c3d4e5f6a7b8c9d5",
      "text": "Hello world",
      "translatedText": "Hola mundo",
      "start": 0.0,
      "end": 1.5,
      "speakerId": 0,
      "resultUrl": "https://..."
    }
  ],
  "videoResult": {
    "value": "https://...",
    "state": "Done"
  }
}
POST
/project/regenerate

สร้างโครงการใหม่

สร้างเสียงใหม่สำหรับทั้งโครงการหรือเฉพาะส่วนที่ต้องการ
Request
JSON
{
  "id": "64f8a2b1c3d4e5f6a7b8c9d0",
  "segmentsForRegenerating": ["segment_id_1", "segment_id_2"],
  "cloneVoice": true
}
Response
JSON
true
POST
/project/speaker

เพิ่มลำโพง

เพิ่มลำโพงใหม่ในโปรเจกต์
Request
JSON
{
  "projectId": "64f8a2b1c3d4e5f6a7b8c9d0",
  "voice": "voice_id"
}
Response
JSON
200 OK
DELETE
/project/speaker

ถอดลำโพง

นำลำโพงออกจากโปรเจกต์
Request
JSON
{
  "projectId": "64f8a2b1c3d4e5f6a7b8c9d0",
  "speakerId": 0
}
Response
JSON
200 OK
POST
/segment

สร้างเซ็กเมนต์

เพิ่มส่วนคำพูดใหม่ลงในโปรเจกต์ที่มีอยู่แล้ว
Request
JSON
{
  "projectId": "64f8a2b1c3d4e5f6a7b8c9d0",
  "text": "New segment text",
  "translatedText": "Texto del nuevo segmento",
  "start": 10.5,
  "end": 12.0,
  "speakerId": 0,
  "voice": "voiceCloning"
}
Response
JSON
{
  "id": "64f8a2b1c3d4e5f6a7b8c9d6",
  "projectId": "64f8a2b1c3d4e5f6a7b8c9d0",
  "text": "New segment text",
  "translatedText": "Texto del nuevo segmento",
  "start": 10.5,
  "end": 12.0,
  "speakerId": 0,
  "state": "Pending"
}
PUT
/segment

แก้ไขส่วน

อัปเดตข้อความส่วน, เวลา, หรือพารามิเตอร์เสียง
Request
JSON
{
  "id": "64f8a2b1c3d4e5f6a7b8c9d6",
  "projectId": "64f8a2b1c3d4e5f6a7b8c9d0",
  "text": "Updated segment text",
  "translatedText": "Texto actualizado del segmento",
  "start": 10.0,
  "end": 12.5,
  "speakerId": 0,
  "voice": "voiceCloning"
}
Response
JSON
{
  "id": "64f8a2b1c3d4e5f6a7b8c9d6",
  "text": "Updated segment text",
  "translatedText": "Texto actualizado del segmento",
  "start": 10.0,
  "end": 12.5,
  "speakerId": 0,
  "state": "Pending"
}
DELETE
/segment

ลบส่วน

ลบส่วนของคำพูดออกจากโปรเจกต์โดยใช้รหัส
Request
JSON
{
  "id": "64f8a2b1c3d4e5f6a7b8c9d6",
  "projectId": "64f8a2b1c3d4e5f6a7b8c9d0"
}
Response
JSON
true

ตัวอย่างโค้ด API สำหรับการพากย์เสียงด้วย AI

ตัวอย่างโค้ดพร้อมใช้งานในหลายภาษาการเขียนโปรแกรม
JavaScript Example
// JavaScript/Node.js Example
const axios = require('axios');
const fs = require('fs');

const API_KEY = 'your_api_key_here';
const BASE_URL = 'https://dubsmart.ai/api/v1';

async function createDubbingProject() {
  try {
    // 1. Get upload URL
    const uploadResponse = await axios.get(`${BASE_URL}/upload`, {
      params: {
        region: 'EU',
        fileExtension: 'mp4'
      },
      headers: { 'Authorization': `Bearer ${API_KEY}` }
    });

    // 2. Upload file using presigned URL
    const fileBuffer = fs.readFileSync('video.mp4');
    await axios.put(uploadResponse.data.url, fileBuffer, {
      headers: {
        'Content-Type': 'video/mp4'
      }
    });

    // 3. Create dubbing project
    const projectResponse = await axios.post(`${BASE_URL}/project`, {
      input: {
        path: uploadResponse.data.key,
        type: 'LOCAL_FILE',
        voice: 'voiceCloning',
        textCheck: false
      },
      targetLanguages: ['es', 'fr', 'de'],
      title: 'My Multilingual Video'
    }, {
      headers: { 'Authorization': `Bearer ${API_KEY}` }
    });

    console.log('Project created:', projectResponse.data);
    return projectResponse.data;
  } catch (error) {
    console.error('Error:', error.response?.data || error.message);
  }
}

// Monitor project status
async function checkProjectStatus(projectId) {
  const response = await axios.get(`${BASE_URL}/project/${projectId}`, {
    headers: { 'Authorization': `Bearer ${API_KEY}` }
  });
  
  return response.data;
}
Python Example
# Python Example
import requests
import time

API_KEY = 'your_api_key_here'
BASE_URL = 'https://dubsmart.ai/api/v1'

def create_dubbing_project():
    headers = {'Authorization': f'Bearer {API_KEY}'}
    
    try:
        # 1. Get upload URL
        upload_params = {
            'region': 'EU',
            'fileExtension': 'mp4'
        }
        upload_response = requests.get(
            f'{BASE_URL}/upload',
            params=upload_params,
            headers=headers
        )
        upload_response.raise_for_status()
        
        # 2. Upload file using presigned URL
        with open('video.mp4', 'rb') as file:
            upload_file_response = requests.put(
                upload_response.json()['url'],
                data=file,
                headers={'Content-Type': 'video/mp4'}
            )
            upload_file_response.raise_for_status()
        
        # 3. Create dubbing project
        project_data = {
            'input': {
                'path': upload_response.json()['key'],
                'type': 'LOCAL_FILE',
                'voice': 'voiceCloning',
                'textCheck': False
            },
            'targetLanguages': ['es', 'fr', 'de'],
            'title': 'My Multilingual Video'
        }
        
        project_response = requests.post(
            f'{BASE_URL}/project',
            json=project_data,
            headers=headers
        )
        project_response.raise_for_status()
        
        print('Project created:', project_response.json())
        return project_response.json()
        
    except requests.exceptions.RequestException as e:
        print(f'Error: {e}')
        return None

def monitor_project(project_id):
    headers = {'Authorization': f'Bearer {API_KEY}'}
    
    while True:
        response = requests.get(
            f'{BASE_URL}/project/{project_id}',
            headers=headers
        )
        response.raise_for_status()
        
        project = response.json()
        status = project['base']['state']
        
        print(f'Project status: {status}')
        
        if status == 'Done':
            print('Project completed!')
            return project
        elif status == 'Error':
            print('Project failed!')
            return None
            
        time.sleep(30)  # Check every 30 seconds
cURL Example
# cURL Examples

# 1. Get upload URL
curl -X GET "https://dubsmart.ai/api/v1/upload?region=EU&fileExtension=mp4" \
  -H "Authorization: Bearer YOUR_API_KEY"

# 2. Upload file using presigned URL
curl -X PUT "PRESIGNED_URL_FROM_STEP_1" \
  -H "Content-Type: video/mp4" \
  --data-binary @video.mp4

# 3. Create dubbing project
curl -X POST "https://dubsmart.ai/api/v1/project" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "input": {
      "path": "uploaded_file_key",
      "type": "LOCAL_FILE",
      "voice": "voiceCloning",
      "textCheck": false
    },
    "targetLanguages": ["es", "fr", "de"],
    "title": "My Multilingual Video"
  }'

# 4. Check project status
curl -X GET "https://dubsmart.ai/api/v1/project/PROJECT_ID" \
  -H "Authorization: Bearer YOUR_API_KEY"

# 5. Download results
curl -X GET "https://dubsmart.ai/api/v1/project/PROJECT_ID" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -o "dubbed_video.mp4"
PHP Example
<?php
// PHP Example
$apiKey = 'your_api_key_here';
$baseUrl = 'https://dubsmart.ai/api/v1';

function createDubbingProject() {
    global $apiKey, $baseUrl;
    
    $headers = [
        'Authorization: Bearer ' . $apiKey,
        'Content-Type: application/json'
    ];
    
    try {
        // 1. Get upload URL
        $uploadParams = [
            'region' => 'EU',
            'fileExtension' => 'mp4'
        ];
        
        $uploadResponse = httpRequest(
            $baseUrl . '/upload?' . http_build_query($uploadParams),
            'GET',
            null,
            $headers
        );
        
        // 2. Upload file using presigned URL
        $fileContent = file_get_contents('video.mp4');
        $uploadFileResponse = httpRequest(
            $uploadResponse['url'],
            'PUT',
            $fileContent,
            ['Content-Type: video/mp4']
        );
        
        // 3. Create dubbing project
        $projectData = [
            'input' => [
                'path' => $uploadResponse['key'],
                'type' => 'LOCAL_FILE',
                'voice' => 'voiceCloning',
                'textCheck' => false
            ],
            'targetLanguages' => ['es', 'fr', 'de'],
            'title' => 'My Multilingual Video'
        ];
        
        $projectResponse = httpRequest(
            $baseUrl . '/project',
            'POST',
            $projectData,
            $headers
        );
        
        echo "Project created: " . json_encode($projectResponse);
        return $projectResponse;
        
    } catch (Exception $e) {
        echo "Error: " . $e->getMessage();
        return null;
    }
}

function httpRequest($url, $method, $data, $headers) {
    $ch = curl_init();
    
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
    
    if ($method === 'POST') {
        curl_setopt($ch, CURLOPT_POST, true);
        curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
    } elseif ($method === 'PUT') {
        curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT');
        curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
    }
    
    $response = curl_exec($ch);
    $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
    
    curl_close($ch);
    
    if ($httpCode >= 200 && $httpCode < 300) {
        return json_decode($response, true);
    } else {
        throw new Exception("HTTP Error: " . $httpCode);
    }
}

// Usage
$project = createDubbingProject();
?>

คำถามที่พบบ่อย

API รองรับไฟล์รูปแบบใดบ้าง?
API รองรับรูปแบบวิดีโอหลักทั้งหมด รวมถึง MP4, MOV, AVI, MKV, WebM และอื่น ๆ สำหรับไฟล์เสียง เราสนับสนุน MP3, WAV, AAC และรูปแบบทั่วไปอื่น ๆ ขนาดไฟล์สูงสุดคือ 5GB
การพากย์เสียงใช้เวลานานแค่ไหน?
ระยะเวลาในการประมวลผลขึ้นอยู่กับระยะเวลาของวิดีโอและขนาดไฟล์ โดยปกติวิดีโอความยาว 5 นาทีจะใช้เวลาประมวลผลประมาณ 1 นาที ลูกค้าองค์กรจะได้รับการจัดลำดับความสำคัญในการประมวลผลและได้รับบริการที่รวดเร็วยิ่งขึ้น
รองรับภาษาอะไรบ้าง?
เราสนับสนุนภาษาเป้าหมายมากกว่า 33 ภาษา รวมถึงภาษาอังกฤษ, โปรตุเกส, สเปน, ฝรั่งเศส, เยอรมัน, จีน, ญี่ปุ่น, เกาหลี, รัสเซีย, อาหรับ, ฮินดี, และอื่น ๆ อีกมากมาย. เราสามารถตรวจจับและประมวลผลเนื้อหาจากภาษาต้นทางได้มากกว่า 99 ภาษา.
การโคลนเสียงทำงานอย่างไร?
ระบบ AI ขั้นสูงของเราวิเคราะห์ลักษณะเสียงของผู้พูดต้นฉบับ รวมถึงโทนเสียง, ความสูงต่ำของเสียง, สำเนียง, และสไตล์การพูด จากนั้นระบบจะสร้างเสียงสังเคราะห์ที่รักษาคุณสมบัติเฉพาะเหล่านี้ไว้ในขณะที่พูดในภาษาเป้าหมาย
ฉันสามารถแก้ไขเนื้อหาที่ถูกพากย์เสียงได้หรือไม่?
ใช่! API ให้ความสามารถในการแก้ไขอย่างเต็มที่ คุณสามารถแก้ไขข้อความที่แปลแล้ว ปรับเวลา เปลี่ยนเสียง และสร้างส่วนที่ต้องการใหม่ได้
ฉันสามารถใช้ API สำหรับโครงการเชิงพาณิชย์ได้หรือไม่
ใช่! แผนทั้งหมดอนุญาตให้ใช้ในเชิงพาณิชย์ได้ API ได้รับการออกแบบมาสำหรับสภาพแวดล้อมการผลิตและถูกใช้โดยผู้สร้างเนื้อหาหลัก ธุรกิจ และบริษัทสื่อทั่วโลก