Skip to content

Commit cdf6b36

Browse files
authored
Create README.md
1 parent 81f41cc commit cdf6b36

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

Diff for: AutomationScripts/Shut Down PC/README.md

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
## Description:
2+
- Firstly, you have to input your voice command whether you want to shutdown your computer or not.
3+
- If "yes", it will shut down your computer; otherwise, it will not.
4+
5+
## Procedure:
6+
```python
7+
import os
8+
import pyttsx3
9+
import speech_recognition as sr
10+
```
11+
- Then we will define one class, which have three functions namely **takecommands()**, **Speak()**, and **quiteSelf()**.
12+
- **takecommands()**:
13+
- Using **sr.Recognizer()** it will recognise your voice and **sr.Microphone()** for input voice commands.
14+
- Using **r.recognize_google()** it recognizes the language of the user, and check whether the language is **en-in** or not.
15+
- **Speak()**:
16+
- Using **pyttsx3.init('sapi5')** for voice recognition and synthesis.
17+
- Using **engine.getProperty('voices')** for setting voice type and id.
18+
- **runAndWait()** speech recognition Code Answer's. engine. say("I am the text spoken after changing the speech rate.")
19+
- **quitSelf**:
20+
- Method to self shut down system.
21+
22+
## Sample Output:

0 commit comments

Comments
 (0)