Speaker Intelligence

Constrained Intent

Pass intent_choices to restrict intent detection to a known set of labels.


Python SDK

python
config = TranscriptionConfig(
    model="zero-indic",
    enable_intent_detection=True,
    intent_choices=["complaint", "inquiry", "service_request", "compliment"],
)
result = await client.asr.transcribe("call.wav", config=config)

print(result.nlp_analysis.intent.label)      # service_request
print(result.nlp_analysis.intent.confidence) # 0.95

REST API

terminal
curl -X POST https://asr.shunyalabs.ai/v1/audio/transcriptions \
  -H "Authorization: Bearer <API_KEY>" \
  -F "[email protected]" \
  -F "model=zero-indic" \
  -F "enable_intent_detection=true" \
  -F 'intent_choices=["complaint", "inquiry", "service_request", "compliment"]'

Output

json
{
  "nlp_analysis": {
    "intent": {
      "label": "service_request",
      "confidence": 0.95,
      "reasoning": "Customer is requesting help with a vehicle breakdown"
    }
  }
}