Newton's Parrot is my very first Flask-powered AI voice assistant. It uses Google Gemini to answer questions and Gemini text-to-speech to read the answers aloud in a natural voice. It has some latency issue though which I am trying to figure out! But nevertheless, it still works :)
- Python 3.10 or newer
- A Gemini API key from Google AI Studio
-
Clone the repository and enter the project folder:
git clone https://github.com/suvrazastrovision/newtons_parrot.git cd newtons_parrot -
Create a virtual environment:
python -m venv .venv
-
Activate the virtual environment.
Windows PowerShell:
.\.venv\Scripts\Activate.ps1
Git Bash, macOS, or Linux:
source .venv/Scripts/activate # Git Bash on Windows # source .venv/bin/activate # macOS or Linux
-
Install the dependencies:
python -m pip install -r requirements.txt
-
Create a
.envfile in the project root, besideapp.py:GEMINI_API_KEY=your_gemini_api_key_here
-
Start the application:
python app.py
-
Open http://127.0.0.1:5000 in your browser.
Never commit or share your .env file or Gemini API key. The included .gitignore prevents .env from being added to Git. If a key is exposed, revoke it in Google AI Studio and create a new one.
When deploying the app publicly, store GEMINI_API_KEY as a secret environment variable on the hosting platform. Public visitors can consume your Gemini quota through the deployed app, so request limits are recommended.