#๐Ÿ”’ speech recognition Alexa wont work properly and doesn't recognize words

27 messages ยท Page 1 of 1 (latest)

zinc ember
#

my console

Traceback (most recent call last):
  File "F:\Programming\VisualStudio\Python\Projects\Alexa App project\alexa.py", line 84, in <module>
    run_alexa()
  File "F:\Programming\VisualStudio\Python\Projects\Alexa App project\alexa.py", line 39, in run_alexa
    command = take_command()
              ^^^^^^^^^^^^^^
  File "F:\Programming\VisualStudio\Python\Projects\Alexa App project\alexa.py", line 35, in take_command
    return command
           ^^^^^^^
NameError: name 'command' is not defined

Process finished with exit code 1```

it works and says listening but then it cant listen and malfunction and return command without it  being set aka it goes through the function to fast tried to use wait it was of no help.
wintry thistleBOT
#

@zinc ember

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

pine osprey
#

Show your code

zinc ember
#

here

pine osprey
#

!paste

wintry thistleBOT
#
Pasting large amounts of code

If your code is too long to fit in a codeblock in Discord, you can paste your code here:
https://paste.pythondiscord.com/

After pasting your code, save it by clicking the Paste! button in the bottom left, or by pressing CTRL + S. After doing that, you will be navigated to the new paste's page. Copy the URL and post it here so others can see it.

zinc ember
pine osprey
#

You also don't need your global command lines delete them

zinc ember
#

its becaus i havewhat???

#

i dont see anything in your link except my same code nothing changed @pine osprey

pine osprey
#

It's the line I linked to

#

You're getting some exception but you hid it

#

It's highlighted in yellow

zinc ember
#

what is the exeption it used to work...

#

???

#

plus it cant print listening if their is an exception or play the voice

#

so what is happening is it working but it keeps not understanding my words i say open you tube and the listener thinks i said hey google is that a problem with my mic or the speech recognition

pine osprey
#

Remove the try/except: pass

#

And it's going to tell you what's going wrong

zinc ember
#

bro it works

#

I am telling you that it doesnt recognise the words

#

see speech recognition is the problem speech_recognition.exceptions.UnknownValueError

#

it ended up being that i added wait to try to make it wait after i removed it it worked but still it cant recognize words it think open youtube is hey google @pine osprey

wintry thistleBOT
#
Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.