This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pyttsx3 | |
import requests | |
import json | |
import time | |
url = ('https://newsapi.org/v2/top-headlines?' | |
'country = in&' | |
'apiKey =') | |
url += 'YOUR_API_KEY_HERE' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import speech_recognition as sr | |
import pyttsx3 | |
import datetime | |
listener = sr.Recognizer() | |
engine = pyttsx3.init() | |
voices = engine.getProperty('voices') | |
engine.setProperty('voice', voices[1].id) | |
rate = engine.getProperty('rate') | |
engine.setProperty('rate', 150) |