Analyze Calls
Import call recordings and extract AI-powered insights from the CLI
Import transcripts or audio, then get sentiment, topics, quality scores, and custom data extraction -- all from your terminal.
The Workflow
You have a call recording or transcript. You want to know what happened, how the agent performed, and what needs follow-up. Here is how to do it from the CLI.
Step 1: Import the call
chanl calls import \
--transcript-file ./support-call.txt \
--customer-name "Maria Chen" \
--direction inbound \
--external-ref orderId=ORDER-55821 \
--analysis-fields sentiment,topics,quality,followupsCall Imported
─────────────────────────────────
ID: 695d6957e21c0ceb325c394d
Status: processingStep 2: Check the results
chanl calls get 695d6957e21c0ceb325c394dCall: 695d6957e21c0ceb325c394d
────────────────────────────────────
Customer: Maria Chen
Agent: (auto-detected)
Duration: 3m 45s
Status: ended
Direction: inbound
Sentiment: negative → neutral (improving)
Topics: damaged item, refund request, shipping
Quality: 78%
Follow-ups:
- Process refund for ORDER-55821
- Send replacement tracking email
External References:
orderId: ORDER-55821
Transcript Preview:
Agent: Thank you for calling Acme Support...
Customer: I received a damaged laptop...
[Use --full-transcript to see complete transcript]Step 3: Score it
chanl scorecards evaluate 695d6957e21c0ceb325c394d \
--scorecard scorecard_abc123Evaluation Complete
───────────────────────────────
Call: 695d6957e21c0ceb325c394d
Scorecard: Customer Service Quality
Score: 78%
Status: PASSED ✓Import Sources
From a transcript string
chanl calls import \
--transcript "Agent: Hello, how can I help?\nCustomer: I have a billing question."Call Imported
─────────────────────────────────
ID: 695d6957e21c0ceb325c394e
Status: processingFrom a transcript file
chanl calls import --transcript-file ./call-transcript.txtFrom an audio URL
chanl calls import --audio-url "https://storage.example.com/call-123.mp3"From a JSON file
chanl calls import --file call-data.jsoncall-data.json:
{
"transcript": "Agent: Hello...\nCustomer: Hi...",
"customerName": "Maria Chen",
"agentName": "Sarah",
"direction": "inbound",
"externalReferenceIds": {
"orderId": "ORDER-55821"
},
"analysisFields": ["sentiment", "topics", "quality", "followups"]
}Import Options
| Option | Short | Description |
|---|---|---|
--transcript | Transcript text string | |
--transcript-file | Path to transcript file | |
--audio-url | URL to audio recording | |
--audio-id | Reference to uploaded audio | |
--file | -f | JSON file with all options |
--customer-name | Customer's name | |
--customer-phone | Customer's phone number | |
--agent-name | Agent's name | |
--direction | -d | inbound, outbound, or web |
--external-ref | External reference key=value (repeatable) | |
--analysis-fields | Comma-separated: sentiment, topics, quality, keywords, followups, predictions, metrics | |
--scorecard | -s | Scorecard ID to auto-evaluate |
--webhook-url | Override webhook URL for completion |
Provide exactly one input source per import: --transcript, --transcript-file, --audio-url, or --file.
Analysis Fields
Control what AI analysis runs on each import:
| Field | What You Get |
|---|---|
sentiment | Overall sentiment and trend (positive, neutral, negative + direction) |
topics | Main discussion topics identified |
keywords | Key terms and phrases extracted |
quality | Call quality score (0-100%) |
speakers | Speaker identification and labeling |
followups | Suggested follow-up actions |
predictions | Outcome predictions |
metrics | Talk time, response time, silence analysis |
Full analysis:
chanl calls import \
--transcript-file ./transcript.txt \
--analysis-fields sentiment,topics,keywords,quality,followups,predictions,metricsLightweight analysis (faster):
chanl calls import \
--transcript-file ./transcript.txt \
--analysis-fields sentiment,topicsExternal References
Tag calls with your own IDs for lookup:
chanl calls import \
--transcript-file ./transcript.txt \
--external-ref orderId=ORDER-55821 \
--external-ref ticketId=TICKET-1234 \
--external-ref customerId=cust_abc123Then find them later:
chanl calls list --external-ref orderId=ORDER-55821Calls
──────────────────────────────────────────────────────────────
ID Customer Duration Status Sentiment
695d6957e21c0ceb325c394d Maria Chen 3m 45s ended neutral
695d6957e21c0ceb325c394f Maria Chen 2m 10s ended positiveBatch Import
Import all transcripts in a directory:
for file in ./transcripts/*.txt; do
chanl calls import \
--transcript-file "$file" \
--analysis-fields sentiment,topics,quality
sleep 1
doneImport and auto-evaluate:
chanl calls import \
--transcript-file ./transcript.txt \
--customer-name "Maria Chen" \
--scorecard scorecard_abc123 \
--analysis-fields sentiment,topics,qualityExport and Pipeline
Export all call IDs from today:
chanl calls list --start-date $(date +%Y-%m-%d) --json | \
jq -r '.calls[].id' > today-calls.txtFind calls by order and export transcripts:
chanl calls list --external-ref orderId=ORDER-55821 --json | \
jq -r '.calls[].id' | \
while read id; do
chanl calls get "$id" --full-transcript --json | \
jq -r '.transcript' > "${id}.txt"
done