An entirely local, voice-first AI mock interviewer to practice technical communication
Create and activate a virtual environment, then install dependencies:
python -m venv .venv
.venv\Scripts\Activate.ps1
pip install -r requirements.txtCreate a .env in the project root for any environment variables you need:
# .env (example)
# Add any keys your app or Modal needs, e.g. API keys
# EXAMPLE_KEY=your_value_here
Start the Gradio app:
python app.pyGradio will print a local URL (and a public share URL if enabled) where you can open the UI.
Notes:
- app.py expects a running Modal backend referenced via the
modalclient (the code usesCls.from_nameto obtain the remote class). For pure local development you can:- Mock
modal_modelwith a lightweight local implementation that exposestranscribe.remote()andgenerate.remote()methods, or - Replace those calls temporarily with local stubs to test the UI and audio handling.
- Mock
- modal_backend.py defines a Modal
Appand theCodingCompanionclass which loads a language model and tiny Whisper for transcription. Deploying this requires Modal credentials and following Modal's deployment docs. - If you plan to deploy to Modal, ensure you have Modal configured locally and the GPU/image requirements met.
- The Gradio
Audiocomponent usestype="numpy"andsoundfilefor conversions. Ensuresoundfileis installed and functional on your platform. - Audio transcription flow:
- Gradio provides a
(sample_rate, numpy_array)tuple. - app.py writes the numpy array to an in-memory WAV via
soundfileand sends bytes to the backend for transcription.
- Gradio provides a
Run tests (if you use pytest):
python -m pytest -q