You are here

Risharde's Blog

Rapsberry PI and PocketSphinx error fix

Lalymah seems to solve the issue of not getting audio into pocketsphinx: Error opening audio device plughw:1,0 for capture: Connection refused

Mixer load failed: Invalid argument FATAL_ERROR: "continuous.c", line 246: Failed to open audio device

To fix on the Raspberry PI, do the following: sudo apt-get remove pulseaudio -y sudo aptitude purge pulseaudio -y sudo mv /usr/include/pulse/pulseaudio.h /usr/include/pulse/pulseaudio.h.old

Recompile sphinxbase and pocketsphinx and you should be good to go

You could also try reading this one:

Autologin and run console application in Raspberry Pi

Try this first: sudo nano /etc/inittab

1:2345:respawn:/sbin/getty --autologin {USERNAME} --noclear 38400 tty1

Found this at:

Step 1: Open a terminal session and edit inittab file.

sudo nano /etc/inittab

Step 2: Disable the getty program.
Navigate to the following line in inittab
1:2345:respawn:/sbin/getty 115200 tty1

And add a # at the beginning of the line to comment it out
#1:2345:respawn:/sbin/getty 115200 tty1

Step 3: Add login program to inittab.
Add the following line just below the commented line1:2345:respawn:/bin/login -f pi tty1 </dev/tty1 >/dev/tty1 2>&1
This will run the login program with pi user and without any authentication

Step 4: Save and Exit.
Press Ctrl+X to exit nano editor followed by Y to save the file and then press Enter to confirm the filename.

Reboot the pi and it will boot straight on to the shell prompt pi@raspberrypi without prompting you to enter username or password. But this isn't enough; you need your Pi to automatically run some command or a script. which is explained in the next section.

Run a Script after login

How to automatically run a script after login.
Step 1: Open a terminal session and edit the file /etc/profile
sudo nano /etc/profile
Step 2: Add the following line to the end of the file
. /home/pi/
replace the script name and path with correct name and path of your start-up script.
Step 3: Save and Exit
Press Ctrl+X to exit nano editor followed by Y to save the file.