АР
Size: a a a
АР
АР
АР
СИ
def listen():
while True:
data = stream.read(4000, exception_on_overflow=False)
if (rec.AcceptWaveform(data)) and (len(data) > 0):
answer = json.loads(rec.Result())
if answer["text"]:
print('ок')
yield answer["text"]
для нее есть это
for text in listener():
if text == 'сделать скриншот' or text == "сделай скриншот" :
try:
os.startfile(r'C:\Windows\System32\SnippingTool.exe')
except:
pygame.mixer.init()
s = pygame.mixer.Sound(PATH_TO_WAVnotfiles + random.choice(notfiles))
s.play()
print('файл не найден')
и есть простое окно class Example(QWidget):
def __init__(self):
super().__init__()
self.initUI()
def initUI(self):
self.setGeometry(300, 300, 300, 220)
self.setWindowTitle('Icon')
self.setWindowIcon(QIcon('web.png'))
self.show()
if __name__ == '__main__':
app = QApplication(sys.argv)
ex = Example()
sys.exit(app.exec_())СИ
𝖋
СИ
СИ
𝖋
𝖋
СИ
𝖋
СИ
F