Set up Voice Monitoring

Voice Call Monitoring allows you to evaluate the reliability of your AI voice agent(s). With a few easy steps, you can set up monitoring on Hamming to track your agent’s performance. It also provides Hume scoring, offering key insights into caller sentiment.

Retell Tutorial

Ensure that you have installed and authorized ngrok before continuing. To learn more visit https://ngrok.com.

1

Start ngrok

ngrok http 3010
2

Set up Retell AI Webhook

After completing Step 1, a window will display a Forwarding Link. Copy the link and append /retell-webhook to the end. Your final link should look similar to this:

https://8c21-2600-1700-2800-2b10-5d7c-6b08-73ad-e541.ngrok-free.app/retell-webhook

Go to https://dashboard.retellai.com/agents and select your agent. Look for the Webhook Settings tab, and paste the link you created into the Agent Level Webhook URL field.

3

Create a Node.js server that handles the webhook request

This is the content of the index.ts file:

import dotenv from "dotenv";
import { envsafe, str } from "envsafe";
import express from "express";
import { CallProvider, Hamming } from "@hamming/hamming-sdk";

dotenv.config();

const app = express();
app.use(express.json());

export const env = envsafe({
  HAMMING_API_KEY: str(),
});

const hamming = new Hamming({
  apiKey: env.HAMMING_API_KEY,
});

hamming.monitoring.start();

app.post("/retell-webhook", (req, res) => {
  hamming.monitoring.callEvent(CallProvider.Retell, req.body);
  res.sendStatus(200);
});

app.listen(3010, () => {
  console.log("Server is running on port 3010");
});
4

Set up your .env file

Set up a Hamming API Key by going to hamming.ai/settings and selecting Create a new secret key at the top. Then, add the API key to your .env file as shown in the code snippet below.

HAMMING_API_KEY=your_hamming_api_key

Next run the following command.

npm run dev
5

Monitor Calls

Once both ngrok and your application are running, monitoring will log all inbound and outbound phone calls and generate Hume scores, providing valuable insights into the performance and sentiment of the calls.

VAPI Tutorial

Ensure that you have installed and authorized ngrok before continuing. To learn more visit https://ngrok.com.

1

Start ngrok

ngrok http 3010
2

Set up VAPI AI Webhook

After completing step 2, a window will display a Forwarding Link. Copy the link and append /vapi-webhook to the end. Your final link should look similar to this:

https://8c21-2600-1700-2800-2b10-5d7c-6b08-73ad-e541.ngrok-free.app/vapi-webhook

Go to https://dashboard.vapi.ai/assistants and select your agent. Look for the Advanced in the dropdown, and paste the link you created into the Server URL field.

3

Create a Node.js server that handles the webhook request

This is the content of the index.ts file:

import dotenv from "dotenv";
import { envsafe, str } from "envsafe";
import express from "express";
import { CallProvider, Hamming } from "@hamming/hamming-sdk";

dotenv.config();

const app = express();
app.use(express.json());

export const env = envsafe({
  HAMMING_API_KEY: str(),
});

const hamming = new Hamming({
  apiKey: env.HAMMING_API_KEY,
});

hamming.monitoring.start();

app.post("/vapi-webhook", (req, res) => {
  hamming.monitoring.callEvent(CallProvider.Vapi, req.body);
  res.sendStatus(200);
});

app.listen(3010, () => {
  console.log("Server is running on port 3010");
});
4

Set up your .env file

Set up a Hamming API Key by going to hamming.ai/settings and selecting Create a new secret key at the top. Then, add the API key to your .env file as shown in the code snippet below.

HAMMING_API_KEY=your_hamming_api_key

Next run the following command.

npm run dev
5

Monitor Calls

Once both ngrok and your application are running, monitoring will log all inbound and outbound phone calls and generate Hume scores, providing valuable insights into the performance and sentiment of the calls.