Forum
alsaproblems (want it for voicecommand) - Printable Version

+- Forum (http://forum.xbian.org)
+-- Forum: Software (/forum-6.html)
+--- Forum: Additional Packages (/forum-22.html)
+--- Thread: alsaproblems (want it for voicecommand) (/thread-1956.html)

Pages: 1 2


alsaproblems (want it for voicecommand) - lukeg01 - 30th Dec, 2013 07:30 PM

hello
i am trying to get voicecommand working on xbian -> http://stevenhickson.blogspot.nl/2013/06/voice-command-v30-for-raspberry-pi.html

its desinend for raspbian but after modifying some links from /dev/shm to /run/shm , it starts .
also installed asla, alsa must work at least a bit, i can input audio into the device, when i say computer my terminal say's found audio (it does that when it hears the command computer to start recording for a command to execute something) but audio output doesn't work.
If i put the volume high i can hear it popping but that's is. this is the report of "speaker-test"
Terminal


speaker-test 1.0.25

Playback device is default
Stream parameters are 48000Hz, S16_LE, 1 channels
Using 16 octaves of pink noise
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 96 to 262144
Period size range from 48 to 131072
Using max buffer size 262144
Periods = 4
was set period_size = 65536
was set buffer_size = 262144
0 - Front Left
Time per period = 2.782677
0 - Front Left
Time per period = 2.779870
0 - Front Left
Time per period = 2.779836
0 - Front Left
Time per period = 2.779815
0 - Front Left
Time per period = 2.779569
0 - Front Left
Time per period = 2.780090
0 - Front Left
and i can give you a lot more of it ...


RE: alsaproblems (want it for voicecommand) - IriDium - 3rd Jan, 2014 03:37 AM

I don't want to put you off - but I believe there is still an issue with ALSA on the RPi - maybe only XBMC but there is an issue.

However, I do know that there is possible development planned for "Siri" support - but that will not be until Xbian 1 at the earliest due to lack of developers, testers and hardware.


RE: alsaproblems (want it for voicecommand) - lukeg01 - 3rd Jan, 2014 07:53 PM

Oke thanks for the response , it did work on raspbian , closing xbmc doesn't work , audio input does work, i'm afraid it's in the core of xbian , I was planning to use it with my home automation project , just hoping there comes asla support for v1

Btw, if you need testers just let me know


RE: alsaproblems (want it for voicecommand) - mk01 - 8th Jan, 2014 12:00 PM

this will be something very very missed (stupid issue). if custom MOTD message would be removed from /etc, you won't find a difference between Raspbmc and XBian (not considering installed XBian deb packages).

there is ONE big difference though and that is custom kernel and standard use of upstart instead of sysvinit. Debian is not planning this move even for upcoming release "SID" although linux world migrated years ago.

this changes as /dev/shm -> /run/shm are two years described in Debian's migration documents - only the migration is somehow still missing. we did it while trying to keep backward compatibility but nothing is 100%.

I will test ALSA on RPI's analog out and report back to you. But pulseaudio tested recently with USB sound cards was no problem.


RE: alsaproblems (want it for voicecommand) - mk01 - 8th Jan, 2014 01:02 PM

the same test works.

i suppose you have snd_bcm2835 module loaded and sound output (HDMI/ANALOG) properly set?

amixer cset numid=3 1 - analog
amixer cset numid=3 2 - hdmi

can you please retest ?


RE: alsaproblems (want it for voicecommand) - lukeg01 - 8th Jan, 2014 03:12 PM

(8th Jan, 2014 01:02 PM)mk01 Wrote:  the same test works.

i suppose you have snd_bcm2835 module loaded and sound output (HDMI/ANALOG) properly set?

amixer cset numid=3 1 - analog
amixer cset numid=3 2 - hdmi

can you please retest ?

Can you post full install instructions i thin ik might missen a packagemaker but gonne try it


RE: alsaproblems (want it for voicecommand) - mk01 - 8th Jan, 2014 05:20 PM

I just installed alsa and alsa-utils

Code:
sudo -i
apt-get install alsa alsa-utils
modprobe snd_bcm2835
amixer cset numid=3 1
speaker-test

test sound is going from analog output


RE: alsaproblems (want it for voicecommand) - lukeg01 - 8th Jan, 2014 11:55 PM

(8th Jan, 2014 05:20 PM)mk01 Wrote:  I just installed alsa and alsa-utils

Code:
sudo -i
apt-get install alsa alsa-utils
modprobe snd_bcm2835
amixer cset numid=3 1
speaker-test

test sound is going from analog output
thanks
good thing , speaker-test works, only thing i need to fill in "sudo modprobe snd_bcm2835"
anyway to fix that

Luke


RE: alsaproblems (want it for voicecommand) - mk01 - 9th Jan, 2014 01:11 AM

you can put it into /etc/modules

Code:
sudo -i
echo "snd_bcm2835" >> /etc/modules



RE: alsaproblems (want it for voicecommand) - lukeg01 - 9th Jan, 2014 01:43 AM

(9th Jan, 2014 01:11 AM)mk01 Wrote:  you can put it into /etc/modules

Code:
sudo -i
echo "snd_bcm2835" >> /etc/modules
well at the moment i got a bigger problem,
the software is full of files you can't find easy filled with links to /dev/shm but for xbian its /run/shm anyway to fake a device to make the folder ?
luke


RE: alsaproblems (want it for voicecommand) - mk01 - 9th Jan, 2014 02:12 AM

software should be updated. for transition period just copy paste this and reboot:

Code:
sudo -i
cat <<\EOF>/etc/init/shm-link.conf
start on started mountall
exec ln -s /run/shm /dev/shm
EOF



RE: alsaproblems (want it for voicecommand) - lukeg01 - 9th Jan, 2014 02:22 AM

(9th Jan, 2014 02:12 AM)mk01 Wrote:  software should be updated. for transition period just copy paste this and reboot:

Code:
sudo -i
cat <<\EOF>/etc/init/shm-link.conf
start on started mountall
exec ln -s /run/shm /dev/shm
EOF

thank you very much, the software seems to have a problem now to proces the voice to text I get :
Terminal
I got ▒/▒, which was different than what you typed: computer
when testing the keyword ... weird isn't it?
it can heir the diffrent volume's with the treshold test but it can't hear wat you say, in normal mode it just keeps saying "no translation"
I'm afraid something is wron with asla to recieve input


luke


RE: alsaproblems (want it for voicecommand) - lukeg01 - 11th Jan, 2014 08:26 PM

Hey,
got it working my usb card seemed to be dameged so, now every time i want to run it i need to run
Terminal
sudo voicecommand
the point is , if i close putty it ends the program with it, is there a way to run it on background by boot

luke
Edith: are there terminal commands to post xbmc actions like the arrow's, okay button, play pause button's etc.


RE: alsaproblems (want it for voicecommand) - josch - 13th Jan, 2014 07:58 PM

Just a small tip from me to keep commands running even when closing shell:

Put nohup in front of the command and it will keep running.

Code:
sudo nohup voicecommand



For autostart via xbian-config you could create an own simple service script in /etc/init.d
and register it in /usr/local/include/xbian-config/config/services


RE: alsaproblems (want it for voicecommand) - lukeg01 - 14th Jan, 2014 01:58 AM

Thanks for the response but how do I make this script and what should it contain?

Luke