---
title: "Speaking Clock GNU/Linux"
description: "Python Code Prerequisite:pyttsx #!/usr/bin/env python import pyttsx import time engine = pyttsx.init() rate = — Scribe notes."
url: "https://h3manth.com/scribe/speaking-clock-gnulinux/"
canonical_url: "https://h3manth.com/scribe/speaking-clock-gnulinux/"
markdown_url: "https://h3manth.com/scribe/blog/speaking-clock-gnulinux.md"
publishDate: "2010-08-05T00:00:00.000Z"
author: "Hemanth HM"
category: "python"
tags: ["python","ubuntu","bash","web"]
word_count: 66
reading_time_minutes: 1
x_markdown_tokens: 278
content_signal: "ai-train=yes, search=yes, ai-input=yes"
---

# Speaking Clock GNU/Linux

> Python Code Prerequisite:pyttsx #!/usr/bin/env python import pyttsx import time engine = pyttsx.init() rate = — Scribe notes.

**Python Code** _Prerequisite:_[pyttsx](http://pypi.python.org/pypi/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:** ****
