Get the Computer to Speak on Wake-Up


  1. Posts : 18,044
    Win 10 Pro 64-bit v1909 - Build 18363 Custom ISO Install
       #1

    Get the Computer to Speak on Wake-Up


    For a bit of fun, I want the computer to say Hello Paul EACH time I wake up the computer from sleep.

    So for example, I will put the following Wake_Up_Message.vbs Script in %SystemDrive% . . .

    Code:
    
    Dim SpeechObject
    Set SpeechObject=CreateObject("SAPI.SPVoice")
    WScript.Sleep 2500
    SpeechObject.Speak "Hello Paul."

    Is this possible using something like Task Scheduler ?

    I do NOT want to automatically wake up the computer or anything like that, and I want to do this WITHOUT any amendment to the Wake Timers.

    As a side note, I already have 20 seconds of the 'The X-Files' music and some speech play over the music when I Boot or Restart [ I rarely do this as I usually use Sleep ], along with speech in some of my Script files. I just thought that it would also be a bit of fun to have the above for wake up.
    Last edited by Paul Black; 04 Feb 2023 at 18:40.
      My Computer


  2. Posts : 3,275
    Win10
       #2

    I think this may be the easiest route to follow:

    Open Event Viewer > System and look for "PowerTrouble-Shooter" "EventID 1" which appears to logged as soon as one resumes the PC from sleep or Hibernation.

    On the actions menu on the right hand side of Event Viewer, click "Attach A Task To This Log" and follow the Wizard.

    CORRECTION:
    On right hand side of Event Viewer : Attach to the EVENT not LOG.
    On the actions menu on the right hand side of Event Viewer, click "Attach A Task To This EVENT" and follow the Wizard.
    Last edited by das10; 05 Feb 2023 at 04:56. Reason: Correction.
      My Computers


  3. Posts : 18,044
    Win 10 Pro 64-bit v1909 - Build 18363 Custom ISO Install
    Thread Starter
       #3

    Thanks @das10,

    That worked except it just said Paul straight away, and then there was the required delay and it said Hello Paul.

    I just needed to amend the Script to . . .

    Code:
    
    Dim SpeechObject
    Set SpeechObject=CreateObject("SAPI.SPVoice")
    SpeechObject.Speak ""
    WScript.Sleep 2500
    SpeechObject.Speak "Hello Paul."

    . . . and it works.

    However, I am now getting random Hello Paul's very occasionally.

    I will investigate this further tomorrow.
    Last edited by Paul Black; 04 Feb 2023 at 21:13.
      My Computer


  4. Posts : 18,044
    Win 10 Pro 64-bit v1909 - Build 18363 Custom ISO Install
    Thread Starter
       #4

    Paul Black said:
    However, I am now getting random Hello Paul's very occasionally.
    I think the reason for the above could be due to the fact that Event ID 1 is NOT ONLY Power-Troubleshooter . . .

    Code:
    
    Keywords Date and Time          Source               Event ID Task Category
    
    	 04/02/2023 16:18:49	Power-Troubleshooter        1 None
    	 05/02/2023 06:03:31	Power-Troubleshooter	    1 None
    Time	 03/02/2023 21:23:47	Kernel-General              1 (5)
    	 05/02/2023 06:02:30	Power-Troubleshooter        1 None
    	 03/02/2023 21:23:51	Power-Troubleshooter        1 None
    Time	 05/02/2023 06:04:09	Kernel-General              1 (5)
    	 05/02/2023 06:05:28	Power-Troubleshooter        1 None
    Time	 03/02/2023 17:24:04	Kernel-General              1 (5)
    Time	 05/02/2023 06:05:24	Kernel-General              1 (5)
    	 05/02/2023 06:04:13	Power-Troubleshooter        1 None
    	 03/02/2023 17:24:08	Power-Troubleshooter        1 None
    Time	 04/02/2023 19:20:05	Kernel-General              1 (5)
    	 04/02/2023 19:20:08	Power-Troubleshooter        1 None
    	 31/01/2023 18:59:21	FilterManager               1 None
    Time	 04/02/2023 16:20:56	Kernel-General              1 (5)
    	 04/02/2023 16:21:00	Power-Troubleshooter        1 None
    Time	 04/02/2023 16:18:45	Kernel-General              1 (5)
    	 05/02/2023 06:01:49	Power-Troubleshooter        1 None
    Time	 05/02/2023 06:02:26	Kernel-General              1 (5)
    Time	 05/02/2023 06:01:46	Kernel-General              1 (5)
    Time	 05/02/2023 06:00:18	Kernel-General              1 (5)
    	 05/02/2023 06:00:22	Power-Troubleshooter        1 None
    Time	 05/02/2023 06:06:05	Kernel-General              1 (5)
    	 05/02/2023 06:13:43	Power-Troubleshooter        1 None
    Time	 05/02/2023 06:07:59	Kernel-General              1 (5)
    Time	 05/02/2023 06:03:27	Kernel-General              1 (5)
    	 05/02/2023 06:07:16	Power-Troubleshooter        1 None
    	 03/02/2023 14:36:06	Power-Troubleshooter        1 None
    	 05/02/2023 06:08:03	Power-Troubleshooter        1 None
    Time	 05/02/2023 06:13:39	Kernel-General              1 (5)
    	 02/02/2023 19:53:09	Power-Troubleshooter        1 None
    	 02/02/2023 13:50:35	Power-Troubleshooter        1 None
    Time	 02/02/2023 19:53:07	Kernel-General              1 (5)
    Time	 03/02/2023 14:36:02	Kernel-General              1 (5)
    Time	 05/02/2023 06:07:12	Kernel-General              1 (5)
    	 01/02/2023 14:46:17	Power-Troubleshooter        1 None
    	 05/02/2023 06:06:09	Power-Troubleshooter        1 None
    Time	 01/02/2023 14:46:13	Kernel-General              1 (5)
    Time	 02/02/2023 13:50:30	Kernel-General              1 (5)
    
    
    
      My Computer


  5. Posts : 776
    Windows 7
       #5

    Try System / KernelPower / Event ID 107?
      My Computer


  6. Posts : 16,952
    Windows 10 Home x64 Version 22H2 Build 19045.4170
       #6

    Paul,

    If you attach the task to the event
    Log - System
    Source - Power-Troubleshooter
    EventID - 1
    or
    Log - System
    Source - Kernel-Power
    EventID - 131
    then it will only trigger on resuming from a lower power state [S3 Sleep or Hibernation].
    - In your previous attempt, you did not constrain it to just the System log which is why you got those other EventID 1 entries messing you about.
    - Task scheduler creates the tasks by default in Task scheduler (Local), Task scheduler library, Event viewer tasks.
    - You might also like to check Task scheduler to disable or delete any earlier tasks you created during these experiments.
    - Once you have located the task, you can edit it in Task scheduler. There is no need to use Event viewer every time although it can be convenient to use it again if you want to do major changes [to replace the existing task].

    I routinely monitor power state transitions in an Event viewer, Custom view and I have not found any other events to mark them.
    Import Event viewer, Custom views - Power state transitions - my post #4 - TenForums
    One method of seeing if there is anything else to monitor is to use my suggested Custom view, note down some sample times of resuming then find those times in the overall view given in the built-in Custom view Administrative events [which is a posh term for All] & see if there's anything that happens close to them at every resume.
    - When doing investigations such as this you might find it useful to run Event viewer twice [it is perfectly happy to do be run multiple times] so you can keep one view on the right & another on the left.
    - You can also export the built-in Custom view Administrative events view definition [right-click, Export] then import it with a slightly different name.
    - - The imported version can be filtered whereas the original can not.
    - - I add the computer name to my imported versions to remind me that they cannot be exported and transferred to my other computers. Each Administrative events view definition is unique to each computer.


    All the best,
    Denis
    Last edited by Try3; 05 Feb 2023 at 07:16.
      My Computer


  7. Posts : 23,281
    Win 10 Home ♦♦♦19045.4355 (x64) [22H2]
       #7

    Paul Black said:
    Thanks @das10,

    That worked except it just said Paul straight away, and then there was the required delay and it said Hello Paul.

    I just needed to amend the Script to . . .

    Code:
    
    Dim SpeechObject
    Set SpeechObject=CreateObject("SAPI.SPVoice")
    SpeechObject.Speak ""
    WScript.Sleep 2500
    SpeechObject.Speak "Hello Paul."

    . . . and it works.

    However, I am now getting random Hello Paul's very occasionally.

    I will investigate this further tomorrow.



    I looked around for this, for when you're ready...




    Get the Computer to Speak on Wake-Up-hal9000-red-lens.png
      My Computer


  8. Posts : 18,044
    Win 10 Pro 64-bit v1909 - Build 18363 Custom ISO Install
    Thread Starter
       #8

    Thanks garlin, Try3, and das10,

    I deleted what I had previously done [ I ONLY had ONE instance ] and started again using the same Script as in Post #3 against Event ID 1, and after 5 hours, all is well, NO random speech messages so far.

    I have also created a Hybrid CMD / PowerShell Script as a backup [ in case the one above fails ] that also changes the volume to 60% pre-speech.
    Last edited by Paul Black; 05 Feb 2023 at 08:46.
      My Computer


  9. Posts : 16,952
    Windows 10 Home x64 Version 22H2 Build 19045.4170
       #9

    Paul Black said:
    ... started again using the same Script as in Post #3 against Event ID 1, and after 5 hours, all is well, NO random speech messages.
    Paul,

    I assume that's just from the System log, Power-Troubleshooter.
    Or those other event 1's you witnessed earlier can re-occur when they feel like it.


    All the best,
    Denis
      My Computer


  10. Posts : 18,044
    Win 10 Pro 64-bit v1909 - Build 18363 Custom ISO Install
    Thread Starter
       #10

    Hello Denis,

    Try3 said:
    I assume that's just from the System log, Power-Troubleshooter.
    That's weird, I answered you earlier shortly after your post, but the post seems to have disappeared.

    Anyway, the answer is YES to your question, and I have still NOT had ANY random speech messages ALL day.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 14:19.
Find Us




Windows 10 Forums