Page 7 of 14

Re: How to setup and test

Posted: Sun Sep 10, 2017 4:37 pm
by artur.noole
Hi,

I'm really hoping someone will be able to help me. I'm very new to Raspberry Pi and linux in general. I bought the Audio Injector board and followed the automated setup guide, however, when I try to run Google Assistant that I have installed on my Raspberry Pi I get the following response:

ALSA lib pcm.c:8403:(snd_pcm_set_params) Rate doesn't match (requested 16000Hz, get 8000Hz)
OpenAlsaHandle PcmSetParams: Invalid argument
CloseAlsaHandle PcmDrop: Input/output error
[1146:1238:ERROR:audio_input_processor.cc(756)] Input error
ON_MUTED_CHANGED:
{'is_muted': False}
ON_START_FINISHED
ON_ASSISTANT_ERROR:
{'is_fatal': True}
[1146:1240:ERROR:audio_input_processor.cc(756)] Input error
ON_ASSISTANT_ERROR:
{'is_fatal': True}

When I show that first I thought I might have done something wrong so I started from the beginning with a fresh image of latest Rarbian but still the same result.

This is bizarre problem because my audio and microphone do work with other programs (tested sound with youtube and microphone with internet microphone test). I also got Alexa to work (only with click to ask a question, wakeword is not working jet).

Re: How to setup and test

Posted: Wed Sep 13, 2017 6:45 pm
by sindyciaray
However a very small percentage of broken items do slip through QA

Re: How to setup and test

Posted: Thu Sep 14, 2017 9:49 pm
by flatmax
artur.noole wrote:
Sun Sep 10, 2017 4:37 pm
Hi,

I'm really hoping someone will be able to help me. I'm very new to Raspberry Pi and linux in general. I bought the Audio Injector board and followed the automated setup guide, however, when I try to run Google Assistant that I have installed on my Raspberry Pi I get the following response:

ALSA lib pcm.c:8403:(snd_pcm_set_params) Rate doesn't match (requested 16000Hz, get 8000Hz)
OpenAlsaHandle PcmSetParams: Invalid argument
CloseAlsaHandle PcmDrop: Input/output error
[1146:1238:ERROR:audio_input_processor.cc(756)] Input error
ON_MUTED_CHANGED:
{'is_muted': False}
ON_START_FINISHED
ON_ASSISTANT_ERROR:
{'is_fatal': True}
[1146:1240:ERROR:audio_input_processor.cc(756)] Input error
ON_ASSISTANT_ERROR:
{'is_fatal': True}

When I show that first I thought I might have done something wrong so I started from the beginning with a fresh image of latest Rarbian but still the same result.

This is bizarre problem because my audio and microphone do work with other programs (tested sound with youtube and microphone with internet microphone test). I also got Alexa to work (only with click to ask a question, wakeword is not working jet).
Hi there,

Unfortunately I am not very familiar with the google assistant ... however the latest kernels can't support 8kHz. Is it possible to use a higher sample rate ? Perhaps 32 kHz ?
thanks
Matt

Re: How to setup and test

Posted: Fri Sep 15, 2017 1:30 am
by artur.noole
Hi,

I have not actually determined any sampling rate when installing the Google AI, it should work OK if mic and speakers are working. I did manage to get it working using USB audio driver but it was not very reliable so that is why I decided to go for audioinjector board. However, I did manage to get Alexa working so for the moment this will be sufficient, I do not need two separate AI-s anyway.

Re: How to setup and test

Posted: Tue Oct 03, 2017 1:44 am
by nls
I have ordered a board and expect to get it soon, but am confused whether the board works with the standard Raspbian Jessie release or whether there is a special .deb file that has to be used. If the former, will the Lite version be sufficient, or does it need the full package? Does Audacity have to be installed?

My application will be to set it up for an automatic recording on specific days and times, which will be sent to the Pi via an email. I will be using the RCA line inputs. The recording will be uploaded to a file sharing site and also archived on a shared network drive, perhaps also streamed live on demand. Any feedback about similar applications would be greatly appreciated. TIA.

Re: How to setup and test

Posted: Thu Oct 05, 2017 11:15 pm
by nls
An update to my own post earlier. I received the board yesterday and installed it on a Pi 3 which has been loaded with the latest Raspbian Stretch full version. I used the script to setup the board, used alsamixer to change the input to line in from mic, and was able to record via arecord and play via aplay. A few questions:

1. Is there a factory default setting which sets the input to mic even though the board is not equipped with microphone?
2. Are the changes made to switch input mux and capture permanent, i.e. they are saved across reboots and power cycles?
3. Are these changes only via alsamixer or can they be done programmatically?
4. Are the headphones only for playback, or can they be used as a monitor while recording from line inputs?

I would also appreciate any pointers regarding a headless setup and automated recording that were indicated in the earlier post.

Re: How to setup and test

Posted: Wed Oct 11, 2017 9:57 pm
by flatmax
Hi there, yes, you should be able to save the alsamixer state using the following command :

Code: Select all

sudo alsactl store
In other words, you can setup alsamixer to exactly how you want it and that command should store its state so that it is set like that for each reboot.

The headphones can be used as a monitor, if you use the 'bypass' mode, where the input will be delivered to the output directly with close to zero latency !

For headless setup, you can ssh into the pi like so :

Code: Select all

ssh -X pi@ipaddress
The -X allows a GUI from the pi to open on your mac/linux pc ... you can install something like xwin to make it work with Microsoft as well.

Once you have ssh in to the pi, you can use something like audacity from the command line :

Code: Select all

audacity
To install audacity :

Code: Select all

sudo apt install audacity
Matt

Re: How to setup and test

Posted: Fri Oct 27, 2017 10:34 am
by Joe_ham
I have two cards that work for playback but I can not record anything on either card. I have checked the cables and they all work with a USB sound card. I have set the alsa setting according to the screen captures. I am using line in, Raspberry Pi 3, raspbian pixel, done all the updates. Any suggestions for further testing or getting the cards working?

Re: How to setup and test

Posted: Sat Oct 28, 2017 2:23 pm
by flatmax
hi there,
Is there any way you can send in alsamixer images of your playback and capture settings ?

thanks
Matt

Re: How to setup and test

Posted: Sat Oct 28, 2017 10:51 pm
by Joe_ham
Hi,
Thanks for the question.
I looked carefully at all the alsamixer setting before doing a screen capture and noticed that the input was set on mic not line even though I had set it to line from the audio gui. So I re-ran alsactl --file /usr/share/doc/audioInjector/asound.state.RCA.thru.test restore and was able to record a song from the ipod I was using to test the sound card. I then successfully played it back using audacity. So both record and play back are finally working.
Next steps are to make sure all the settings are kept after a reboot. I have a lot of experience on UNIX/LINUX/Pi so do not expect a problem here. My long term goal is to use the Pi with the Softrock software radio.
I have found setting up a sound card (any of them including the built in one) is the most difficult part of the Pi to get working properly.
Again thanks.
I will post a positive review on Amazon in the next few days.