A minimalist, professional guitar tuner powered by the Web Audio API and Google Gemini AI.
ZenTuner AI goes beyond simple pitch detection. It combines a high-precision Autocorrelation algorithm for accurate real-time tuning with an AI Guitar Technician powered by Google's Gemini API to help you solve instrument setup issues on the fly.
- High-Precision Tuning: Uses raw Web Audio API data and autocorrelation logic (better than FFT for instrument pitch) to detect frequency and cents deviation.
- Visual Feedback: Beautiful D3.js-based gauge with smooth needle transitions.
- String Detection: Automatically highlights the closest standard guitar string (E-A-D-G-B-E).
- AI Guitar Tech: Ask questions about intonation, buzzing, or string changes and get instant, concise advice from Gemini AI.
- Responsive Design: Built with Tailwind CSS for a mobile-first, app-like experience.
- Node.js (v18 or higher)
- Google Gemini API Key: Get one for free at Google AI Studio.
-
Clone the repository
git clone https://github.com/yourusername/zentuner-ai.git cd zentuner-ai -
Install dependencies
npm install
-
Set up Environment Variables Create a
.envfile in the root directory (or rename.env.example).# .env API_KEY=your_actual_api_key_hereNote: In this demo architecture, the key is exposed to the client build. For production apps, use a proxy server.
-
Run Development Server
npm run dev
Open http://localhost:5173 in your browser.
You can containerize the application easily.
-
Build the Image
docker build -t zentuner . -
Run the Container
docker run -p 8080:80 zentuner
Visit http://localhost:8080.
- Frontend: React 18, TypeScript
- Build Tool: Vite
- Styling: Tailwind CSS
- Audio Processing: Native Web Audio API (AnalyserNode)
- Visualization: D3.js
- AI Integration: Google GenAI SDK (
@google/genai)
.
├── components/ # React UI Components (TunerMeter, StringSelector)
├── services/ # Logic (Audio Processing, Gemini API)
├── constants.ts # Musical notes and frequency data
├── types.ts # TypeScript interfaces
├── App.tsx # Main application layout
├── index.tsx # Entry point
├── index.html # HTML template
└── Dockerfile # Container configuration
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License.