apyhub-logo
Tutorials

Building an AI-Powered Meeting Transcript Summarizer using NodeJS and AI APIs

Learn to build an AI-driven meeting transcript summarizer with NodeJS and ApyHub API. Streamline your workflow and enhance developer productivity.
Building an AI-Powered Meeting Transcript Summarizer using NodeJS and AI APIs
SO
Sohail Pathan
Last updated on April 24, 2024
Virtual Meetings have become an essential part of corporate collaboration, serving as the de facto way that ideas are exchanged, decisions are made, and strategies are devised. However, the true value of meetings is often diluted by their length and the complexity of the discussions. This is why note-taking and effective summaries and action points are so important. Converting long, and often pointless discussions into short (actionable) summaries, meeting attendees can quickly catch up on meetings they missed, review decisions that were made, and understand discussions without having to sift through hours and hours of recordings.
We thought it would be cool to create our summarizer. If you don't have one already keep reading. This technical tutorial will guide you through creating a simple web application that summarizes daily meeting Transcripts using ApyHub’s AI Summarize Document API using NodeJS.
AI Summarize Benefits

Pre-requisites:

  1. Access to Google Meet and permission to access meeting transcripts.
  2. A preferred programming language environment (e.g., Python).
  3. ApyHub Account.
  4. GitHub CLI is installed on your computer.

Step 1: Clone the GitHub repository

Open your terminal, and run this command:
1
git clone https://github.com/iamspathan/AI-Transcript-Summarizer.git
This command will clone the project in your local environment. Once the project is cloned, you can open the repository in the code editor.

Step 2. Install Required Packages:

Here Node Package Manager (npm), we will install all the dependencies that our application needs to summarize the meeting transcribe.
1
npm install

Step 3: Add your API Key to the index.js file.

Here, we will add our Secret API key from ApyHub. To generate an API key, you can visit the documentation page of AI Summarize Document API. Your secret looks like this ➡️ apy-token: APY******************************************
Copy this token and paste it in as shown in below code comment below.
1
const express = require('express');
2
const fileUpload = require('express-fileupload');
3
const cors = require('cors');
4
const axios = require('axios');
5
const FormData = require('form-data');
6
const open = require('open');
7
const app = express();
8
const port = 3000;
9
10
app.use(cors());
11
app.use(fileUpload());
12
13
// Serve static files from the 'public' directory
14
app.use(express.static('public'));
15
16
app.post('/summarize', (req, res) => {
17
console.log("summarixe called", req.files.file);
18
if (!req.files || Object.keys(req.files).length === 0) {
19
return res.status(400).send('No files were uploaded.');
20
}
21
22
// Assuming the file is attached to the request under the key 'file'
23
const file = req.files.file;
24
25
// Prepare the file to be sent using form-data
26
const formData = new FormData();
27
formData.append('file', file.data, file.name);
28
29
// Set up the request headers, including the dynamic headers from form-data and the secret-apy token.
30
const requestHeaders = {
31
...formData.getHeaders(),
32
'apy-token': 'ADD YOUR OWN APY-TOKEN HERE'
33
};
34
35
// Call the AI Summarize API
36
axios.post('https://api.apyhub.com/ai/summarize-documents/file', formData, { headers: requestHeaders })
37
.then(apiResponse => {
38
// Assuming the API returns JSON with a summary field
39
console.log(apiResponse.data.data.summary);
40
res.send({ summary: apiResponse.data.data.summary });
41
})
42
.catch(error => {
43
console.error('Error calling the AI Summarize API:', error);
44
res.status(500).send('Failed to summarize the document.');
45
});
46
});
47
48
app.listen(port, () => {
49
console.log(`Server running at http://localhost:${port}`);
50
// Open the index.html file in the default browser
51
open(`http://localhost:${port}`);
52
});
Once you’ve added the API key. Save the changes using the Ctrl+S Key.

Step 4: Running Your Application

Once you’ve added the API key. Save the changes using Ctrl+S in your terminal, and run this command.:
1
node index.js
That’s it :) As you can see, Now you can generate a meeting transcript anytime you want :)
finaloutput
Happy with the API? We have more….
CTA2
Are you a NodeJS developer? Have a look at our blog series with tutorials.
CTA3