MOHAN KRISHNA

0 %
Mohan Krishna
Multimedia Professional
Ai & ML Researcher & Enthusiast
  • Residence:
    India
  • City:
    Vijayawada
  • Age:
    46
AI/ML Enthusiast. New Media Trainer, VFX Artist, Non Linear Video Editor, Graphic Designer, Sound Editor and iOS App Designer.
Telugu
English
Hindi
Tamil
Proficiency:
Graphic Design
Web Design
Video & VFX
Machine Learning
Artificial Intelligence
Digital Marketing
Areas of Interest:
Take a look at some of the things I love working on.
  • Non Linear Video Editing
  • Graphic Design
  • Web Design
  • Audio Editing
  • Content Management Systems
  • Python
  • Deep Learning
  • OpenCV
  • Image Classification

News Updater With Voice

October 29, 2022
from newsapi import NewsApiClient
import pyttsx3
import speech_recognition as sr
from time import sleep
# http://www.pillalamarri.in/python/news-updater-with-voice/
engine = pyttsx3.init('sapi5')
voices = engine.getProperty('voices')
engine.setProperty('voice',voices[1].id)

def speak(audio):
    engine.say(audio)
    engine.runAndWait()


def new():
    newsapi = NewsApiClient(api_key='')# Add your api key
    data = newsapi.get_top_headlines(q='corona',country='in',
                                      language='en',
                                      page_size=5)

    at = data['articles']

    for x,y in enumerate(at):
        print(f'{x} {y["description"]}')
        speak(f'{x} {y["description"]}')
        
    speak("that's it for now i'll updating you in some time ")



if __name__ == "__main__":
	while True:
		new()
		sleep(600)
# http://www.pillalamarri.in/python/news-updater-with-voice/
Posted in PythonTags: