KnowBrainer Speech Recognition
Decrease font size
Increase font size
Topic Title: Can I put Windows to sleep by voice?
Topic Summary:
Created On: 09/15/2020 10:35 AM
Status: Post and Reply
Linear : Threading : Single : Branch
 Can I put Windows to sleep by voice?   - brooklyn cabin - 09/15/2020 10:35 AM  
 Can I put Windows to sleep by voice?   - Lunis Orcutt - 09/15/2020 11:53 AM  
 Can I put Windows to sleep by voice?   - Edgar - 09/15/2020 03:24 PM  
 09/15/2020 10:35 AM
User is offline View Users Profile Print this message

Author Icon
brooklyn cabin
Top-Tier Member

Posts: 299
Joined: 02/01/2013

Hi, I would like to be able to have Windows hibernate at the end of the day, for instance. Right now, if I say the command "Hibernate Windows" my microphone shuts off but Windows stays on. Is there way to make Windows hibernate by voice?



















 09/15/2020 11:53 AM
User is online View Users Profile Print this message

Author Icon
Lunis Orcutt
Top-Tier Member

Posts: 38006
Joined: 10/01/2006

Your computer is running too slow to finish this KnowBrainer command. You'll have to add a wait time. Begin by saying Edit Command Hibernate and changing the script to the following but note that waiting 2 seconds may be overkill. You can probably get away with Wait 0.5:

Sub Main
SetMicrophone 0
TTSPlayString "sleeping"
Wait 2
ShellExecute "shutdown /h"
End Sub


Forum Mission Statement
Trial Downloads
(615) 884-4558 ext 1

 09/15/2020 03:24 PM
User is offline View Users Profile Print this message

Author Icon
Top-Tier Member

Posts: 915
Joined: 04/03/2009

Originally posted by: Lunis Orcutt  You can probably get away with Wait 0.5

TTSPlayString is a tricky coding statement. If it is the very last (or only) statement in the script you don't need to wait after it. However, if it occurs such that there are other statements following it you must wait as long as the built-in text-to-speech reader takes to utter the phrase. If you're a musician you can start beating out 120 BPM (standard American march tempo) with your toe, utter the phrase while counting beats on your fingers - if you are counting in 2 (1 and 2 and 3 and…) each whole beat will be about 1 second; add a half second just be on the safe side.


DPI 15.3, 64-bit Windows 10 Pro, OpenOffice & Office 365, Norton Security, Shure X2U XLR to USB mic adapter with Audio Technica DB135 vocal mic, Asus X299-Deluxe Prime, Intel Core i9-7940X (14 core, 4.3 GHz overclocked to 4.9 GHz), G.SKILL TridentZ Series 64GB (4 x 16GB) DDR4 3333 (PC4 26600) F4-3333C16Q-64GTZ, NVIDIA GIGABYTE GeForce GTX 1060 GV-N1060G1 GAMING-6GD REV 2.0 6GB graphics card with 3 1920x1080 monitors

31794 users are registered to the KnowBrainer Speech Recognition forum.
There are currently 1 users logged in.
The most users ever online was 12124 on 09/09/2020 at 04:59 AM.
There are currently 606 guests browsing this forum, which makes a total of 607 users using this forum.

FuseTalk Standard Edition v4.0 - © 1999-2020 FuseTalk™ Inc. All rights reserved.