Challenge Overview
Challenge Overview
In previous challenges, we have implemented two Azure function apps, one for handling audio files upload event, one for handling Speech service webhook.
This challenge focus webhook function. The webhook function receives Speech service webhook and inserts data into database with some mock data. We are going to insert real data, from metadata file in this challenge.
- Read metadata file from Azure blob
- Add/update fields in models
- Replace placeholder fields to real data from metadata file
Project Background
This project objective is to analyze customer service center call recordings for sentiment analysis. The main tasks that will be covered in the project are as follows.
- The call recording file and metadata available will be used to transcribe the audio
- Perform sentiment analysis on the corpus to extract key topic / positive or negative interaction / isolate portions of conversation by factors.
- Finally visualize the output along with filtering and aggregation.
Technology Stack
- Java 8
- Spring Boot 2.1.x
- [Azure SDK for Java](https://docs.microsoft.com/en-us/java/api/overview/azure/cognitiveservices/client?view=azure-java-stable) (Speech and Text Analytics)
- Azure Blob Storage (Optional)
- MSSQL (Azure SQL Database)
Challenge Assets
- codebase links
- sample metadata files
Individual requirements
1. (major) Read metadata file from Azure blob
In webhook function, we will find name field in request, such as {uuid}.ogg.wav. The metadata filename would be {uuid}.json. We need to read this metadata file from another Azure blob (this blob should be configured).
Then we find conversationId field in metadata file, and read file conversationId.json from the same Azure blob where metadata file is. Let's call this file conversation file.
Besides, we should be able to test this locally, so you need to find way to emulate Azure blob. One approach I found is https://github.com/azure/azurite If you have another idea, please ask in the forum first.
Notice: there is no guarantee that we could find both agent and customer in the conversation file, so please raise certain Exception so that the error could be saved in ErrorReport table.
2. (major) Add/update fields in models
RecordDetail:
- conversationId - conversationId in conversation file
- queueId - queueId in conversation file (there are several in this file but the values are the same)
- wrapUpCode - wrapUpCode in conversation file
Customer:
- participantId
- sessionDnis
- ani
- dnis
all four fields are from the element in participants array where purpose field equals to customer in conversation file
Agent:
same to Customer change, replace phone to ani and dnis, add sessionDnis and participantId
3. (major) Replace placeholder fields to real data from metadata file
First, use purpose field in conversation to find Agent and Customer
agent: use participantId to identify Agent in db, create new if not exists
customer: use participantId to identify Customer in db, create new if not exists
phone: use customer ani for RecordDetail phone field
speaker: keep this placeholder for now
4. (major) keep backend api models up to date
Because there are model changes in webhook function, please keep the same models updated in backend api
Important Notes
- Basic code challenge with unit testing scorecard is used for this challenge, please make sure unit tests are added for new feature and the coverage needs to be more than 80%.