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.
| Stage | Job | Building block | Watch for |
|---|---|---|---|
| 1. Ask | Show the question and read it aloud | The browser's Web Speech API (SpeechSynthesis) or a cloud text-to-speech service | Browser voices are free; cloud voices sound more natural and cost money |
| 2. Listen | Capture the candidate's microphone | getUserMedia (MDN) | Needs the user's permission and a secure (HTTPS) page |
| 3. Transcribe | Stream audio; receive partial and final text | A streaming speech-to-text API such as AssemblyAI streaming or Deepgram | Billed by the audio minute or the session hour |
| 4. Decide it's over | Detect the end of the answer | The provider's turn detection, your own silence timer and a Done button | Too eager and it cuts people off mid-thought |
| 5. Score | Plan the questions; grade each answer | Any hosted language model that can return JSON, for example OpenAI Structured Outputs | A vague rubric produces vague praise |
| 6. Show and save | Display the score, the fix and a model answer; store the session | Your front end and local storage | Ré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.
- Provider turn detection. AssemblyAI's streaming API sends an
end_of_turnflag when it judges a turn finished. Deepgram's endpointing finalizes a transcript after a pause, and its documentation gives a default of 10 milliseconds (Deepgram endpointing). That suits fast captions but is far too short to mean "the answer is finished". - Your own silence timer. Treat the answer as over only after a longer silence. Two to three seconds is a reasonable starting point for spoken answers; tune it with real users.
- A Done button. Always offer one, and never auto-submit coding answers, so people can think in silence.
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:
score: an integer from 0 to 10worked: up to two strengths, each quoting the transcriptfix: the single most important changemodel_answer: under 150 words, using only facts from the résumé or the transcriptfollow_up: the question a real interviewer would ask next
Four habits make the feedback specific:
- Require evidence. Make every strength and fix quote the transcript. Generic praise disappears.
- Define the scale. Write down what a 3, a 6 and a 9 look like for each question type.
- Forbid invention. Tell the model to leave a gap rather than invent a project or number the candidate never mentioned.
- 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.
| Stage | Target | What drives it |
|---|---|---|
| Question starts playing | Under 0.5 s after the candidate clicks Next | Browser speech or pre-generated audio |
| Partial transcript on screen | Under 1 s behind speech | Streaming speech-to-text and the network |
| End-of-answer wait | 2–3 s of silence, or a Done click | Your threshold |
| Final transcript | Under 1 s after the turn ends | Provider finalization |
| Score and feedback | 2–5 s, streamed | Model size and output length |
| Total, end of answer to feedback | About 4–9 s | The 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.
| Item | Assumption | Cost per hour |
|---|---|---|
| Speech-to-text, streaming | AssemblyAI Universal-Streaming, session open 60 minutes | $0.15 |
| Speech-to-text, alternative | OpenAI Whisper, 60 minutes of audio | $0.36 |
| Language model | 44,500 input and 8,200 output tokens on a small model | About $0.01 to $0.07 |
| Question audio | Browser text-to-speech | $0 |
| Total | Before hosting, storage and your time | About $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:
- A regression set. Keep ten recorded answers (strong, weak, rambling, off-topic and silent) and rerun them after every prompt change.
- Score stability. Score the same answer three times. The scores should stay within a point of each other.
- Audio variety. Try a laptop microphone, a headset, a noisy room and speakers with different accents.
- The pause test. Speak, pause for two seconds mid-answer and carry on. The tool shouldn't submit.
- Privacy. Make sure résumé text and transcripts don't end up in your server logs.
| If you want to… | Building makes sense when | An existing tool makes sense when |
|---|---|---|
| Learn speech and language-model APIs | Always; it's a good project | Not the point |
| Prepare for interviews in the next few weeks | Rarely; the build eats time your prep needs | You want to start practicing today |
| Run a custom rubric for a class, bootcamp or team | You have developer time and a clear rubric | You'd rather configure than maintain |
| Get scored spoken practice from your own résumé | You enjoy tuning prompts | You 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 interviewFAQ
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.