Chanl

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.

chanl calls import AI Analysis chanl calls get

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,followups
Call Imported
─────────────────────────────────
ID:      695d6957e21c0ceb325c394d
Status:  processing

Step 2: Check the results

chanl calls get 695d6957e21c0ceb325c394d
Call: 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_abc123
Evaluation 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:  processing

From a transcript file

chanl calls import --transcript-file ./call-transcript.txt

From 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.json

call-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

OptionShortDescription
--transcriptTranscript text string
--transcript-filePath to transcript file
--audio-urlURL to audio recording
--audio-idReference to uploaded audio
--file-fJSON file with all options
--customer-nameCustomer's name
--customer-phoneCustomer's phone number
--agent-nameAgent's name
--direction-dinbound, outbound, or web
--external-refExternal reference key=value (repeatable)
--analysis-fieldsComma-separated: sentiment, topics, quality, keywords, followups, predictions, metrics
--scorecard-sScorecard ID to auto-evaluate
--webhook-urlOverride 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:

FieldWhat You Get
sentimentOverall sentiment and trend (positive, neutral, negative + direction)
topicsMain discussion topics identified
keywordsKey terms and phrases extracted
qualityCall quality score (0-100%)
speakersSpeaker identification and labeling
followupsSuggested follow-up actions
predictionsOutcome predictions
metricsTalk time, response time, silence analysis

Full analysis:

chanl calls import \
  --transcript-file ./transcript.txt \
  --analysis-fields sentiment,topics,keywords,quality,followups,predictions,metrics

Lightweight analysis (faster):

chanl calls import \
  --transcript-file ./transcript.txt \
  --analysis-fields sentiment,topics

External 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_abc123

Then find them later:

chanl calls list --external-ref orderId=ORDER-55821
Calls
──────────────────────────────────────────────────────────────
ID                        Customer      Duration  Status  Sentiment
695d6957e21c0ceb325c394d  Maria Chen    3m 45s    ended   neutral
695d6957e21c0ceb325c394f  Maria Chen    2m 10s    ended   positive

Batch 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
done

Import and auto-evaluate:

chanl calls import \
  --transcript-file ./transcript.txt \
  --customer-name "Maria Chen" \
  --scorecard scorecard_abc123 \
  --analysis-fields sentiment,topics,quality

Export and Pipeline

Export all call IDs from today:

chanl calls list --start-date $(date +%Y-%m-%d) --json | \
  jq -r '.calls[].id' > today-calls.txt

Find 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

Troubleshooting

Calls Commands

Full reference for list, get, delete commands

Evaluate Quality

Score imported calls with scorecards

SDK: Analyze Calls

Build call analytics into your application

API: Import Call

REST API for call import

On this page