إنتقل إلى المحتوى الرئيسي

API تحديد الجنس من الصوت

حدّد الجنس المحتمل للمتحدث من الصوت المرفوع أو من عنوان URL صوتي.

عنوان URL الأساسي​

https://api.genderrecognition.com

نقطة نهاية الملف​

POST /v1/voice-gender-recognition/api

ترويسات الطلب​

apiKey: YOUR_API_KEY
Content-Type: multipart/form-data

محتوى الطلب​

الحقلالنوعمطلوبالوصف
filefileنعمملف صوتي لتحليله.

مثال​

curl -X POST "https://api.genderrecognition.com/v1/voice-gender-recognition/api" \
-H "apiKey: YOUR_API_KEY" \
-F "file=@audio.wav"

نقطة نهاية URL​

POST /v1/voice-gender-recognition/api/url

ترويسات الطلب​

apiKey: YOUR_API_KEY
Content-Type: application/json

محتوى الطلب​

{
"url": "https://example.com/audio.wav"
}

الاستجابة​

تعيد طلبات الملفات التوقع والثقة كنسبة مئوية وبيانات الحصة المحدّثة.

{
"success": true,
"gender": "male",
"confidence": 97,
"remainingRequests": 2999
}

تعيد طلبات URL التوقع وبيانات الحصة. وقد تتضمن الاستجابة رسالة info عند بطء الطلب الأول.

{
"success": true,
"gender": "male",
"remainingRequests": 2999
}

حالات الخطأ​

مفتاح API مفقود​

{
"error": "API key is required"
}

مفتاح API غير صالح​

{
"error": "Invalid API key"
}

الملف مفقود​

{
"error": "No file uploaded"
}

نوع الملف غير صالح​

{
"error": "Invalid file type. Only audio formats are allowed"
}

طلب URL غير صالح​

{
"error": "A valid http or https URL is required"
}

ترويسة نوع محتوى JSON مفقودة​

{
"error": "Content-Type header is required. Please set Content-Type: application/json"
}

نوع محتوى JSON غير مدعوم​

{
"error": "Content-Type must be application/json"
}

تم تجاوز الحصة​

{
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"message": "You have exceeded your free tier limit of 50 requests.",
"detailedMessage": "Insufficient remaining requests. Required: 1, Available: 0",
"details": {
"limit": 50,
"used": 50,
"reset_date": "2026-07-01T00:00:00.000Z"
},
"suggested_action": "Please upgrade to a premium plan to continue using the API."
}
}

ملاحظات​

  • تستخدم طلبات الملفات بيانات نموذج multipart.
  • تستخدم طلبات URL تنسيق JSON.
  • استخدم الحقل file لرفع الصوت، ويجب ألا يتجاوز حجم الملف 10 MB.