"How make Something like alexa" Code Answer's
You're definitely familiar with the best coding language Whatever that developers use to develop their projects and they get all their queries like "How make Something like alexa" answered properly. Developers are finding an appropriate answer about How make Something like alexa related to the Whatever coding language. By visiting this online portal developers get answers concerning Whatever codes question like How make Something like alexa. Enter your desired code related query in the search bar and get every piece of information about Whatever code related question on How make Something like alexa.
How make Something like alexa
import os
import time
import webbrowser
from datetime import date
import playsound
import speech_recognition as sr
from gtts import gTTS
import wikipedia
from datetime import datetime
WAKE = 'Sam'
def speak111(text):
tts = gTTS(text=text, lang="en")
filename = "b.mp3"
playsound.playsound(filename)
def speak1000(text):
tts = gTTS(text=text, lang="en")
filename = "bbvhdzdzhuif.mp3"
tts.save(filename)
playsound.playsound(filename)
def speak100(text):
tts = gTTS(text=text, lang="en")
filename = "bumakdg.mp3"
playsound.playsound(filename)
def speak12(text):
tts = gTTS(text=text, lang="en")
filename = "dck.mp3"
playsound.playsound(filename)
def speak2(text):
tts = gTTS(text=text, lang="en")
filenam = "vo.mp3"
playsound.playsound(filenam)
def speak3(text):
tts = gTTS(text=text, lang="en")
filenam = "voi.mp3"
playsound.playsound(filenam)
def speak4(text):
tts = gTTS(text=text, lang="en")
filenam = "voic.mp3"
playsound.playsound(filenam)
def speak5(text):
tts = gTTS(text=text, lang="en")
filename = "voic.mp3"
playsound.playsound(filename)
def speak1(text):
tts = gTTS(text=text, lang="en")
filename = "voice1.mp3"
playsound.playsound(filename)
def get_audio():
r = sr.Recognizer()
with sr.Microphone() as source:
audio = r.listen(source)
said = ""
try:
said = r.recognize_google(audio)
print(said)
except Exception as e:
said = None
return said
def speak(text):
tts = gTTS(text=text, lang="en")
filename = "v.mp3"
tts.save(filename)
playsound.playsound(filename)
while True:
text = get_audio()
if text is not None:
if "hello" == text:
speak("hello, how are you?")
print("hello, how are you?")
elif "what is your name" == text:
speak2("My name is Sam")
print("My name is Sam")
elif 'open YouTube' == text:
webbrowser.open_new_tab('https://www.youtube.com/')
elif 'tell me the news' == text:
webbrowser.open_new_tab('https://www.bbc.co.uk/newsround')
elif 'open my maps' == text:
webbrowser.open_new_tab('https://www.mymaths.co.uk/')
elif 'open HW' == text:
webbrowser.open_new_tab('https://www.satchelone.com/todos/issued')
elif 'open mail' == text:
webbrowser.open_new_tab('https://outlook.office365.com/mail/inbox')
elif 'what is the weather' == text or 'tell me the weather' == text or 'tell me the weather in barkingside' == text:
webbrowser.open_new_tab(
'https://www.google.com/search?q=weather&oq=weather&aqs=chrome..69i57j0j69i59l2j0l4.2886j1j7&sourceid=chrome&ie=UTF-8')
elif 'open' == text:
webbrowser.open('https://www.google.com/search?q=gmail')
elif 'tell me the time' == text:
now = datetime.now()
current_time = now.strftime("%H:%M")
print("Current Time =", current_time)
speak('the time is' + current_time)
elif 'tell me the date' == text or 'what is the time' == text:
today = date.today()
print("Today's date:", today)
elif 'Google' in text:
speak12('searching Google')
print('searching Google')
text = text.replace(' on Google', '')
webbrowser.open_new_tab('https://www.google.com/search?q={}'.format(text))
elif 'YouTube' in text:
speak111('searching Youtube')
print('searching Youtube')
text = text.replace('on YouTube', '')
webbrowser.open_new_tab('https://www.Youtube.com/search?q={}'.format(text))
elif 'play' in text:
speak111('searching Youtube')
print('searching Youtube')
text = text.replace('play', '')
webbrowser.open_new_tab('https://www.Youtube.com/search?q={}'.format(text))
elif 'Wikipedia' in text:
speak3('searching wikipedia')
print('searching wikipedia')
text = text.replace('wikipedia', '')
results = wikipedia.summary(text, sentences=2)
speak4(results)
print(results)
All those coders who are working on the Whatever based application and are stuck on How make Something like alexa can get a collection of related answers to their query. Programmers need to enter their query on How make Something like alexa related to Whatever code and they'll get their ambiguities clear immediately. On our webpage, there are tutorials about How make Something like alexa for the programmers working on Whatever code while coding their module. Coders are also allowed to rectify already present answers of How make Something like alexa while working on the Whatever language code. Developers can add up suggestions if they deem fit any other answer relating to "How make Something like alexa". Visit this developer's friendly online web community, CodeProZone, and get your queries like How make Something like alexa resolved professionally and stay updated to the latest Whatever updates.