Closed YoloAlien64 closed 2 years ago
https://piwheels.org/project/pocketsphinx/
looks like builds have failed. I'll take a look tomorrow.
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?
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
GPIO.setmode(GPIO.BCM) GPIO.setup(17, GPIO.OUT) GPIO.setup(27, GPIO.OUT)
command = "" on = "lights on" off = "lights off" voice = False r = sr.Recognizer()
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()
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?