A Turkish-speaking desktop voice assistant built with Python & Tkinter — real-time conversational AI (Gemini Live) with automatic fallback, plus Spotify, smart bulb, WhatsApp, browser, file and system control, AI image/code generation, and more.
Python ve Tkinter ile geliştirilmiş, Türkçe konuşan bir masaüstü sesli asistanı — gerçek zamanlı yapay zeka sohbeti (Gemini Live, otomatik yedekli), Spotify, akıllı ampul, WhatsApp, tarayıcı, dosya ve sistem kontrolü, yapay zeka ile resim/kod üretimi ve daha fazlası.
🚧 This is version 1.2 — actively under development, more features and improvements are on the way. 🚧 Bu, 1.2 sürümüdür — aktif olarak geliştiriliyor, yeni özellikler ve iyileştirmeler yolda.
Vera is a Turkish-language desktop voice assistant written in Python. It wakes up on a whistle or the word "Vera", holds a real-time, natural, barge-in-capable voice conversation through the Gemini Live API, and shows an animated Tkinter orb while it listens/talks. Beyond conversation, Vera can control your smart bulb, Spotify, the whole system, your browser, files on the desktop, and even send WhatsApp messages — all by voice, with spoken confirmation before anything risky.
- 💱 Currency conversion — convert between currencies at live rates by voice ("100 dollars to lira", "what's a euro in lira today"), via the free, key-free Frankfurter/ECB API
- 🛠️ Self code-editing, with a git safety net — Vera can open any existing code file anywhere on the computer (not just the Desktop), apply a described fix/change through Claude, and write it straight back to the file; on request she can then commit the change or revert it to the last commit, if the file lives in a git repo
- 🔒 Hardened dangerous-command filter — the guarded PowerShell runner's check for a forced, recursive delete of a drive root now works token-by-token instead of matching a fixed string, so reordering flags or adding extra spaces can no longer sneak a destructive command past it
- 👤 More precise contact matching — looking up, updating or deleting a saved contact now matches the exact name first and only falls back to a fuzzy match when it's unambiguous, so "Ali" can no longer accidentally edit or delete "Aliye"; Turkish possessive suffixes ("Mehmet'e", "Ali'yi") are also recognized when Vera notices a known person mentioned in conversation
- 🎯 Wake-word & whistle tuning — wake-word matching now respects word boundaries (so "uyandım" no longer falsely triggers on "uyan"), a race where two near-simultaneous wake triggers could leave a session orphaned holding the microphone is fixed, and whistle/noise-floor detection was retuned for fewer missed wake-ups
- 🗣️ More natural replies — Vera now varies her greetings and phrasing instead of repeating the same sentence every time, uses the user's name more sparingly, and no longer defaults to an English reply on the first turn of a session
- 🐛 Smaller fixes — the clipboard is restored after Vera pastes text to launch an app (it used to overwrite it permanently), opening a file with a named app now verifies that app actually exists before claiming success, age is reported to the day instead of a fake hour/minute precision, closing the window now shuts the voice session down cleanly first, fixed an intermittent bug where Vera would wake up silently (no spoken greeting) if the very first connection of the session was a bit slow to establish, and whistle detection now also checks that the sound is actually a narrow, pure tone (not just "mostly high-frequency") — ambient noises like jingling keys or a hiss/sibilant sound could carry enough high-frequency energy to be mistaken for a whistle and wake Vera up on their own
- 🗣️ Voice control — wake/sleep and background listening modes, real-time full-duplex conversation via Gemini Live (with an automatic Groq-based fallback if it can't be reached) and natural Turkish text-to-speech
- 🎵 Spotify control — play/pause, search & play a track, volume, "what's playing", opening the Spotify app, and automatic volume ducking while Vera talks
- 💡 Smart bulb control — Tuya smart bulb on/off, color and brightness, via local network
- 🖥️ System control — shutdown/restart/sleep/lock (with spoken confirmation), volume, screenshots, monitor extend/duplicate/second-only, task manager, notification center, file explorer, and a guarded general PowerShell command runner
- 🚀 App launcher — opens desktop apps by voice command
- ⛅ Weather — current weather for any Turkish city/district via OpenWeatherMap
- 💱 Currency conversion — live exchange-rate conversion between ~30 currencies by voice, via the free Frankfurter/ECB API
- 🌐 Browser control — open any site or search Google, open/search Netflix, and close a specific tab by name (via Chrome DevTools Protocol when available, with a window-automation fallback)
- 📁 File & folder management — create, update and open files/folders on the Desktop by voice (sandboxed to the Desktop by design, for safety)
- 💻 AI code generation & self-editing — dictate a script/program and Vera writes it with Claude (Anthropic, Groq fallback), automatically saved to a file; ask her to fix or change an existing file anywhere on the computer and she edits it directly, with git commit/revert as a safety net
▶️ Run code by voice — ask Vera to run a file she just wrote (or any file on the Desktop): HTML opens as a live preview in the browser, and Python/JS/batch/PowerShell scripts launch in a visible console window, like hitting F5 in an editor- 🖼️ AI image generation — generates and opens an image from a text prompt via Cloudflare Workers AI (FLUX.1 schnell), falling back to Pollinations.ai
- 📺 YouTube lookup — "what's the latest video from <channel>" — finds it, tells you when it was posted, can open it directly
- 📱 WhatsApp Desktop automation — writes a message to a contact and waits for your spoken "send"/"cancel" before actually sending anything
- 💬 General chat — natural conversation through Gemini Live (or the Groq fallback), with Turkish chat history stored in MySQL
- 🧠 Persistent memory — Vera remembers people you tell her about (relationship, birthday, notes) in MySQL and can recall them in conversation
- 🎨 Animated GUI — a minimal, animated Tkinter orb that reacts to listening/speaking state
- Python 3 — core language
- Tkinter — desktop GUI
- Gemini Live API — real-time, full-duplex conversational AI over WebSocket
- Groq API — fallback voice conversation, Whisper speech-to-text, and fallback code generation/editing
- Anthropic Claude API — primary AI code generation & editing
- Cloudflare Workers AI / Pollinations.ai — AI image generation
- YouTube Data API v3 — channel/video lookups
- pygame — audio playback engine
- edge-tts — Turkish text-to-speech (fallback voice mode)
- SpeechRecognition + PyAudio — microphone capture & wake-word speech-to-text
- Spotify Web API — playback control
- TinyTuya — local control of the Tuya smart bulb
- pywin32 + PyAutoGUI — Windows/WhatsApp Desktop/browser UI automation
- MySQL — chat history & people memory
- OpenWeatherMap API — weather data
- Frankfurter (ECB) API — free, key-free currency exchange rates
main.py is the only entry point and stays at the project root; it boots the audio engine and starts the Tkinter GUI. Everything else is split into four packages by responsibility:
gui/— the Tkinter window and animated orb (gui.py)core/— settings/constants (config.py), command routing & tool definitions (commands.py), MySQL access (database.py), text helpers (utils.py)controllers/— everything that controls an external device, app or the OS: Spotify (spotify_controller.py), the smart bulb (bulb_controller.py), Windows (system_control.py), app launching (app_launcher.py), the browser (browser_control.py,web_control.py), the Desktop filesystem (file_control.py), WhatsApp Desktop (whatsapp_controller.py), editing/committing code anywhere on the computer (proje_kontrol.py)services/— the real-time Gemini Live voice session (live_voice.py), the Groq fallback voice session (groq_voice.py), wake-word/whistle detection (speech.py), AI code generation & editing (claude_codegen.py), AI image generation (image_gen.py), weather (weather.py), currency conversion (currency.py), YouTube (youtube.py)
Secrets (API keys, DB password) are read from environment variables via python-dotenv — see Usage below.
Vera/
├── main.py # Entry point
├── gui/ # Tkinter GUI
│ └── gui.py
├── core/ # Settings, command routing, DB, helpers
│ ├── config.py
│ ├── commands.py
│ ├── database.py
│ └── utils.py
├── controllers/ # Spotify, bulb, system, apps, browser, files, WhatsApp, project code editing
│ ├── spotify_controller.py
│ ├── bulb_controller.py
│ ├── system_control.py
│ ├── app_launcher.py
│ ├── browser_control.py
│ ├── web_control.py
│ ├── file_control.py
│ ├── whatsapp_controller.py
│ └── proje_kontrol.py
├── services/ # Voice engines, code/image gen, weather, currency, YouTube
│ ├── live_voice.py
│ ├── groq_voice.py
│ ├── speech.py
│ ├── claude_codegen.py
│ ├── image_gen.py
│ ├── weather.py
│ ├── currency.py
│ └── youtube.py
├── img/ # Screenshots
├── .env.example
├── requirements.txt
├── LICENSE
└── README.md
- Clone the repository
git clone https://github.com/AlperT-Code/VeraAI-Assistant-1.2.git cd VeraAI-Assistant-1.2 - Install dependencies (Python 3.10+ recommended)
pip install -r requirements.txt
- Copy
.env.exampleto.envand fill in the keys for the features you want (all optional — an unset key just disables that feature):cp .env.example .env
- Create a MySQL database matching your
.env(DB_NAME, defaultvera_db). - Run it:
python main.py
- Fork the repository
- Create a new branch
- Commit your changes
- Push the branch
- Open a pull request
This project is licensed under the MIT License.
Vera, Python ile yazılmış, Türkçe konuşan bir masaüstü sesli asistanıdır. Islık ya da "Vera" sözüyle uyanır, Gemini Live API üzerinden gerçek zamanlı, doğal ve araya girilebilir bir sesli sohbet yürütür, dinlerken/konuşurken animasyonlu bir Tkinter küresi gösterir. Sohbetin ötesinde; akıllı ampulünü, Spotify'ını, tüm sistemini, tarayıcını, masaüstündeki dosyaları kontrol edebilir, hatta WhatsApp mesajı gönderebilir — hepsi sesle, riskli olan her şeyden önce sözlü onay alarak.
- 💱 Döviz çevirme — sesle güncel kurla para birimi çevirme ("100 dolar kaç lira", "euro bugün kaç lira ediyor"), ücretsiz ve anahtar gerektirmeyen Frankfurter/ECB API'siyle
- 🛠️ Kendi kodunu düzenleme (git güvenlik ağıyla) — Vera artık bilgisayardaki (sadece Masaüstü değil) var olan herhangi bir kod dosyasını açıp istenen değişikliği/hata düzeltmesini Claude'a uygulatıp doğrudan dosyanın üzerine yazabiliyor; dosya bir git deposundaysa isteğe bağlı olarak değişikliği commit'leyebiliyor ya da son commit'teki haline geri döndürebiliyor
- 🔒 Daha sıkı tehlikeli komut filtresi — korumalı PowerShell çalıştırıcısının bir sürücü kökünü zorla-özyinelemeli silme kontrolü artık sabit dizge yerine token bazlı çalışıyor, bayrak sırasını değiştirmek ya da fazladan boşluk eklemek filtreyi artık atlatamıyor
- 👤 Daha isabetli kişi eşleştirme — kayıtlı bir kişiyi arama/güncelleme/silme artık önce tam isim eşleşmesine bakıyor, bulanık eşleşmeye sadece belirsizlik yoksa düşüyor — "Ali" artık yanlışlıkla "Aliye"yi güncelleyip silemiyor; sohbette bilinen bir kişi geçtiğinde kesme işaretli hâl ekleri de ("Mehmet'e", "Ali'yi") tanınıyor
- 🎯 Uyanma kelimesi & ıslık ayarı — uyanma kelimesi eşleşmesi artık kelime sınırlarına bakıyor ("uyandım" artık "uyan"a yanlışlıkla tetiklemiyor), neredeyse aynı anda gelen iki uyandırmanın bir oturumu sahipsiz mikrofonla bırakabildiği bir yarış durumu düzeltildi, ıslık/gürültü tabanı tespiti daha az kaçırma için yeniden ayarlandı
- 🗣️ Daha doğal cevaplar — Vera artık karşılamalarını ve ifadelerini her seferinde aynı cümleyi tekrarlamak yerine çeşitlendiriyor, kullanıcının adını daha az kullanıyor ve oturumun ilk turunda artık İngilizce cevaba düşmüyor
- 🐛 Küçük düzeltmeler — Vera bir uygulama açmak için metin yapıştırdığında pano artık kalıcı olarak silinmiyor (işlem sonunda eski içerik geri yükleniyor), bir dosyayı belirtilen uygulamayla açma artık uygulamanın gerçekten var olduğunu önce kontrol ediyor, yaş artık sahte saat/dakika hassasiyeti yerine gün hassasiyetinde söyleniyor, pencere kapatılırken artık önce sesli oturum düzgünce kapatılıyor, oturumun ilk bağlantısı biraz yavaş kurulduğunda Vera'nın hiçbir şey söylemeden sessizce uyanması (ara sıra yaşanan bir hata) düzeltildi, ve ıslık tespiti artık sesin gerçekten dar bantlı/saf bir ton olup olmadığını da kontrol ediyor — anahtar şıkırtısı ya da tıslama gibi ortam sesleri yüksek frekanslı enerjisi yüzünden ıslıkla karışıp Vera'yı uykudayken kendiliğinden uyandırabiliyordu
- 🗣️ Sesli kontrol — uyanma/uyuma ve arka planda dinleme modları, Gemini Live üzerinden gerçek zamanlı çift yönlü sohbet (ulaşılamazsa otomatik Groq tabanlı yedek) ve doğal Türkçe seslendirme
- 🎵 Spotify kontrolü — çal/duraklat, şarkı arama & çalma, ses seviyesi, "ne çalıyor", Spotify uygulamasını açma ve Vera konuşurken otomatik ses kısma
- 💡 Akıllı ampul kontrolü — Tuya akıllı ampulü yerel ağ üzerinden açma/kapama, renk ve parlaklık ayarı
- 🖥️ Sistem kontrolü — kapat/yeniden başlat/uyut/kilitle (sözlü onayla), ses seviyesi, ekran görüntüsü, monitör genişlet/kopyala/sadece ikinci ekran, görev yöneticisi, bildirim merkezi, dosya gezgini ve korumalı, genel amaçlı bir PowerShell komut çalıştırıcı
- 🚀 Uygulama açıcı — sesli komutla masaüstü uygulamalarını açar
- ⛅ Hava durumu — OpenWeatherMap üzerinden herhangi bir Türkiye il/ilçesi için güncel hava durumu
- 💱 Döviz çevirme — sesle, ~30 para birimi arasında Frankfurter/ECB API'sinden güncel kurla çevrim
- 🌐 Tarayıcı kontrolü — bir siteyi açma ya da Google'da arama, Netflix açma/arama, isme göre belirli bir sekmeyi kapatma (mümkünse Chrome DevTools Protokolü, yoksa pencere otomasyonu yedeği)
- 📁 Dosya ve klasör yönetimi — masaüstünde sesle dosya/klasör oluşturma, güncelleme ve açma (güvenlik amacıyla bilinçli olarak Masaüstü ile sınırlı)
- 💻 Yapay zeka ile kod yazımı & kendi kodunu düzenleme — bir betik/program isteğini söyle, Vera onu Claude (Anthropic, Groq yedekli) ile yazıp otomatik olarak bir dosyaya kaydeder; bilgisayardaki var olan herhangi bir dosyada düzeltme/değişiklik istersen doğrudan üzerine yazar, git commit/geri alma güvenlik ağıyla
▶️ Kodu sesle çalıştırma — Vera'nın az önce yazdığı (ya da masaüstündeki herhangi bir) dosyayı çalıştırmasını iste: HTML dosyaları tarayıcıda canlı önizleme olarak açılır, Python/JS/batch/PowerShell betikleri ise bir editördeki F5'e basmak gibi görünür bir konsol penceresinde çalışır- 🖼️ Yapay zeka ile resim üretimi — bir metin isteğinden Cloudflare Workers AI (FLUX.1 schnell) ile resim üretip açar, olmazsa Pollinations.ai'ye düşer
- 📺 YouTube sorgusu — "<kanal>'ın son videosu ne" — videoyu bulur, ne zaman yüklendiğini söyler, istenirse doğrudan açar
- 📱 WhatsApp Desktop otomasyonu — bir kişiye mesaj yazar, gerçekten göndermeden önce senin sözlü "gönder"/"iptal" onayını bekler
- 💬 Genel sohbet — Gemini Live (ya da Groq yedeği) üzerinden doğal sohbet, Türkçe sohbet geçmişi MySQL'de tutulur
- 🧠 Kalıcı hafıza — Vera bahsettiğin kişileri (yakınlık, doğum günü, notlar) MySQL'de hatırlıyor ve sohbette hatırlayabiliyor
- 🎨 Animasyonlu arayüz — dinleme/konuşma durumuna tepki veren minimal, animasyonlu bir Tkinter küresi
- Python 3 — ana dil
- Tkinter — masaüstü arayüzü
- Gemini Live API — WebSocket üzerinden gerçek zamanlı, çift yönlü yapay zeka sohbeti
- Groq API — yedek sesli sohbet, Whisper ile sesten metne dönüşüm ve yedek kod yazımı/düzenlemesi
- Anthropic Claude API — birincil yapay zeka kod üretimi & düzenlemesi
- Cloudflare Workers AI / Pollinations.ai — yapay zeka ile resim üretimi
- YouTube Data API v3 — kanal/video sorguları
- pygame — ses çalma motoru
- edge-tts — Türkçe metinden sese dönüşüm (yedek ses modu)
- SpeechRecognition + PyAudio — mikrofon yakalama & uyanma kelimesi sesten metne dönüşümü
- Spotify Web API — oynatma kontrolü
- TinyTuya — Tuya akıllı ampulün yerel kontrolü
- pywin32 + PyAutoGUI — Windows/WhatsApp Desktop/tarayıcı arayüz otomasyonu
- MySQL — sohbet geçmişi & kişi hafızası
- OpenWeatherMap API — hava durumu verisi
- Frankfurter (ECB) API — ücretsiz, anahtar gerektirmeyen döviz kuru verisi
main.py, tek giriş noktasıdır ve projenin kök dizininde kalır; ses motorunu başlatır ve Tkinter arayüzünü açar. Geri kalan her şey sorumluluğa göre dört pakete ayrılmıştır:
gui/— Tkinter penceresi ve animasyonlu küre (gui.py)core/— ayarlar/sabitler (config.py), komut yönlendirme & araç tanımları (commands.py), MySQL erişimi (database.py), metin yardımcıları (utils.py)controllers/— harici bir cihazı, uygulamayı veya işletim sistemini kontrol eden her şey: Spotify (spotify_controller.py), akıllı ampul (bulb_controller.py), Windows (system_control.py), uygulama açma (app_launcher.py), tarayıcı (browser_control.py,web_control.py), masaüstü dosya sistemi (file_control.py), WhatsApp Desktop (whatsapp_controller.py), bilgisayardaki herhangi bir yerdeki kodu düzenleme/commit'leme (proje_kontrol.py)services/— gerçek zamanlı Gemini Live sesli oturumu (live_voice.py), Groq yedek sesli oturumu (groq_voice.py), uyanma kelimesi/ıslık tespiti (speech.py), yapay zeka kod üretimi & düzenlemesi (claude_codegen.py), yapay zeka resim üretimi (image_gen.py), hava durumu (weather.py), döviz çevirme (currency.py), YouTube (youtube.py)
Gizli bilgiler (API anahtarları, DB şifresi) python-dotenv ile ortam değişkenlerinden okunur — aşağıdaki Kullanım bölümüne bakın.
Vera/
├── main.py # Giriş noktası
├── gui/ # Tkinter arayüzü
│ └── gui.py
├── core/ # Ayarlar, komut yönlendirme, DB, yardımcılar
│ ├── config.py
│ ├── commands.py
│ ├── database.py
│ └── utils.py
├── controllers/ # Spotify, ampul, sistem, uygulamalar, tarayıcı, dosya, WhatsApp, proje kodu
│ ├── spotify_controller.py
│ ├── bulb_controller.py
│ ├── system_control.py
│ ├── app_launcher.py
│ ├── browser_control.py
│ ├── web_control.py
│ ├── file_control.py
│ ├── whatsapp_controller.py
│ └── proje_kontrol.py
├── services/ # Ses motorları, kod/resim üretimi, hava durumu, döviz, YouTube
│ ├── live_voice.py
│ ├── groq_voice.py
│ ├── speech.py
│ ├── claude_codegen.py
│ ├── image_gen.py
│ ├── weather.py
│ ├── currency.py
│ └── youtube.py
├── img/ # Ekran görüntüleri
├── .env.example
├── requirements.txt
├── LICENSE
└── README.md
- Depoyu klonlayın
git clone https://github.com/AlperT-Code/VeraAI-Assistant-1.2.git cd VeraAI-Assistant-1.2 - Bağımlılıkları kurun (Python 3.10+ önerilir)
pip install -r requirements.txt
.env.exampledosyasını.envolarak kopyalayıp kullanmak istediğin özelliklerin anahtarlarını girin (hepsi opsiyoneldir — girilmeyen bir anahtar sadece o özelliği devre dışı bırakır):cp .env.example .env
.envdosyanızla eşleşen bir MySQL veritabanı oluşturun (DB_NAME, varsayılanvera_db).- Çalıştırın:
python main.py
- Projeyi fork'layın
- Yeni bir branch oluşturun
- Değişikliklerinizi commit edin
- Branch'i push edin
- Pull request oluşturun
Bu proje MIT Lisansı ile lisanslanmıştır.

