Beginner's Guide to Building an AI Interview Coach with Azure Services

Anvay SinghAnvay Singh
6 min read

As we all know, 2025 is the year of AI, and everyone is eager to dive into this AI revolution. Over the weekend, I decided to explore Azure's AI services and create a mini project to better understand some of these technologies.

Azure AI Services

At the moment of writing this article, following AI services are present in Azure:

ServiceDescription
Azure AI Agent ServiceCombine the power of generative AI models with tools that allow agents to access and interact with real-world data sources.
Azure AI Model InferencePerforms model inference for flagship models in the Azure AI model catalog.
Azure AI SearchBring AI-powered cloud search to your mobile and web apps.
Azure OpenAIPerform a wide variety of natural language tasks.
Bot ServiceCreate bots and connect them across channels.
Content SafetyAn AI service that detects unwanted contents.
Custom VisionCustomize image recognition for your business.
Document IntelligenceTurn documents into intelligent data-driven solutions.
FaceDetect and identify people and emotions in images.
Immersive ReaderHelp users read and comprehend text.
LanguageBuild apps with industry-leading natural language understanding capabilities.
SpeechSpeech to text, text to speech, translation, and speaker recognition.
TranslatorUse AI-powered translation technology to translate more than 100 in-use, at-risk, and endangered languages and dialects.
Video IndexerExtract actionable insights from your videos.
VisionAnalyze content in images and videos.

For this project I had worked using Azure AI Foundry. It is a unified platform offering which helps in AI operations and application development. Using it, one can explore a wide variety of models, services and capabilities, and get to building AI applications that best serve your goals. I had also used Azure Cognitive Service (Speech) to set up the speech to text functionality. We’ll be covering the steps to set it up and implement in the application.

Project Overview

An AI interview coach where:

  • You can speak or type your interview answer

  • It analyzes tone, sentiment, and gives a follow-up question

  • It runs on GPT-4 via Azure OpenAI

  • Deployed and publicly accessible via Azure App Service

  • This would help the interviewee access their mock interview with the help of AI

Setting up Azure Environment

We’ll begin this project with the creation of a resource group in the Azure portal (portal.azure.com)
For a basic overview - A Resource Group is a container that holds related Azure resources like Web Apps, APIs, or AI services. Think of it as a folder for everything your app needs.

How to create it:

  1. Log in to the Azure portal

  2. Search for Resource Groups

  3. Click Create and fill in:

    • Subscription: Choose your Azure subscription

    • Resource Group name

    • Region: Preferably your closest Azure region

  4. Hit Review + Create ➝ Create

Set Up Azure Open AI

It’s a managed version of OpenAI’s models (like GPT-4) within Azure. You get the power of OpenAI with the security and compliance of Azure.

How to set it up:

  1. In the portal, search for Azure OpenAI.

  2. Click Create ➝ Fill in:

    • Resource Group: <the resource group you created above>

    • Name: AIInterviewCoachOpenAI (You can put any name you want)

    • Pricing Tier: Standard S0 (Free tier is very limited)

    • Continue to click on next and keep the default options selected

    • Once you create the service, click on ‘Go to Azure AI foundry portal‘

    • Select ‘‘Deployments' from the left pane, and then click on ‘Display model‘ and choose ‘Display base model‘. From there you can select your basic model (for my demo I had selected gpt-4)

    • Once the model is created, copy the endpoint and the key value which would be used later in the environment variable file

Set Up Speech-to-Text (Azure Cognitive Services)

We use the Speech-to-Text API so users can speak their answers instead of typing.

  • In Azure, search for Speech and create a Speech service.

    Region: Same as OpenAI

    Pricing tier: Standard S0 available
    Click on Review+Create

  • After creating, copy Keys and Endpoints under ‘Resource Management’ and save those values separately

Project Setup

After setting up all the services on the Azure portal, we can create our project which would have all the logic and the components that would create our portal. For this project, I had built the backend with FastAPI, which is an easy web framework to build APIs in Python. The frontend of the project was created with Streamlit. You can find the project here. You can clone this project, follow the README file and work on it or create a different project in your favourite framework and implement the Azure Services.

To understand the basic structure of the project :

  1. app.py : This is where the logic lives for transcription and GPT feedback.

  2. interview_ui.py : Defines the UI of the project

  3. env file : You have ll the environment variables and its values which will be used in the project

  4. requirements.txt : Contains all the dependencies which would be installed

prompt_templates/interview_followup.txt : This file lets us separate prompt logic from code, making it easier to update how GPT-4 is instructed.

Environment Variables in use

# Azure OpenAI settings
OPENAI_API_KEY= key value copied in Azure AI foundry
OPENAI_ENDPOINT= target URI value copied in Azure AI foundry
OPENAI_DEPLOYMENT= gpt-4 #or whatever model you are using

# Azure Speech-to-Text settings
SPEECH_KEY= paste one of the key values copied under Azure Cognitive Services
SPEECH_REGION= paste the region copied under Azure Cognitive Services

Deployment

For deployment of the application, I created two app services in the Free tier. One would run the api while the other would execute the frontend. I had connected both of these app services with the GitHub project and the Azure service automatically set up the deployment pipeline workflows in the Github Actions.

As per the additional step, I had set up startup command under the ‘Configuration‘ section of the app services. This would help the application launch when the url is hit.

The startup command for the frontend app service:
streamlit run interview_ui.py --server.port=8000 --server.enableCORS=false

The startup command for the backend app service:
uvicorn app:app --host 0.0.0.0 --port 8000

In conclusion, the AI Interview Coach project serves as an excellent introduction to the world of AI, leveraging Azure's powerful services to create a practical and accessible tool for interview preparation. By integrating Azure OpenAI and Speech-to-Text capabilities, this project not only demonstrates the potential of AI in real-world applications but also provides a valuable resource for individuals looking to improve their interview skills. As AI continues to evolve, projects like this highlight the importance of staying informed and engaged with emerging technologies.

Other Information:

💡
The application can be accessed here: https://aiinterviewcoach.azurewebsites.net

Any kind of feedback and suggestions are highly appreciated.

0
Subscribe to my newsletter

Read articles from Anvay Singh directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Anvay Singh
Anvay Singh

Software Developer playing with .Net, C#, Azure, Cloud....