Felo API PlatformFelo API Platform
v0.4.0
OpenAPI 3.1.0

แปลงข้อความเป็นเสียง

เซิร์ฟเวอร์:https://openapi.felo.ai
ไลบรารีไคลเอนต์

Audio

​
Audio การดำเนินการ

แปลงข้อความเป็นเสียง

​

Use model to select the speech generation model. Channel selection is unavailable for speech generation requests.

บอดี้
จำเป็น
application/json
  • input
    ประเภท: string
    ความยาวต่ำสุด:  
    1
    ความยาวสูงสุด:  
    4096
    จำเป็น
  • model
    ประเภท: string
    ความยาวสูงสุด:  
    256
    จำเป็น
  • response_format
    ประเภท: string enum
    ค่า
    • pcm
    • mp3
  • speed
    ประเภท: number

    Currently only 1 is supported.

  • voice
    ประเภท: string
    ความยาวต่ำสุด:  
    1
    ความยาวสูงสุด:  
    256

    Optional non-blank voice ID. The upstream model determines whether a voice is required and which IDs it accepts. Catalog voices are examples.

การตอบกลับ
  • 200
    ประเภท: string รูปแบบ: binary

    เมื่อสำเร็จจะได้ไบต์เสียง: MP3 เป็น audio/mpeg หรือ PCM ดิบเป็น audio/pcm ไม่ใช่ WAV, JSON หรือ SSE ตรวจสอบ HTTP และการรับข้อมูลครบก่อนเล่น --fail ป้องกันเนื้อหาข้อผิดพลาด HTTP ถูกเขียนเป็นเสียง ทิ้งไฟล์ที่ไม่ครบหลังการตัดการเชื่อมต่อ ตรวจสอบพารามิเตอร์ PCM จากช่องทาง อย่าคาดเดา

    STT ใช้ input_audio_second หรือ token; TTS ใช้ input_character โดย speech_billing_unit แบบ utf16_code_unit กับ unicode_code_point นับ emoji ต่างกัน ยอดสำรองไม่ใช่เพดานค่าใช้จ่ายและอาจสรุปยอดแบบอะซิงโครนัส การขาดหลักฐานไม่แปลว่าฟรี ทั้งสอง API รับ X-Felo-Channel และส่งไปช่องทางที่เลือกเพียงครั้งเดียว ปิดการลองซ้ำอัตโนมัติรวมถึง SDK หลัง timeout หรือหลุด เก็บ X-Request-Id และ X-Generation-Id หากมี Console Playground ยังไม่รองรับเสียง configured_rates ใช้อัตราที่ตรึงไว้และปริมาณที่ยืนยันแล้ว ส่วน upstream_cost ใช้ต้นทุนผู้ให้บริการที่ยืนยันแล้วพร้อมส่วนเพิ่มและส่วนลดที่เผยแพร่

Request Example for post/api/v1/audio/speech
curl https://openapi.felo.ai/api/v1/audio/speech \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "model": "",
  "input": "",
  "voice": "",
  "response_format": "pcm",
  "speed": 1
}'
@filename
Generate speech

ต้องการความช่วยเหลือไหม