Answer the question
In order to leave comments, you need to log in
When you run the exe, it immediately crashes, although there is an input () how to fix it?
I compile the file in the py extension to exe and when the exe is launched , it immediately crashes, although there is a input()
way to fix it?
<br>
import time<br>
from os import *<br>
import playsound<br>
import pyttsx3<br>
import speech_recognition as sr<br>
speak_engine = pyttsx3.init()<br>
def speak(what):<br>
print(what)<br>
speak_engine.say(what)<br>
speak_engine.runAndWait()<br>
speak_engine.stop()<br>
def my_alarm():<br>
speak("На сколько минут ставим будильник")<br>
r1 = sr.Recognizer()<br>
with sr.Microphone(device_index=1) as source:<br>
s = r1.listen(source)<br>
voice1 = r1.recognize_google(s, language="ru-RU").lower()<br>
time.sleep(int(voice1)*60)<br>
playsound.playsound('C:\\Users\\'+str(getlogin())+'\\Desktop\\Music\\Imagine Dragons - Believer.mp3')<br>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question