Audio files in call centers offer rich insights beyond text. With Snowflake Cortex Functions and native capabilities, you can quickly transcribe audio files, extract summaries of calls, sentiment, and patterns which can eventually help in enhancing customer experiences. By transcribing audio to text and developing custom analytics, call centers and supervisors gain actionable insights on agent responses and proactive issue resolution, ultimately driving better customer satisfaction.

In this quickstart, you focus on a scenario where you are a supervisor in a vehicle insurance call center company. As a supervisor, you need to identify metrics about agents and track key metrics like total number of call resolutions and overall call sentiment. With Snowflake Cortex functions, supervisors can get all these details through a Streamlit App with natural language querying capabilities.

This Quickstart will cover essential ground, and by the end you will have built an AI application for call center analytics.

Prerequisites

What You'll Learn

You will learn about the following Snowflake features during this Quickstart:

What You'll Need

You will need the following things before beginning:

What You'll Build

During this Quickstart you will accomplish the following:

Run Setup SQL

First, run the setup SQL script located here to create all necessary database objects, tables, and configurations for the call center analytics solution. This will create:

Upload Audio Files

After running the setup script (which automatically grants you the call_center_analytics_role):

  1. Download example MP3 files located here. Tip: Download the zip from the repository root to get the full folder.
  2. Upload the files to the call_center_analytics_db.analytics.audio_files stage for processing with AI_TRANSCRIBE. You can access the stage by going to Databases > call_center_analytics_db > analytics schema > audio_files stage >

Upload and Run Analytics Notebook

  1. Download the notebook here
  2. Navigate to SnowsightProjectsNotebooks
  3. Click "+ Notebook" and select "Upload from file"
  4. Upload the call_center_analytics.ipynb notebook
  5. Select the call center analytics database and analytics schema, and call center warehouse
  6. Run all cells in the notebook

transcribe-notebook

The notebook demonstrates the power of Snowflake's AI_TRANSCRIBE function and Cortex LLM capabilities:

AI_TRANSCRIBE Function

Snowflake's native speech-to-text capability for processing call center audio files.

Usage Example:

-- Single file transcription
SELECT AI_TRANSCRIBE(TO_FILE('@audio_stage/call_001.mp3'));

-- Batch transcription from stage
CREATE TABLE audio_files AS 
  (SELECT TO_FILE('@audio_stage', RELATIVE_PATH) AS audio_file 
   FROM DIRECTORY(@audio_stage));
SELECT AI_TRANSCRIBE(audio_file) FROM audio_files;

Key Specifications:

Cortex LLM Functions Processing

The notebook uses multiple Cortex functions to extract insights:

The notebook will:

Upload and Run Cortex Agents Setup

  1. Download the notebook here
  2. Upload the cortex_analyst_setup.ipynb notebook
  3. Run all cells to set up the semantic model and search services for Cortex Agents
  4. This configures:
    • Cortex Analyst semantic model for structured data queries (text-to-SQL)
    • Cortex Search service for unstructured call transcript search

What Gets Created:

Upload Streamlit Application

  1. Copy the contents of the python file here
  2. Navigate to SnowsightStreamlit
  3. Click "+ Streamlit App"
  4. Create the App in the call center database, analytics schema, and use the call center warehouse
  5. Paste the content into the code editor
  6. Add plotly from the packages dropdown at the top of the code editor

Configure Application with Cortex Agents Integration

  1. Once deployed, the Streamlit app will automatically connect to your call center analytics database
  2. The app leverages Cortex Agents for intelligent data exploration and has four main application screens

streamlit-app

Executive Dashboard

The Executive Dashboard provides high-level call center insights for supervisors and managers:

AI Assistant

The AI Assistant page features Cortex Agents orchestration for natural language data exploration:

Agent Orchestration Features:

Example Agent Interactions:

Deep Analytics

The Deep Analytics section provides detailed performance analysis and operational insights:

Audio Explorer

The Audio Explorer showcases AI_TRANSCRIBE capabilities for call analysis:

Tool Integration Across All Screens:

Congratulations! You have successfully built a call center analytics solution using Snowflake Cortex LLM functions and Streamlit.

What You Learned

Key Features Built

Related Resources