รายการ Voice
GET
https://api.voice-agent.gowajee.ai/voice-demo/catalogดึง AI voice ทั้งหมดที่ใช้ได้ตอนนี้ ตอนเริ่ม campaign ให้ส่ง voiceKey ของ voice ที่เลือก
มาใน ttsVoiceKeys ดู คู่มือการตั้งเวลา → Voice
endpoint นี้เป็น public ไม่ต้องใช้ API key สังเกตว่า path ไม่ได้อยู่ใต้ /api
เรียกจาก server เท่านั้น อย่าเรียกจากหน้าเว็บ เพราะ CORS จะบล็อกเบราว์เซอร์ที่เปิดจากเว็บไซต์อื่น
Request
หัวข้อที่มีชื่อว่า “Request”curl "https://api.voice-agent.gowajee.ai/voice-demo/catalog"const { voices } = await fetch('https://api.voice-agent.gowajee.ai/voice-demo/catalog').then((r) => r.json());const femaleKeys = voices.filter((v) => v.gender === 'female' && v.isNative).map((v) => v.voiceKey);voices = requests.get("https://api.voice-agent.gowajee.ai/voice-demo/catalog", timeout=30).json()["voices"]female_keys = [v["voiceKey"] for v in voices if v["gender"] == "female" and v["isNative"]]Response
หัวข้อที่มีชื่อว่า “Response”response ของ endpoint นี้ไม่มี success/data ครอบ
{ "voices": [ { "voiceKey": "nicha", "displayName": "Nicha", "gender": "female", "isNative": true }, { "voiceKey": "beer", "displayName": "Beer", "gender": "male", "isNative": true }, { "voiceKey": "carmen", "displayName": "Carmen", "gender": "female", "isNative": false } ], "categories": [ { "categoryKey": "debt-collection", "label": "ทวงหนี้", "sentences": [{ "sentenceId": "debt-01", "textFemale": "…", "textMale": "…" }] } ]}| Field | Type | คำอธิบาย |
|---|---|---|
voices |
object[] | voice ทั้งหมดที่ใช้ได้ เรียงตามลำดับที่ Gowajee แสดง (ลำดับเดียวกับใน Voice Lab) |
voices[].voiceKey |
string | ค่าที่ต้องส่งใน ttsVoiceKeys |
voices[].displayName |
string | ชื่อของ voice |
voices[].gender |
"female" หรือ "male" |
ถ้าเลือก voice ผู้ชาย ข้อความที่ Gowajee ใส่มาให้ในระบบจะลงท้ายด้วย ครับ แทน ค่ะ แต่ระบบไม่แปลงประโยคใน script ของ agent ให้ ถ้าใช้ voice ผู้ชาย ให้เตรียม script ฉบับผู้ชายไว้ด้วย ดู Voice |
voices[].isNative |
boolean | เป็น false ถ้าเป็น voice ที่พูดไทยสำเนียงต่างชาติ |
categories |
object[] | ประโยคตัวอย่างที่แสดงใน Voice Lab ไม่ต้องสนใจก็ได้ |