Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crashes after startup dialog #2

Open
Breedbloksem opened this issue Oct 9, 2021 · 4 comments
Open

Crashes after startup dialog #2

Breedbloksem opened this issue Oct 9, 2021 · 4 comments

Comments

@Breedbloksem
Copy link

When i open it it just closes right after saying: "how may i help you?"
Any fixes?

@Akul2010
Copy link

Akul2010 commented Nov 7, 2021

probably speech_recognition module is giving problems

this happened to me to, pyaudio module wasn't working

I fixed it with the following commands:

pip3 install pipwin
pipwin install pyaudio

it should work now.

@ghost
Copy link

ghost commented Mar 13, 2022

Just install PyAudio module or specify the microphone you're using in the code by putting the index like 0,1,2 etc.
To install PyAudio, follow these steps in either of powershell or command prompt :`

  • Step 1 : pip install pipwin
  • Step 2 : pipwin install pyaudio

And you'd be good to go.

If still any issues persist, you'd have to check whether or not your device drivers are up to date. Hope this answer would help you.

@bilzeebubb
Copy link

how do you specify the microphone? i have been having an issue where the speak function will run everything normally until it gets to the if statements, then it wont read the text out loud, only print it.

@ghost
Copy link

ghost commented Jun 17, 2022

@bilzeebubb

If you look through the code, you would find a function called 'takecommand' whose code is :
`def take_command():

try:

with sr.Microphone() as source:

    print('listening...')

    voice = listener.listen(source)

    command = listener.recognize_google(voice)

    command = command.lower()

    if 'alexa' in command:

        command = command.replace('alexa', '')

        print(command)`

Over here, look at the line which says :
with sr.Microphone() as source:
You can specify the index of the microphone in the brackets.

Hope it helped you, you can leave a comment if it raised any errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants