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

Failed building wheel for pocketsphinx #175

Closed
YoloAlien64 opened this issue Dec 23, 2020 · 5 comments
Closed

Failed building wheel for pocketsphinx #175

YoloAlien64 opened this issue Dec 23, 2020 · 5 comments
Assignees

Comments

@YoloAlien64
Copy link

I was trying to download pockectsphinx for a project I am making for my own benefit. In the terminal on the raspberry pi B, itself, I typed sudo pip3 install pocketsphinx and after entering it, it said that it failed building the wheel for pocketsphinx. How do I fix that problem?

@bennuttall
Copy link
Member

https://piwheels.org/project/pocketsphinx/

looks like builds have failed. I'll take a look tomorrow.

@bennuttall
Copy link
Member

It sounds like sudo apt-get install swig will install the required dependencies. Can you try it again after installing that, and let us know if it works?

@YoloAlien64
Copy link
Author

YoloAlien64 commented Dec 26, 2020 via email

@YoloAlien64
Copy link
Author

YoloAlien64 commented Dec 26, 2020 via email

@YoloAlien64
Copy link
Author

Thanks it worked, but now there is a new problem, after trying to download pocketsphinx, it still had the same error, it said that pulse/pulseaudio.h was not found in the directory so I downloaded pulseaudio in the terminal and then tried again and the same error with the same problem (pulse/pulseaudio.h was not found in the directory). Is it because it is something else I have to download? Also While testing the motor for the project I am currently working on, it said that GPIO.OUT(17,False) could not be called. Is there something I need to download for that too? Here are the two codes in case you want to look at them.

LightsON/OFF Code

import RPi.GPIO as GPIO
import time
import speech_recognition as sr

#configer GPIO pins
GPIO.setmode(GPIO.BCM)
GPIO.setup(17, GPIO.OUT)
GPIO.setup(27, GPIO.OUT)

configure variables

command = ""
on = "lights on"
off = "lights off"
voice = False
r = sr.Recognizer()

#keep running until given the command to turn on or off the lights
while(voice == False):
print("speak")
audio = sr.listen(source)

try:
    speechString = r.recognize_google(audio)
    print(speechString)
    voice = True
    
except sr.unkownValueError:
    print("could not understand audio")
    
except sr.RequestError as e:
    print("could not request results; {0}".format(e))

# determine if user said lights on or lights off
if (speechString == on):
    GPIO.output(17, False)
    GPIO.output(27, True)
    time.sleep(0.3)
if (speechString == off):
    GPIO.output(17, True)
    GPIO.output(27, False)
    time.sleep(0.3)

Motor test code

import RPi.GPIO as GPIO
import time

GPIO.setmode(GPIO.BCM)
GPIO.setup(17, GPIO.OUT)
GPIO.setup(27, GPIO.OUT)

GPIO.OUT(17,False)
GPIO.OUT(27,True)
time.sleep(0.1)
GPIO.cleanup()

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

No branches or pull requests

2 participants