Skip to content

Instantly share code, notes, and snippets.

View KaushikShresth07's full-sized avatar

Kaushik Shresth KaushikShresth07

View GitHub Profile
from playsound import playsound
import datetime
from time import sleep
def RingerNow(time,Sound):
Alarm_Time = str(time).replace(":","")
Alarm_Tim = str(time)
while True:
import os
import pywhatkit
def Music(Name,Path):
if 'file' in Name:
os.startfile(str(Path))
else:
import speech_recognition as sr
def Listen():
r = sr.Recognizer()
with sr.Microphone() as source:
print(" ")
import pyttsx3 # pip install pyttsx3
Assistant = pyttsx3.init('sapi5')
Voices = Assistant.getProperty('voices')
Assistant.setProperty('voices',Voices[2].id)
Assistant.setProperty('rate',170)
def Say(Audio):
print(f"Assistant : {Audio}")
print(" ")
import pyttsx3
import speech_recognition as sr
import requests
from googletrans import Translator
Api_Key = "KrsOGOZLgYGcxYVBLZld2U65PevfTyOfbdqy7ggK"
engine = pyttsx3.init('sapi5')
voices = engine.getProperty('voices')
import pyttsx3
import requests
from googletrans import Translator
import speech_recognition as sr
engine = pyttsx3.init('sapi5')
voices = engine.getProperty('voices')
engine.setProperty('voice', voices[2].id)
engine.setProperty('rate',180)
import speech_recognition as sr
def TakeCommand():
r = sr.Recognizer()
with sr.Microphone() as source:
print(": Listening....")
import pyttsx3
engine = pyttsx3.init('sapi5')
voices = engine.getProperty('voices')
engine.setProperty('voices',voices[2].id)
def Speak(audio):
print(" ")
print(f": {audio}")
engine.say(audio)
import webbrowser as web
import time
import keyboard
def Message(person,message):
if 'karan' in person:
karan = "+918527353664"
openChat = "https://web.whatsapp.com/send?phone=" + karan + "&text=" + message
web.open(openChat)
import os
import speech_recognition as sr
def takecommand():
command = sr.Recognizer()
with sr.Microphone() as source:
print("Listening......")
command.pause_threshold = 1
audio = command.listen(source)