Overview

Call Intelligence Platform

AI-powered sales call analysis for Lexington Capital Holdings. Upload a call recording, get a full transcript, AI analysis, and performance scorecard delivered to your inbox.

What It Does

Sales reps upload call recordings. The system automatically transcribes the conversation, analyzes sales technique, scores performance across key dimensions, and delivers everything as a formatted Google Doc via email.

Fully automated. Rep uploads, walks away, results arrive in minutes.

Who It's For

Lexington Capital Holdings — B2B alternative financing company. Their sales team makes outbound calls to business owners seeking working capital, merchant cash advances, and lines of credit.

Designed for sales managers who need visibility into rep performance.

Tech Stack

Next.js 16 Supabase n8n Cloud Rev.ai GPT-4o Vercel

End-to-End Pipeline

Upload AudioMP3 / WAV / M4A
Rev.aiTranscription
GPT-4oAnalysis
GPT-4oScorecard
Google Docs+ Email
💡
Live at: audio-analysis-webapp.vercel.app — Cost per call: approximately $0.28 (12-minute average)
User Flow

Upload & Pipeline

How a call recording moves from the rep's browser through the full analysis pipeline and back as a delivered report.

Upload Process

  1. Rep opens the web app Lands on a simple upload form with drag-and-drop support. No login required (authentication planned for future).
  2. Selects audio file + enters metadata Audio file (MP3, WAV, M4A), rep name, call type, and email address for delivery.
  3. File uploads to Supabase Storage Next.js API route handles the upload, stores the file in a Supabase storage bucket, and creates a record in the database.
  4. Webhook fires to n8n The API route triggers an n8n webhook with the file URL and metadata, kicking off the automation pipeline.

n8n Automation Pipeline

WebhookReceives trigger
Rev.aiSubmit job
Poll / WaitUntil complete
GPT-4o #1Analysis
GPT-4o #2Scorecard
Google DocsCreate report
EmailSend to rep
Callback #1Transcript + Analysis
Callback #2Scorecard
⚠️
Dual Callback Pattern: n8n sends results back to the app in 2 separate POST requests. The first contains the transcript + analysis. The second contains the scorecard. The frontend must handle both callbacks and merge them for display.

Why Two Callbacks?

The analysis and scorecard use separate GPT-4o calls with different prompts and output structures. Rather than waiting for both to complete sequentially, n8n fires each callback as soon as its respective AI step finishes. This means the user sees partial results faster.

Callback #1 Payload
  • Full transcript text
  • Speaker labels
  • AI analysis (strengths, weaknesses, recommendations)
  • Google Docs link
Callback #2 Payload
  • Overall score (0-100)
  • Category scores
  • Detailed rubric evaluation
  • Improvement priorities
AI Processing

Transcription (Rev.ai)

The first AI step converts raw audio into a timestamped, speaker-labeled transcript using Rev.ai's speech-to-text API.

How Rev.ai Works

  1. n8n submits the audio file URL to Rev.ai Asynchronous job submission via the Rev.ai REST API. Returns a job ID immediately.
  2. Rev.ai processes the audio Automatic speech recognition with diarization (speaker separation). Processing time scales with audio length.
  3. n8n polls for completion Checks job status periodically until it reports "transcribed". Then fetches the full transcript.
  4. Transcript passed to GPT-4o The raw transcript text with speaker labels becomes the input for the analysis step.

Rev.ai Capabilities

Feature Details
Speaker DiarizationAutomatically identifies and labels different speakers (e.g., Speaker 1, Speaker 2)
TimestampsWord-level and sentence-level timestamps for precise reference
AccuracyIndustry-standard ASR accuracy. May struggle with heavy accents or poor audio quality.
Supported FormatsMP3, WAV, M4A, FLAC, OGG, and more
Processing TimeRoughly 1/3 to 1/2 of audio duration (12-min call = 4-6 min processing)
Pricing$0.02/minute of audio — largest cost driver in the pipeline
💡
Migration recommended: Rev.ai accounts for 88% of per-call cost. AssemblyAI Universal-3 Pro ($0.0065/min, 3.3% WER) would cut transcription cost by ~67% and improve accuracy. At scale (60 reps, 6 hrs/day), this saves approximately $76,980/year.

Sample Output

Speaker 1 [00:00:05]: Hi, this is Mike from Lexington Capital. Am I speaking with the owner?
Speaker 2 [00:00:09]: Yeah, this is Tony. What's this about?
Speaker 1 [00:00:12]: Tony, great to connect. I'm reaching out because we help businesses like yours access working capital...
... continues for full call duration ...
AI Processing

Analysis (GPT-4o)

The first GPT-4o call takes the full transcript and produces a structured sales performance analysis with actionable coaching insights.

What GPT-4o Analyzes

Sales Technique Evaluation:

  • Opening / introduction effectiveness
  • Needs discovery and qualifying questions
  • Value proposition delivery
  • Objection handling approach
  • Closing technique and next steps

Communication Quality:

  • Tone and rapport building
  • Active listening indicators
  • Talk-to-listen ratio
  • Use of filler words
  • Professionalism and compliance

Analysis Output Structure

Analysis Sections
Call Summary2-3 sentence overview of what happened on the call, outcome, and key decision points
Strengths3-5 specific things the rep did well, with direct quotes from the transcript as evidence
Areas for Improvement3-5 specific weaknesses with concrete suggestions for how to handle differently next time
Key MomentsCritical moments in the call that had the most impact on the outcome (positive or negative)
Coaching RecommendationsPrioritized action items for the rep to work on, tied to specific training resources when applicable
Compliance NotesAny regulatory or compliance concerns flagged during the call (disclosure, pressure tactics, etc.)
Context-aware: The GPT-4o prompt is tuned for B2B alternative financing sales. It understands MCA terminology, funding qualification criteria, and industry-specific objections.

How the Prompt Works

The system prompt provides GPT-4o with:

  • Role context — "You are a senior sales coach at a B2B alternative financing company"
  • Industry knowledge — Common objections, qualification criteria, product types (MCA, LOC, term loans)
  • Output format — Structured JSON with specific sections, enabling consistent parsing
  • Evidence requirement — Every strength/weakness must cite a specific quote or moment from the transcript
AI Processing

Scorecard

The second GPT-4o call generates a quantitative performance scorecard. This is a separate, dedicated prompt focused purely on scoring against a defined rubric.

Scoring Categories

Category Breakdown
Opening & Intro Did the rep identify themselves, state the purpose, and build initial rapport? 0-100
Discovery Quality and depth of qualifying questions. Did they understand the prospect's needs? 0-100
Value Proposition How effectively did they present the solution and connect it to the prospect's pain points? 0-100
Objection Handling How well did they address concerns? Did they acknowledge, reframe, and resolve? 0-100
Closing Did they ask for the next step? Was there a clear call to action? 0-100
Communication Tone, pace, professionalism, active listening, talk-to-listen ratio 0-100
Overall Score Weighted average across all categories 0-100

Score Interpretation

90-100
Exceptional
75-89
Strong
60-74
Needs Work
Below 60
Critical
💡
Separate GPT-4o call: The scorecard uses a different, more structured prompt than the analysis. This ensures consistent numerical scoring without the qualitative analysis bleeding into the rubric evaluation. The scorecard is delivered via Callback #2.
Output

Results Viewer

After both callbacks are received, the web app displays the complete analysis and scorecard in an interactive results view.

Results Page Layout

Left Panel — Transcript

  • Full transcript with speaker labels
  • Color-coded speakers for easy reading
  • Timestamp markers for key moments
  • Scrollable with the analysis panel

Right Panel — Analysis

  • Scorecard with visual score indicators
  • Strengths and weaknesses sections
  • Coaching recommendations
  • Link to the Google Docs report

Delivery Channels

How Results Are Delivered
Web AppInteractive results page with transcript, analysis, and scorecard displayed in real-time as callbacks arrive
Google DocsFormatted report document created automatically in a shared Google Drive folder. Persistent and shareable.
EmailRep receives an email with a summary and link to the Google Docs report. Sent to the email provided at upload.
Supabase DBAll data persisted in the database for historical tracking, trend analysis, and manager dashboards.

Data Persistence

Every call analysis is stored in Supabase with:

  • Call metadata — rep name, call type, duration, upload timestamp
  • Full transcript — raw text with speaker labels
  • Analysis JSON — structured analysis from GPT-4o (Callback #1)
  • Scorecard JSON — category scores and overall rating (Callback #2)
  • Google Docs URL — link to the generated report document
  • Processing status — tracks pipeline progress (uploaded, transcribing, analyzing, complete)
Real-time updates: The results page polls for status updates. As each callback arrives, the UI updates immediately without page refresh. Users see "Transcribing..." then "Analyzing..." then the full results.
Technical

Architecture & Cost

System architecture, cost breakdown, security considerations, and scaling projections for the Call Intelligence Platform.

System Architecture

Next.js 16Frontend + API
SupabaseAuth + DB + Storage
n8n CloudOrchestration
AI APIsRev.ai + GPT-4o

Cost Breakdown Per Call (12-min average)

Service Costs
Rev.ai Transcription $0.02/min x 12 min = $0.24 88%
GPT-4o Analysis ~4K input tokens + ~1K output = ~$0.025 9%
GPT-4o Scorecard ~4K input tokens + ~500 output = ~$0.015 3%
Total Per Call ~$0.28

Scale Projections

Monthly Cost at Scale
5 reps, 10 calls/day~1,100 calls/month$308/mo
20 reps, 10 calls/day~4,400 calls/month$1,232/mo
60 reps, 6 hrs/day~26,400 calls/month$7,392/mo
⚠️
At full scale (60 reps): Rev.ai alone would cost ~$6,336/mo ($76K/year). Migrating to AssemblyAI Universal-3 Pro at $0.0065/min would reduce this to ~$2,059/mo. Same quality, 67% cheaper.

Security Gaps (Current State)

What's In Place

  • Supabase storage with signed URLs
  • Server-side API routes (no client-side API keys)
  • HTTPS everywhere (Vercel SSL)
  • Environment variables for all secrets

What's Missing

  • No user authentication
  • No n8n callback validation
  • No rate limiting on upload endpoint
  • No file size/type validation server-side
  • No audit logging

Key Infrastructure

Service Details
Supabase Projectoipmskrmitcntytkrivi (shared AutoAgency project)
n8n WorkflowID: Q0RdDGc5BeWSpplQ on smrich.app.n8n.cloud
Vercel Deploymentaudio-analysis-webapp.vercel.app
n8n Webhook"Audio Transcription + AI Analysis (Web)" workflow
🎉
Walkthrough complete! You now understand the full Lexington Capital Call Intelligence pipeline: upload, transcription, analysis, scoring, and delivery. For developer details, see Docs/PROJECT_HANDOFF.md.