Speaking Clock GNU/Linux
Python Code Prerequisite:pyttsx
#!/usr/bin/env python
import pyttsx
import time
engine = pyttsx.init()
rate = engine.getProperty('rate')
engine.setProperty('rate', rate-50)
localtime = time.localtime(time.time())
h=localtime.tm_hour
m=localtime.tm_min
time="Time now is %s hours %s minutes" %(h,m)
engine.say(time)
engine.runAndWait()
You must here something like:****
<source src="http://www.h3manth.com/sites/files/time.ogg" />
BASH Prerequisite: espeak : sudo apt-get install espeak
#!/bin/bash
echo "Time now is $(date +%-l) $(date +%p)" \
| espeak
You must here something like: ****
#javascript#linux
About Hemanth HM
Hemanth HM is a Sr. Machine Learning Manager at PayPal, Google Developer Expert, TC39 delegate, FOSS advocate, and community leader with a passion for programming, AI, and open-source contributions.