Make Windows speak out the time every hour

We have already seen how we can make Windows welcome us with an audio voice message during logon. Using the same commands, we will see how we can make Windows 10 / 8 / 7 tell us the time every hour. This can be especially useful if you tend to lose track of time while working.

Make Windows speak out the time

First open Notepad and copy-paste the following:

Dim speaks, speech 
speaks=hour(time) 
Set speech=CreateObject("sapi.spvoice") 
speech.Speak speaks

Save it as a .vbs file. If you wish, you can download the ready-to-use file by clicking here.

Next type schedule tasks in search and click on the schedule tasks result, to open the Task Scheduler.

ts-1

Under Action, select Create Task. Give the task a name. I have given it SpeakTime.

speak-time

Set the Trigger parameters as shown in the image. One time – Start date & time, Repeat task every 1 hour, Duration – Indefinitely, and so on.

ts-2

Under Actions, click New button. The New Action box will open. Select the action Start a program and browse to the vbs file to set the path.

ts-4

You may change the change some parameters under the Conditions and Settings tabs – else you may leave them at their defaults.

Click OK and Exit.

Now every hour, Windows or rather Microsoft David will speak out the time to you…11…12…! If you don’t like Microsoft David, you may opt to hear the voice of Microsoft Hazel or Microsoft Zira instead, via Control Panel > Text to Speech tab under Speech Properties. You can also Make Windows Talk to you!

This will of course work on Windows 7 and earlier versions too.

Posted by on , in Category Windows with Tags
Anand Khanse is the Admin of TheWindowsClub.com, a 10-year Microsoft MVP Awardee in Windows (2006-16) & a Windows Insider MVP. Please read the entire post & the comments first, create a System Restore Point before making any changes to your system & be careful about any 3rd-party offers while installing freeware.

26 Comments

  1. aguynamedruchir

    Awesome tutorial!

    I modified this one a bit to say “It is x o’clock AM/PM” (converted to 12-hour clock instead of the default 24 hour). Also made it say “ten” instead of “one zero”.

    ————Here’s my version of the script————

    Dim speaks, speech
    hour_now=hour(time)
    if hour_now > 12 Then
    hour12 = hour_now – 12
    ampm = “PM”
    Else
    hour12 = hour_now
    hourfinal = hour_now
    ampm = “AM”
    End If
    If hour12 = 10 Then
    hourfinal = “Ten”
    Elseif hour12 = 11 Then
    hourfinal = “Eleven”
    Elseif hour12 = 12 Then
    hourfinal = “Twelve”
    Elseif hour12 = 0 Then
    hourfinal = “Twelve”
    Elseif hour12 > 0 and hour12 < 10 Then
    hourfinal = hour12
    End If
    speaks = "It is " & hourfinal & " o clock " & ampm
    Set speech=CreateObject("sapi.spvoice")
    speech.Speak speaks

  2. aguynamedruchir

    Awesome tutorial!

    I modified this one a bit to say “It is x o’clock AM/PM” (converted to 12-hour clock instead of the default 24 hour). Also made it say “ten” instead of “one zero”.

    ————Here’s my version of the script (fixed)————

    Dim speaks, speech
    hour_now=hour(time)
    if hour_now > 12 or hour_now = 12 Then
    hour12 = hour_now – 12
    ampm = “PM”
    Else
    hour12 = hour_now
    hourfinal = hour_now
    ampm = “AM”
    End If
    If hour12 = 10 Then
    hourfinal = “Ten”
    Elseif hour12 = 11 Then
    hourfinal = “Eleven”
    Elseif hour12 = 12 Then
    hourfinal = “Twelve”
    Elseif hour12 = 0 Then
    hourfinal = “Twelve”
    Elseif hour12 > 0 and hour12 < 10 Then
    hourfinal = hour12
    End If
    speaks = "It is " & hourfinal & " o clock " & ampm
    Set speech=CreateObject("sapi.spvoice")
    speech.Speak speaks

  3. That’s even better, then. Thanks for sharing! 🙂

  4. Not-A-Liberal-Idiot

    I forgot to mention you can switch the commented out lines and have it say “O’Clock” as well.

  5. Not-A-Liberal-Idiot

    Damn, I have been using this (script below in previous post) for more than a year and it always said “ten” properly. I just built a new PC this past week and only an hour ago imported the script from my old PC. I had been running the original RTM version of Windows 8.0. A few days ago I bought a brand new copy of Windows 8.1 Pro from Best Buy and now my script says “one-zero” at ten O’clock like some of you have mentioned. When I saw others mention this I thought to change the time and try it for the first time on my new PC. Here is a fixed version. Use the XML script in my earlier post to import into task Scheduler to automatically create the task. Again, place both files in your User Home directory (i.e. C:UsersCharlie)

    ‘ CurrentHour.vbs

    Dim speaks, speech
    Set speech=CreateObject(“sapi.spvoice”)

    If Hour(Time)=0 Then
    ‘ speech.Speak “It is twelve o’clock A M”
    speech.Speak “It is twelve A M”

    ElseIf Hour(Time)=10 Then
    ‘ speech.Speak “It is ten o’clock P M”
    speech.Speak “It is ten P M”

    ElseIf Hour(Time)=12 Then
    ‘ speech.Speak “It is twelve o’clock P M”
    speech.Speak “It is twelve P M”

    ElseIf Hour(Time)12 Then
    ‘ speech.Speak “It is ” & Hour(Time) Mod 12 & ” o’clock P M”
    speech.Speak “It is ” & Hour(Time) Mod 12 & “P M”
    End If

  6. Not-A-Liberal-Idiot

    After running this newer script for nearly a day on my new PC build I noticed it now pronounces all the double-digit hours incorrectly. Repairing the “10” was not enough. There is a distinct difference between the older Windows 8 and the newer Windows 8.1 in how this works. Leave it to Microsoft to screw things up. I’ve been a heavy Windows user since Version Beta 1.0 back in the 1980’s. Microsoft has a knack for shooting themselves and others in the foot. So much for my elegant code.

  7. Not-A-Liberal-Idiot

    Last time. (I hope)
    ———————-

    ‘ CurrentHour.vbs

    Dim speaks, speech
    Set speech=CreateObject(“sapi.spvoice”)

    If Hour(Time)=0 Then
    ‘ speech.Speak “It is twelve o’clock A M”
    speech.Speak “It is twelve A M”

    ElseIf Hour(Time)=10 Then
    ‘ speech.Speak “It is ten o’clock A M”
    speech.Speak “It is ten A M”

    ElseIf Hour(Time)=11 Then
    ‘ speech.Speak “It is eleven o’clock A M”
    speech.Speak “It is eleven A M”

    ElseIf Hour(Time)=22 Then
    ‘ speech.Speak “It is ten o’clock P M”
    speech.Speak “It is ten P M”

    ElseIf Hour(Time)=23 Then
    ‘ speech.Speak “It is eleven o’clock P M”
    speech.Speak “It is eleven P M”

    ElseIf Hour(Time)=12 Then
    ‘ speech.Speak “It is twelve o’clock P M”
    speech.Speak “It is twelve P M”

    ElseIf Hour(Time)12 Then
    ‘ speech.Speak “It is ” & Hour(Time) Mod 12 & ” o’clock P M”
    speech.Speak “It is ” & Hour(Time) Mod 12 & “P M”
    End If

  8. Kerene53

    Question: I followed the directions for windows 8 and set it to follow the task every 15 minutes. But now every 15 minutes a pop up comes up saying “How would you like to open this file?”, so its not pronouncing it automatically 🙁 it only does when I click on the file. How do I get this to work? Thanks

  9. Check if you have followed this tutorial correctly. Ensure that scripting is enabled. Ensure .vbs file is set to open with default Windows Script Host. https://www.thewindowsclub.com/windows-script-host-access-is-disabled-on-this-machine

  10. Kerene53

    Thank you. I double checked that I followed the instructions and now when I selected that it open using the Microsoft Windows Script Host I get a pop up saying “the program you have selected cannot be associated with this file type. please choose another program” what should I try now?

  11. Celaztian R Corera

    same thing with me

  12. Celaztian R Corera

    Same here. Did you fix it?! then can tell me

  13. Celaztian R Corera

    It’s not working did everything like you posted

  14. Celaztian R Corera

    if i set every half and hour it’s not announcing the 30. how do i fix that?!! can you help pls

  15. Karanvir

    There you go:

    I used aguynamedruchir’s script, made some changes to tell any time, set it at any interval.

    —-Script—-

    Dim speaks, speech
    hour_now=hour(time)
    min_now=Minute(time)
    if hour_now > 12 or hour_now = 12 Then
    hour12 = hour_now – 12
    ampm = “PM”
    Else
    hour12 = hour_now
    hourfinal = hour_now
    ampm = “AM”
    End If
    If hour12 = 10 Then
    hourfinal = “Ten”
    Elseif hour12 = 11 Then
    hourfinal = “Eleven”
    Elseif hour12 = 12 Then
    hourfinal = “Twelve”
    Elseif hour12 = 0 Then
    hourfinal = “Twelve”
    Elseif hour12 > 0 and hour12 < 10 Then
    hourfinal = hour12
    End If
    speaks = "It's " & hourfinal & " " & min_now & " " & ampm
    Set speech=CreateObject("sapi.spvoice")
    speech.Speak speaks

  16. Dragon Kim

    Hi I’ve been using this script for months and it’s been good. However, I’d like to make 2 changes.
    One is, is there anyway I can add adjusting volume in the script? Lowering system volume didn’t work.
    Also, is it possible to add quiet hours in the script? It would be nice to stop speaking time at after 12 am.
    Please let me know. Thanks.

  17. Jaysen

    I have a problem
    Whenever it’s time to speak it doesn’t.
    It just open a windows that says “How do you want to open this file” and it gives the option to choose between several apps
    and it also happens when I click on the .VBS file
    But when I right click the .VBS file and choose “”open with command prompt” it works just fine and says the time

  18. Ahmad Khan

    This was great help, thanks so much.
    I made a JS version, works same with some enhancements:
    AM/PM, 12 hours. Excludes minutes if 00 and midnight or noon.


    var v = new ActiveXObject("Sapi.SpVoice");
    var voices = v.GetVoices();
    v.Voice = voices.Item(1);
    var d = new Date();
    var H = d.getHours();
    var m = d.getMinutes();
    var text;
    switch (H) {
    case 00:
    {
    text = "Midnight";
    break;
    }
    case 12:
    {
    text = "Noon";
    break;
    }
    default:
    {
    var ap;
    if (H > 12) {
    ap = "PM";
    H -= 12;
    }
    else {
    ap = "AM";
    }
    if ( m 0 )
    m = "o " + m;
    text = m == 00 ? H + " " + ap : H + " " + m + " " + ap;
    }
    }
    v.Speak(text);

  19. Van

    I followed the steps a few weeks ago and all that happens is a window open up that says “How do you want to open this file” and it gives the option to choose between several apps. Only basic options come up and not vbs / script like the other messages on this page. I want to delete the whole thing. I went to task and deleted it but its still popping up every hour and is frustrating. Can someone please tell me how to delete this from my windows computer please. Thanks.

  20. Execute “regsvr32.exe vbscript.dll” in an elevated CMD to re-register the DLL file and see.

    To delete, remove the added Task as well as delete the vbs script file.

  21. Van

    I am not a IT person so I have no idea what this means! 🙂

    Execute “regsvr32.exe vbscript.dll” in an elevated CMD to re-register the DLL file and see.

    Where is the vbs file?

  22. Deepak Dadasaheb Yewle

    Same issue Anand, can you please suggest a solution.

  23. Right-click on Start Button and select Command Prompt (Admin). Then copy-paste regsvr32.exe vbscript.dll in it and hit Enter.

  24. The vbs script is the one you downloaded from here (or created) and saved on your PC. Delete that file.

  25. Jose Manuel Nel Pastel

    You need to add the next code:

    with speech
    Set .voice = .getvoices.item(0)
    .Volume = 100
    .Rate = 0
    end with

    below the line: Set speech=CreateObject(“sapi.spvoice”) it should look like this:

    Set speech=CreateObject(“sapi.spvoice”)
    with speech
    Set .voice = .getvoices.item(0)
    .Volume = 1
    .Rate = 0
    end with
    speech.Speak speaks

  26. SwagadelicBeat

    You need to add the next code:

    with speech
    Set .voice = .getvoices.item(0)
    .Volume = 100
    .Rate = 0
    end with

    below the line: Set speech=CreateObject(“sapi.spvoice”) it should look like this:

    Set speech=CreateObject(“sapi.spvoice”)
    with speech
    Set .voice = .getvoices.item(0)
    .Volume = 100
    .Rate = 0
    end with
    speech.Speak speaks

    Then change the desired value on >> .Volume = 100 << from 0 to 100 percentage

Leave a Reply

Your email address will not be published. Required fields are marked *


9 + 5 =