BazaarLinkBazaarLink
เข้าสู่ระบบ
เอกสารAPI ข้อมูลอ้างอิงSDK ข้อมูลอ้างอิงการใช้งาน AgentAI ทักษะ
สังเคราะห์เสียงพูด

ถอดเสียง

ส่ง multipart/form-data model และ file หรือ JSON model และ input_audio:{data,format} (base64 ดิบ) รูปแบบ wav, mp3, mp4, m4a, ogg, flac, webm, aac เสียงสูงสุด 25 MiB; เนื้อหาคำขอ 50 MiB ค่า audio.transcription_max_seconds_by_model กำหนดขีดจำกัดตามโมเดล หากไม่มีจะใช้ audio.transcription_max_seconds แล้วจึงใช้ค่าเริ่มต้น 60 วินาที เสียงที่ยาวกว่าจะถูกปฏิเสธก่อนประมวลผลด้วย 413 audio_too_long และไม่คิดค่าบริการ response_format เฉพาะ json หรือ verbose_json; timestamp_granularities word/segment ต้องใช้ verbose_json ไม่รองรับ stream (400 unsupported_parameter); ใหญ่เกินไป 413 audio_too_large ละเว้น provider คิดค่าบริการตามราคาฐานข้อมูลต่อ usage.seconds หรือ token ขาเข้า/ขาออก ราคานาที = 60 × ราคาวินาที usage.cost เป็นค่าบริการลูกค้าใน USD

POST/v1/audio/transcriptions

การอนุญาต

Authorizationจำเป็น
string · header

API key เป็น bearer token ใน header Authorization

Body

modelจำเป็น
string

รหัสโมเดลถอดเสียง เช่น elevenlabs/scribe-v2

GET /v1/models?output_modalities=transcription
file
file

ไฟล์เสียง (multipart) รองรับ wav, mp3, mp4, m4a, ogg, flac, webm, aac สูงสุด 25 MiB ไคลเอนต์ JSON ใช้ input_audio: {data: base64, format} แทนได้

multipart/form-data: required; decoded <= 25 MiB
input_audio
object

เสียง JSON ใช้แทน file: data เป็นเสียง base64 ดิบ และ format เป็นรูปแบบ เช่น wav หรือ mp3 เนื้อหาคำขอสูงสุด 50 MiB เสียงที่ถอดรหัสสูงสุด 25 MiB

application/json: required; data: raw base64; format: wav | mp3 | mp4 | m4a | ogg | flac | webm | aac
response_format
string

json (ค่าเริ่มต้น) ส่งคืน {text}; verbose_json เพิ่มภาษา ระยะเวลา และ segments/words

default: json
jsonverbose_json
timestamp_granularities
string[]

word และ/หรือ segment ใช้เฉพาะเมื่อ response_format=verbose_json; รูปแบบอื่นจะละเว้น ขณะนี้ยังไม่ส่งคืนเวลาระดับคำ แต่ส่งคืน segments

response_format=verbose_json; multipart: timestamp_granularities[]
wordsegment
language
string

คำใบ้ภาษาแบบเลือกได้ เช่น en หรือ zh เว้นว่างเพื่อให้ตรวจจับอัตโนมัติ

ISO-639-1
prompt
string

ข้อความบริบทแบบเลือกได้เพื่อช่วยจำชื่อและศัพท์ ไม่ใช่ทุกโมเดลจะนำไปใช้

temperature
number

อุณหภูมิการสุ่มตัวอย่างแบบเลือกได้ ไม่ใช่ทุกโมเดลจะนำไปใช้

0 <= temperature <= 1
stream
boolean

ไม่รองรับสตรีมมิง stream=true จะส่งกลับ 400 unsupported_parameter

Unsupported: 400 unsupported_parameter
provider
object

ฟิลด์กำหนดเส้นทางแบบเลือกได้ ระบบจะละเว้น

Ignored

คู่มือเชิงลึก →

POST /v1/audio/transcriptions
curl https://api.bazaarlink.ai/v1/audio/transcriptions \
  -H "$BAZAARLINK_AUTH_HEADER" \
  -F model="<transcription-model-id>" \
  -F file=@audio.wav \
  -F response_format=json

curl https://api.bazaarlink.ai/v1/audio/transcriptions \
  -H "$BAZAARLINK_AUTH_HEADER" \
  -H "Content-Type: application/json" \
  -d '{"model":"<transcription-model-id>","input_audio":{"data":"<raw-base64-audio>","format":"wav"},"response_format":"verbose_json","timestamp_granularities":["word","segment"]}'
ตัวอย่างการตอบกลับ

ถอดเสียง: json / verbose_json — ค่าบริการตัวอย่างเป็นเพียงภาพประกอบ ไม่ใช่ราคาโมเดล audio.transcription_max_seconds_by_model กำหนดขีดจำกัดตามโมเดล หากไม่มีจะใช้ audio.transcription_max_seconds แล้วจึงใช้ค่าเริ่มต้น 60 วินาที เสียงที่ยาวกว่าจะถูกปฏิเสธก่อนประมวลผลด้วย 413 audio_too_long และไม่คิดค่าบริการ

{"text":"Hello","usage":{"seconds":1,"cost":0.00001}}
verbose_json
{"text":"Hello","duration":1,"segments":[{"id":0,"start":0,"end":1,"text":"Hello"}],"words":[{"word":"Hello","start":0,"end":1}],"usage":{"seconds":1,"cost":0.00001}}
Support
Support
Hi! How can we help you?
Send a message and we'll get back to you soon.
ถอดเสียง — BazaarLink API