Author: Shaul Daon - https://github.com/daonsh
CallMic is a website in which you can upload a voice file and get conversational analytics regarding the usage of words, phrases, and sentiment (TBD) in the file.
The code splits the file to two speakers based on their voice. It provides analytics for both of the speakers. Utilizes tools from GCP - Google Cloud Platform.
-
Google Cloud Run (similar to serverless functions) - to run "server"(less) in scalable Kubernetes containers, pay-as-you-go model
-
Google Cloud Storage - Object storage to store the audio files and analysis results
-
Google Speech-to-Text API - used for converting the audio file to text, with extra data
This is a simple & standard architecture:
- Material-UI for the UI components (Google-like UI)
- Nivo Charts (supports server-side rendering) - for charting the results
- Simple REST API for uploading the file and receiving the results
- Steps in the rest API:
- Upload the audio file to object storage (on GCP)
- Call Google Speech-to-Text API with the right parameters, taking the file from the storage bucket.
- Analyze the results and return the analysis results in the response.
Using an example phone conversation, let's see the results.
Total word counts for a speaker (top 10 words):
Total duration of words for speaker (top 10 words):
- Add a summary of the call using the OpenAI ChatGPT API or even Google AI Summarization (also based on ChatGPT).
- Add more complex algorithm flow to analyze the call text - can think of many ideas.
- Have any ideas of your own? Feel free to submit a pull request.
https://callmic.com (currently offline, ping me to get it online)
NOTE: Make sure you have a newer version of NodeJS (16.13.0) or newer (in Cloud Shell you can run nvm install --lts
)
git clone https://github.com/CallMic/CallMic-Opensource
cd monolith-to-microservices
./setup.sh
cd monolith
npm start
You should see output similar to the following
Monolith listening on port 8080!
cd monolith
docker build -t monolith:1.0.0 .
To run the Docker image, execute the following commands
docker run --rm -p 8080:8080 monolith:1.0.0
The react-app folder contains a React application created from create-react-app
. You can modify this fronted, but afterwards, you will need to build and move the static files to the monolith and microservices project. You can do this by running the standard create-react-app build command below
npm run build
This will run the build script to create the static files two times. The first will build with relative URLs and copy the static files to the monolith/public folder. The second run will build with the standard microservices URLs and copy the static files to the microservices/src/frontend/public folder
npm start