Home › Blog › How to build one

How to Build an AI Interview Assistant for Mock Interviews

A practice-first developer walkthrough: microphone in, streaming speech-to-text, end-of-turn detection, a prompt with the résumé and job description, a language model that scores answers, plus a latency budget and cost per hour from public list prices (October 2026).

To build an AI interview assistant, connect six parts: a question read aloud, microphone audio in, streaming speech-to-text, end-of-turn detection, a large language model prompted with the candidate's résumé and the job description, and a screen that shows the score and feedback. This guide builds the practice version, a mock interviewer that asks questions out loud and scores spoken answers, because that's the version worth building yourself.

If you want to build your own interview copilot, the API calls are the easy part. The hard parts are deciding when someone has finished speaking, keeping the total delay low and getting feedback that's specific instead of polite. The scope here is practice only: no call capture, no overlay and nothing meant for a real interview. Prices are public list prices checked in October 2026. For where this sits in the market, see our state-of-the-category report for 2026.

What does an AI interview assistant need? The architecture

A practice assistant is a loop: ask, listen, transcribe, decide the answer is over, score, show. Here's each stage with a building block from official documentation.

StageJobBuilding blockWatch for
1. AskShow the question and read it aloudThe browser's Web Speech API (SpeechSynthesis) or a cloud text-to-speech serviceBrowser voices are free; cloud voices sound more natural and cost money
2. ListenCapture the candidate's microphonegetUserMedia (MDN)Needs the user's permission and a secure (HTTPS) page
3. TranscribeStream audio; receive partial and final textA streaming speech-to-text API such as AssemblyAI streaming or DeepgramBilled by the audio minute or the session hour
4. Decide it's overDetect the end of the answerThe provider's turn detection, your own silence timer and a Done buttonToo eager and it cuts people off mid-thought
5. ScorePlan the questions; grade each answerAny hosted language model that can return JSON, for example OpenAI Structured OutputsA vague rubric produces vague praise
6. Show and saveDisplay the score, the fix and a model answer; store the sessionYour front end and local storageRésumés are personal data; keep them on the user's device where you can

Steps 1–3: plan the questions, capture audio, transcribe

Plan the interview from the résumé and job description

Start each session with one language-model call that turns the résumé and the job description into a question plan. Ask for a fixed number of questions, a mix of types and, for each question, the skill it tests. Store the plan; you'll reuse the "skill tested" field when you score.

An example prompt we wrote: You are the hiring manager for the role below. Using the résumé and job description, write 5 interview questions: 2 behavioral, 2 technical and 1 about a project on the résumé. For each, return the question, the skill it tests and one likely follow-up. Return JSON only.

Capture the microphone

In a browser, getUserMedia asks for permission and returns a microphone stream; it only works in a secure context, such as an HTTPS page or localhost. Convert the audio to the format your provider expects (16-bit mono PCM at 16 kHz is common for speech) and send it in short chunks over a WebSocket. Keep your API key on your server: most streaming providers let your server issue a short-lived token that the browser uses instead.

Stream it to speech-to-text

A streaming API returns partial text while the candidate speaks and a final version for each turn. Show the partial text faintly so the candidate can see they're being heard, and score only the final text. If your users practice in another language, pick a provider and model that list it. If the provider accepts a list of expected terms, pass the stack and product names from the job description; jargon and names are where transcripts break.

How does it know the answer is finished?

End-of-turn detection is the hardest design choice in the build. Spoken answers contain thinking pauses, and a tool that grabs the transcript at the first silence scores half an answer.

Combine them: provider turns for the transcript, your timer plus the button for "score now". When in doubt, wait longer. A practice tool that waits an extra second feels slightly slow; one that cuts people off teaches them to rush.

How do you score an answer with a language model?

Scoring is one call per answer. Send the question, the skill it tests, the final transcript, the résumé, the job description and a rubric, and ask for structured output so your interface can rely on the fields. Structured Outputs makes the model's response follow a JSON Schema you supply; other providers have similar features. An example schema we wrote:

Four habits make the feedback specific:

  1. Require evidence. Make every strength and fix quote the transcript. Generic praise disappears.
  2. Define the scale. Write down what a 3, a 6 and a 9 look like for each question type.
  3. Forbid invention. Tell the model to leave a gap rather than invent a project or number the candidate never mentioned.
  4. Calibrate. Grade five recorded answers yourself, run them through the prompt and adjust until the model's scores land within a point of yours.

A small, fast model is usually enough for scoring. Save larger models for writing model answers to design questions. Our guide to which AI models power interview tools explains the trade-offs between tiers.

How fast and how expensive? Latency and cost per hour

A latency budget for a practice tool

These are targets we'd start from, not measurements. A practice tool can afford a few seconds.

StageTargetWhat drives it
Question starts playingUnder 0.5 s after the candidate clicks NextBrowser speech or pre-generated audio
Partial transcript on screenUnder 1 s behind speechStreaming speech-to-text and the network
End-of-answer wait2–3 s of silence, or a Done clickYour threshold
Final transcriptUnder 1 s after the turn endsProvider finalization
Score and feedback2–5 s, streamedModel size and output length
Total, end of answer to feedbackAbout 4–9 sThe sum of the above

Tools that help in real time work to a far tighter budget: CoPilot Interview shows a structured answer in about 2 seconds after the question ends. Our breakdown of where the seconds go in a live pipeline covers that case.

Cost per practice hour from public list prices

As of October 2026, AssemblyAI lists Universal-Streaming speech-to-text at $0.15 an hour, billed on how long the streaming session is open (AssemblyAI pricing). OpenAI estimates Whisper transcription at $0.006 a minute and lists its small "mini" and "nano" text models at $0.05 to $0.75 per million input tokens and $0.40 to $4.50 per million output tokens (OpenAI API pricing).

For a one-hour session with one planning call and twelve scored answers, we estimated about 3,500 input and 600 output tokens per scored answer, because the résumé, job description and rubric travel with every call. That's about 44,500 input and 8,200 output tokens in total.

ItemAssumptionCost per hour
Speech-to-text, streamingAssemblyAI Universal-Streaming, session open 60 minutes$0.15
Speech-to-text, alternativeOpenAI Whisper, 60 minutes of audio$0.36
Language model44,500 input and 8,200 output tokens on a small modelAbout $0.01 to $0.07
Question audioBrowser text-to-speech$0
TotalBefore hosting, storage and your timeAbout $0.16 to $0.43

Two lessons. Audio costs more than tokens, so close the streaming session between questions. And a commercial product carries costs this sketch leaves out: real-time infrastructure, larger models, support and refunds. Our guide to why commercial interview tools charge more breaks those down.

How do you test it, and when does buying beat building?

Test the parts users notice, in this order:

If you want to…Building makes sense whenAn existing tool makes sense when
Learn speech and language-model APIsAlways; it's a good projectNot the point
Prepare for interviews in the next few weeksRarely; the build eats time your prep needsYou want to start practicing today
Run a custom rubric for a class, bootcamp or teamYou have developer time and a clear rubricYou'd rather configure than maintain
Get scored spoken practice from your own résuméYou enjoy tuning promptsYou want it working now

Before you start, look at what already exists: our notes on vetting open-source interview projects on GitHub cover licences, setup effort and maintenance. CoPilot Interview also has a live mode; follow the rules of the employer or platform you're interviewing with — many people use it only to practice, which works on the free plan.

Practice it: the shortcut if you need practice now

If your goal is interview practice rather than a coding project, use a finished tool and spend the time answering questions. The browser AI mock interview has 113 real questions across 9 tracks and needs nothing installed. For practice built from your own résumé and job description, the desktop app's Mock Interview lets you choose the level, 3, 5 or 8 questions and the mix of behavioral, technical, system design and coding. It reads each question aloud, scores your spoken answer out of 10 with what to fix and a model answer, and ends with a report card. It's on the free plan of CoPilot Interview's desktop AI interview assistant: 15 minutes a day, no account, no credit card.

Practice before you build

Answer real interview questions out loud and get a score with specific fixes, in your browser with nothing to install. The desktop app's free plan adds résumé-based mock interviews, 15 minutes every day.

Try a free AI mock interview

FAQ

How do I build an AI interview assistant?

Connect a question read aloud, microphone capture, a streaming speech-to-text API, end-of-turn detection, a language model prompted with the résumé, job description and a rubric, and a screen that shows the score, the fix and a model answer. Build the practice version first; it's simpler and more useful.

What's the hardest part of building one?

Deciding when the answer is finished, and getting specific feedback. Spoken answers contain pauses, so use a longer silence timer plus a Done button. For feedback, make the model quote the transcript and calibrate its scores against answers you graded yourself.

How much does it cost to run per hour?

From public list prices in October 2026, roughly $0.16 to $0.43 per practice hour before hosting: $0.15 an hour for AssemblyAI streaming or about $0.36 for an hour of OpenAI Whisper audio, plus a few cents of small-model tokens.

Which speech-to-text API should I use?

Test two with your own audio. Record ten answers with real jargon and different accents, run them through each and compare the transcripts. Pick the one that gets your field's terms right, then check its streaming support and price.

Can I build a mock interviewer without writing code?

Partly. A general chatbot with a voice mode can ask questions and give feedback if you paste the résumé and job description and a rubric. You lose consistent scoring and saved sessions. Our comparison of ChatGPT, Claude and Gemini for interview prep covers that route.

Should I build my own or use an existing tool?

Build it if you want to learn the APIs or need a custom rubric. If you have interviews coming up, use an existing tool and spend the time practicing. CoPilot Interview's free plan includes scored Mock Interview, 15 minutes a day.