F
F
Foxrey2020-08-24 21:28:26
Python
Foxrey, 2020-08-24 21:28:26

The program should say Hello world, but it throws an error?

import speech_recognition
import os
import sys
import webbrowser

words = "Hello world!"
def talk(words):
    print(words)
    os.system("say " + words)
talk(words)

Answer the question

In order to leave comments, you need to log in

4 answer(s)
P
PavelMos, 2020-08-24
@PavelMos

1) format it as code so that the indents are visible
2) what is the error? The code is being executed, the "say..." command in the system is being executed

import os
import sys
import webbrowser
words = "Hello world!"
def talk(words):
    print(words)
os.system("say " + words)
talk(words)
'say' is not recognized as an internal or external command,
operable program or batch file.
Hello world!

U
usb7191, 2015-06-13
@usb7191

I found the answer myself =) It's not the mint that hangs, but the x's (only from the touchpad), the glitch is removed by going to the console and back (Ctrl + Alt + F1 - Ctrl + Alt + F8). The prime suspect is the NVIDIA driver. xn--h1aafched3ame.xn--p1ai/forum/thread180.html

N
Nathan Stark, 2015-06-13
@MattLe

Faced with such a dilemma, the answer is "what the hell?" I never found it, switched to debian...

M
mureevms, 2015-06-13
@mureevms

This is definitely a bug. I have the same bug. Occurs when a window is maximized to full screen. Not constantly, but intermittently. Sometimes it hangs a lot, for about a minute nothing can be done.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question