How to setup and test

Moderator: flatmax

Post Reply
artur.noole
Posts: 3
Joined: Sun Sep 10, 2017 4:22 pm

Re: How to setup and test

Post by artur.noole » 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).

sindyciaray
Posts: 1
Joined: Tue Sep 12, 2017 7:01 pm
Contact:

Re: How to setup and test

Post by sindyciaray » Wed Sep 13, 2017 6:45 pm

However a very small percentage of broken items do slip through QA

flatmax
Posts: 609
Joined: Sat Jul 23, 2016 11:39 pm

Re: How to setup and test

Post by flatmax » Thu Sep 14, 2017 9:49 pm

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
Check out our audiophile quality crossovers : https://bit.ly/2kb1nzZ
Please review the Zero sound card on Amazon USA : https://www.amazon.com/dp/B075V1VNDD
---
Check out our new forum on github : https://github.com/Audio-Injector

artur.noole
Posts: 3
Joined: Sun Sep 10, 2017 4:22 pm

Re: How to setup and test

Post by artur.noole » Fri Sep 15, 2017 1:30 am

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.

nls
Posts: 4
Joined: Tue Oct 03, 2017 1:35 am

Re: How to setup and test

Post by nls » Tue Oct 03, 2017 1:44 am

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.

nls
Posts: 4
Joined: Tue Oct 03, 2017 1:35 am

Re: How to setup and test

Post by nls » Thu Oct 05, 2017 11:15 pm

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.

flatmax
Posts: 609
Joined: Sat Jul 23, 2016 11:39 pm

Re: How to setup and test

Post by flatmax » Wed Oct 11, 2017 9:57 pm

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
Check out our audiophile quality crossovers : https://bit.ly/2kb1nzZ
Please review the Zero sound card on Amazon USA : https://www.amazon.com/dp/B075V1VNDD
---
Check out our new forum on github : https://github.com/Audio-Injector

Joe_ham
Posts: 2
Joined: Fri Oct 27, 2017 10:29 am

Re: How to setup and test

Post by Joe_ham » Fri Oct 27, 2017 10:34 am

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?

flatmax
Posts: 609
Joined: Sat Jul 23, 2016 11:39 pm

Re: How to setup and test

Post by flatmax » Sat Oct 28, 2017 2:23 pm

hi there,
Is there any way you can send in alsamixer images of your playback and capture settings ?

thanks
Matt
Check out our audiophile quality crossovers : https://bit.ly/2kb1nzZ
Please review the Zero sound card on Amazon USA : https://www.amazon.com/dp/B075V1VNDD
---
Check out our new forum on github : https://github.com/Audio-Injector

Joe_ham
Posts: 2
Joined: Fri Oct 27, 2017 10:29 am

Re: How to setup and test

Post by Joe_ham » Sat Oct 28, 2017 10:51 pm

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.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest