Skip to content

Bernard is a voice assistant developed with gTTS. It can fulfill basic and simple tasks you give.

Notifications You must be signed in to change notification settings

ardauzunoglu/Bernard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 

Repository files navigation

Bernard

Purpose

Bernard is a voice assistant developed with gTTS. It can fulfill basic and simple tasks you give.

Libraries Used

  • datetime
  • time
  • speedtest
  • playsound
  • speech_recognition
  • sqlite3
  • pytz
  • smtplib
  • requests
  • wikipedia
  • pyqrcode
  • random
  • pandas
  • covid
  • win10toast
  • gtts
  • selenium

Requirements

You must install the libraries in cmd using the command "pip install xxxxx".

You must have the files in 'Other Files' in your Python path.

You must install ChromeDriver and the directory shall be "C:\Program Files (x86)\chromedriver.exe".

Download ChromeDriver

You must have the JSON files in your Python path.

More about Python path

Needed JSON file 1 - credentials.json

Click 'Enable the Google Calendar API' button.

Choose or create a project. Click Next.

Choose desktop app. Click Create.

Click 'DOWNLOAD CLIENT CONFIGURATION'.

Needed JSON file 2 - client_secret.json

Click 'Credentials'.

Click 'Create credentials'.

Choose OAuth.

Choose Desktop app as application type. Create the credential.

Click the download icon near to your OAuth credential.

Commands - What can Bernard do?

Command Name: tarih
Function: Returns and tells the date of asked day.
Example: What is the date after 15 days?

Command Name: netflix
Function: Asks you, which content you want it to play, and then opens the website of Netflix and plays the content.

Command Name: spotify
Function: Opens the web player of Spotify and plays the latest song you have played on any device.

Command Name: yemeksepeti
Function: Asks you the name of the restaurant you want to order from and three items from the restaurant, and then orders the items -you can order less than three items if you want- from Yemeksepeti.

Command Name: gmail
Function: Asks you the email address of receiver, title of the email and the message you want to send, and then sends the email with the given information.

Command Name: youtube
Function: Asks the video you want it to play, searchs the input you give, and plays the first result of search. If the first result of the search is a channel, it automatically opens the videos section of that channel.

Command Name: google
Function: Googles anything you say and returns the first result of the search whether it is a explanation, wikipedia bar, youtube video or a regular link. It plays the youtube video if it is the first result.

Command Name: ceviri
Function: Translates any word you want from Turkish to the language you want between English, German and Spanish.

Command Name: etkinlik_goster
Function: Asks you the amount of the days you want to look for if there is an activity on Google Calendar, and returns all the activities if there are any.

Command Name: etkinlik_ekle
Function: Adds a new activity to Google Calendar in the direction of the information given by you.

Command Name: doviz_cevir
Function: Converts between more than 50 currencies.

Command Name: hava_durumu
Function: Shows the weather forecast of both the current day and a day you want in a 14 days range.

Command Name: vikipedi
Function: You can search anything that you can search on Wikipedia with this command. Bernard brings up results of your search.

Command Name: whatsapp
Function: Bernard asks you to who you want to message and what do you want to message and then sends the message.

Command Name: internet_hizi
Function: Measures your Ping with Download and Upload Mbps'.

Command Name: bilgilendirme_olustur
Function: Creates a Windows notification with a duration you want.

Command Name: qr_kod_olustur
Function: Creates a QR code that directs you to a url you want.

Command Name: sifre_olustur
Function: Creates a password that includes letters and/or symbols you want with a length of your preference.

Command Name: coronavirus
Function: Brings data about COVID-19.

Command Name: eksi_sozluk
Function: Collects and stores data from a headline from Ekşi Sözlük platform.

Developer

Arda Uzunoğlu - ardauzunoglu

Further Notes

Error handling can and should be improved.

Various and better commands are on the way. Stay tuned!

Latest Update: 16 October 2020

Amaç

Bernard gTTS kullanılarak geliştirilen bir sesli asistan. Verdiğiniz basit, belli başlı görevleri gerçekleştirir.

Kullanılan Kütüphaneler

  • datetime
  • time
  • speedtest
  • playsound
  • speech_recognition
  • sqlite3
  • pytz
  • smtplib
  • requests
  • wikipedia
  • pyqrcode
  • random
  • pandas
  • covid
  • win10toast
  • gtts
  • selenium

Gereksinimler

Yukarıdaki kütüphaneleri konsolda "pip install xxxxx" komudu ile kurmalısınız.

'Other Files'daki dosyalar Python path'inizde olmalı.

ChromeDriver'ı kurmalısınız ve konumu "C:\Program Files (x86)\chromedriver.exe" olmalı.

ChromeDriver'ı İndir

JSON dosyaları Python'ın path'inde olmalı.

Python path'i hakkında daha fazlası

Gerekli JSON dosyası 1 - credentials.json

'Enable the Google Calendar API' butonuna tıklayın.

Bir proje seçin ya da yeni bir proje oluşturun. Next butonuna tıklayın.

Desktop app'i seçin. Create butonuna tıklayın.

'DOWNLOAD CLIENT CONFIGURATION' butonuna tıklayın.

Needed JSON file 2 - client_secret.json

Kimlik bilgilerine tıklayın.

'Kimlik bilgisi oluştur' butonuna tıklayın.

OAuth işlemci kimliğini seçin.

Uygulama türü olarak masaüstü uygulamasını seçin. 'Oluştur' butonuna tıklayın.

Oluşturduğunuz yeni işlemci kimliğinin yanındaki indirme ikonuna tıklayın.

Komutlar - Bernard neler yapabilir?

Komut Adı: tarih
İşlev: Sorduğunuz günün tarihini söyler.
Örnek: 15 gün sonrasının tarihi ne?

Komut Adı: netflix
İşlev: Açmak istediğiniz içeriği sorar ve Netflix'in websitesine girerek o içeriği oynatır.

Komut Adı: spotify
İşlev: Spotify'ın web player'ına girerek herhangi bir cihazda dinlediğiniz en son şarkıyı oynatır.

Komut Adı: yemeksepeti
İşlev: Sipariş etmek istediğiniz restoranı ve o restorandan sipariş edeceğiniz üç parçayı -daha azını da sipariş edebilirsiniz- sorar ve Yemeksepeti üzerinden sipariş verir.

Komut Adı: gmail
İşlev: Alıcının eposta adresini, epostanın başlığını ve göndermek istediğiniz mesajı sorar ve verdiğiniz bilgiler doğrultusunda eposta gönderir.

Komut Adı: youtube
İşlev: Açmak istediğiniz videoyu sorar, arama yapar ve arama sonucu çıkan ilk videoyu açar. Eğer arama sonucu çıkan ilk şey bir kanalsa, o kanalın videolar sekmesini açar.

Komut Adı: google
İşlev: İstediğiniz herhangi bir şeyi Google'lar ve çıkan sonuç ister bir açıklama, ister bir vikipedi barı, ister bir youtube videosu, ister sıradan bir bağlantı olsun, bu sonucu döndürür ve sana söyler. Eğer çıkan ilk sonuç bir youtube videosu ise o videoyu açar.

Komut Adı: ceviri
İşlev: Türkçe'den, İngilizce, Almanca ya da İspanyolca dillerinden istediğinize kelime çevirisi yapar.

Komut Adı: etkinlik_goster
İşlev: Google Calendar üzerinden istediğiniz gün sayısı içerisindeki etkinliklerinizi gösterir.

Komut Adı: etkinlik_ekle
İşlev: Google Calendar'a verdiğiniz bilgiler doğrultusunda yeni bir etkinlik ekler.

Komut Adı: doviz_cevir
İşlev: 50'den fazla para birimi arasında çeviri yapar.

Komut Adı: hava_durumu
İşlev: Hem içinde bulunduğunuz hem de 14 gün içerisinde istediğiniz bir günün hava durumunu gösterir.

Komut Adı: vikipedi
İşlev: Vikipedi üzerinde yapacağınız herhangi bir aramayı bu komut ile gerçekleştirebilirsiniz. Bernard yaptığınız aramanın sonuçlarını getirir.

Komut Adı: whatsapp
İşlev: Bernard, kime mesaj göndereceğinizi ve göndereceğiniz mesajı sorar ve mesajı gönderir.

Komut Adı: internet_hizi
İşlev: Pinginiz ile Yükleme ve İndirme Mbps'lerinizi ölçer.

Komut Adı: bilgilendirme_olustur
İşlev: İstediğiniz kadar sürecek bir Windows bildirimi oluşturur.

Komut Adı: qr_kod_olustur
İşlev: İstediğiniz bir url'ye yönlendirecek bir QR kod oluşturur.

Komut Adı: sifre_olustur
İşlev: İstediğiniz harfleri barındıracak şekilde, istediğiniz uzunlukta bir şifre oluşturur.

Komut Adı: coronavirus
İşlev: COVID-19 hakkında veri getirir.

Komut Adı: eksi_sozluk
İşlev: Ekşi Sözlük platformundaki bir başlıktan veri çeker ve depolar.

Geliştirici

Arda Uzunoğlu - ardauzunoglu

İlave Notlar

Hata ayıklaması daha iyi yapılabilir/yapılmalı.

Çeşitli ve daha iyi komutlar yolda. Takipte kalın!

Son Güncelleme: 16 Ekim 2020