A native Android companion for live mock interviews—turning interviewer questions into streamed, resume-aware answer suggestions.
Interview Mitra is built for open, two-person interview practice on a single Android device. It captures a mixed microphone stream, uses diarized transcription to separate the candidate from the interviewer, detects questions locally, and streams an answer grounded in the candidate’s resume and recent interview context.
- Fast by design — audio is captured as 200 ms PCM chunks; question detection is local and the answer appears as Claude streams it.
- Candidate-safe prompt boundary — candidate-role transcript chunks remain in the on-screen log and are never included in an answer-generation request.
- Useful context, bounded cost — an optional PDF/text resume is condensed once per session, while only the latest four Q&A exchanges are retained for each response.
- Session-ready Android behavior — microphone capture runs in a visible foreground service with reconnect handling for the transcription stream.
No device screenshots are committed yet. The most useful additions after an on-device test would be:
docs/screenshots/setup.png— resume upload and answer-style selection.docs/screenshots/calibration.png— candidate voice confirmation.docs/screenshots/live-session.png— speaker-labelled transcript, current question, and streamed answer.
flowchart LR
M[Phone microphone] --> A[AudioRecord\n16 kHz mono PCM]
A --> S[Foreground listening service]
S --> D[Deepgram WebSocket\ntranscription + diarization]
D --> R{Speaker-role router}
R -->|Candidate| T[Local transcript only]
R -->|Interviewer| F[Fragment buffer\n+ overlap reconstruction]
F --> Q[Local question detector]
Q --> P[Prompt builder\nresume + last 4 Q&A pairs]
U[Optional PDF / text resume] --> X[Local text extraction\n+ one-time profile structuring]
X --> P
P --> C[Claude Messages API\nstreamed answer]
C --> UI[Compose live dashboard]
The candidate speaker ID is established during calibration. Any other diarized speaker is treated as the interviewer. When an interviewer utterance settles, the app reconstructs its finalized fragments, applies a lightweight question heuristic, then starts a streamed answer only if a question is detected.
| Area | Implementation |
|---|---|
| App & UI | Kotlin, Jetpack Compose, Android ViewModel |
| Audio | AudioRecord, VOICE_RECOGNITION, 16 kHz mono PCM16 |
| Streaming | Kotlin Flow, OkHttp WebSocket, Server-Sent Events |
| Speech-to-text | Deepgram live transcription with diarization |
| Answer generation | Anthropic Claude Messages API |
| Resume parsing | PdfBox-Android for PDF; system document picker for files |
- Android Studio with Android SDK Platform 34 installed
- An Android 8.0+ device or emulator with microphone support
- A Deepgram API key for live diarized transcription
- An Anthropic API key for resume structuring and suggested answers
git clone https://github.com/Unseencoderz/Interview-Mitra
cd Interview-Mitra
Copy-Item local.properties.example local.propertiesOpen local.properties and replace the example values. Keep this file local—it is ignored by Git.
sdk.dir=C\:\Users\YOUR_USER\AppData\Local\Android\Sdk
DEEPGRAM_API_KEY=your_deepgram_key
ANTHROPIC_API_KEY=your_anthropic_keyOpen the project in Android Studio, allow Gradle to sync, select a device, and run the app configuration. The project currently does not include a Gradle wrapper, so Android Studio is the supported launch path.
No keys? The setup UI remains available. A Deepgram key is required to complete voice calibration; without an Anthropic key, a detected question displays an explanatory placeholder instead of an answer.
- Optionally upload a PDF or text resume and choose Concise, Detailed, or Bullets.
- Allow microphone access, then hold the calibration control and speak a short phrase.
- Once the app confirms your voice, start the live session and place the device where both speakers are audible.
- Speak naturally. Interviewer questions appear above the streamed suggested answer; use Stop session when finished.
| Variable | Required | Purpose |
|---|---|---|
sdk.dir |
Yes | Path to the local Android SDK used by Gradle. |
DEEPGRAM_API_KEY |
For live transcription | Authenticates the persistent live transcription WebSocket. |
ANTHROPIC_API_KEY |
For AI answers | Structures an uploaded resume and streams suggested answers. |
API keys are compiled from local.properties into the local development build via BuildConfig. Do not commit local.properties or publish builds that contain personal keys.
app/src/main/java/com/interviewmitra/
├── MainActivity.kt # Compose screens and resume picker
├── InterviewViewModel.kt # Session state and pipeline coordination
├── audio/
│ ├── ListeningService.kt # Foreground microphone capture
│ └── AudioBus.kt # Bounded in-memory PCM bridge
├── domain/
│ ├── QuestionDetector.kt # Local question heuristic and role mapping
│ └── InterviewEngine.kt # Fragment reconstruction
└── network/
└── StreamingClients.kt # Deepgram and Claude clients
Issues and pull requests are welcome. Please keep changes focused, never commit API keys, and test microphone behavior on a physical device when touching the audio path.
This project is licensed under the MIT License - see the LICENSE file for details.