Open kpolley opened 5 years ago
Hi @kpolley I am facing the same problem. Did you (or anyone) somehow manage to solve the buzzing sound from the mic?
I am using raspberry pi 2 with a D-link USB modem and a microphone. I am hearing a very disturbing buzzing sound from the mic (together with the voice). I thought it could be a disturbance from the air which is causing the buzzing sound. I tried to buy a pop filter for the microphone to avoid the noise from the air. But that didn't solve the problem. It seems there is some other thing which is causing the buzzing sound.
Is it from the picam or the microphone? Because I have tested the Pi with two different microphones and the result buzzing sound is the same.
What can I do to avoid the noise from the mic?
Please help. Thank you in advance.
sir, if the mic and speakers are in proximity, one will get the buzzing sound, echo and with passing time (withing seconds) the echo increases so much that there is only echo sound and nothing else.
so we need to use mic away from speakers,
https://www.avast.com/en-in/recommend?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=default3&tag=be81ceab-3a65-45b8-859a-e92e6a669d47 I’m protected online with Avast Free Antivirus. Get it here — it’s free forever. https://www.avast.com/en-in/recommend?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=default3&tag=be81ceab-3a65-45b8-859a-e92e6a669d47 <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
On Fri, Feb 22, 2019 at 3:49 PM vmiovneik notifications@github.com wrote:
Hi @kpolley https://github.com/kpolley I am facing the same problem. Did you (or anyone) somehow manage to solve the buzzing sound from the mic?
I am using raspberry pi 2 with a D-link USB modem and a microphone. I am hearing a very disturbing buzzing sound from the mic (together with the voice). I thought it could be a disturbance from the air which is causing the buzzing sound. I tried to buy a pop filter for the microphone to avoid the noise from the air. But that didn't solve the problem. It seems there is some other thing which is causing the buzzing sound.
Is it from the picam or the microphone? Because I have tested the Pi with two different microphones and the result buzzing sound is the same.
What can I do to avoid the noise from the mic?
Please help. Thank you in advance.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/iizukanao/picam/issues/115#issuecomment-466348080, or mute the thread https://github.com/notifications/unsubscribe-auth/Ako7-iXE4MXSw5gECO8Jvi2565lY1P6dks5vP8RKgaJpZM4YX0W7 .
@viveksanagari after lots of trial and error I came to the conclusion it was something wrong with picam and it's attempt to sync the audio and video. I actually ditched picam altogether and built something similar myself using python
Some of the code is is specific to my hardware, but give it a try and I hope it works out! Feel free to post any issues you face on the repo.
sir, if the mic and speakers are in proximity, one will get the buzzing sound, echo and with passing time (withing seconds) the echo increases so much that there is only echo sound and nothing else. so we need to use mic away from speakers, https://www.avast.com/en-in/recommend?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=default3&tag=be81ceab-3a65-45b8-859a-e92e6a669d47 I’m protected online with Avast Free Antivirus. Get it here — it’s free forever. https://www.avast.com/en-in/recommend?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=default3&tag=be81ceab-3a65-45b8-859a-e92e6a669d47 <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
Hi @rajeshkrarora1 Thank you for responding, I tried to place the raspberry pi in a closed room and heard the audio from another room, just to make sure the audio and speakers are not near to each other such that it captures each others output. However it didn't made a difference in my case. Can you please suggest what could be the other possibility to solve my problem.
Thank you in advance,
@viveksanagari after lots of trial and error I came to the conclusion it was something wrong with picam and it's attempt to sync the audio and video. I actually ditched picam altogether and built something similar myself using python
Some of the code is is specific to my hardware, but give it a try and I hope it works out! Feel free to post any issues you face on the repo.
Hi @kpolley Thank you for responding and directing to your python solution. I will definitely try it to see how it works for my purpose.
Alongside, I have tried to record some video and audio using 'raspivid' and 'arecord' command line tools by using the below command,
raspivid -t 10000 -w 640 -h 480 -fps 25 -b 1200000 -p 0,0,640,480 -o video.h264 & arecord --device=hw:1,0 --format S16_LE --duration=10 --rate 44100 -c1 test.wav &
The audio noise/disturbance lived even while recording from the command line tools, as it was while recording the video from 'Picam'. So, do you think in my case could there be any other possible reason for this disturbance in audio? For example, the signals from 4g dongle? the power supply? the raspberry pi? the mic? capture card?
Kindly point out if you (or anyone) have some possible reasons for this, so I can test it for solution. Thanks for your help in advance.
Dear @viveksanagari https://github.com/viveksanagari, you try adjusting the mic sensitivity by going into alsmixer and after selecting your (f6) mic press (f5) to go into the soft-volume control and reduce the mic input to around 30 and see if that resolves ur problem
On Mon, Feb 25, 2019 at 10:50 PM vmiovneik notifications@github.com wrote:
@viveksanagari https://github.com/viveksanagari after lots of trial and error I came to the conclusion it was something wrong with picam and it's attempt to sync the audio and video. I actually ditched picam altogether and built something similar myself using python https://github.com/kpolley/Python_AVrecorder
Some of the code is is specific to my hardware, but give it a try and I hope it works out! Feel free to post any issues you face on the repo.
Hi @kpolley https://github.com/kpolley Thank you for responding and directing to your python solution. I will definitely try it to see how it works for my purpose.
Alongside, I have tried to record some video and audio using 'raspivid' and 'arecord' command line tools by using the below command,
raspivid -t 10000 -w 640 -h 480 -fps 25 -b 1200000 -p 0,0,640,480 -o video.h264 & arecord --device=hw:1,0 --format S16_LE --duration=10 --rate 44100 -c1 test.wav &
The audio noise/disturbance lived even while recording from the command line tools, as it was while recording the video from 'Picam'. So, do you think in my case could there be any other possible reason for this disturbance in audio? For example, the signals from 4g dongle? the power supply? the raspberry pi? the mic? capture card?
Kindly point out if you (or anyone) have some possible reasons for this, so I can test it for solution. Thanks for your help in advance.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/iizukanao/picam/issues/115#issuecomment-467098270, or mute the thread https://github.com/notifications/unsubscribe-auth/Ako7-oMgK8r3E4mI3wuMot9a2Pv17-p4ks5vRBtFgaJpZM4YX0W7 .
dear @viveksanagari https://github.com/viveksanagari, A closed room can also make sound bounce back and create a buzzing sound or create an echo, check ur room acoustics
On Mon, Feb 25, 2019 at 11:22 PM rajesh kumar rajeshkrarora1@gmail.com wrote:
Dear @viveksanagari https://github.com/viveksanagari, you try adjusting the mic sensitivity by going into alsmixer and after selecting your (f6) mic press (f5) to go into the soft-volume control and reduce the mic input to around 30 and see if that resolves ur problem
On Mon, Feb 25, 2019 at 10:50 PM vmiovneik notifications@github.com wrote:
@viveksanagari https://github.com/viveksanagari after lots of trial and error I came to the conclusion it was something wrong with picam and it's attempt to sync the audio and video. I actually ditched picam altogether and built something similar myself using python https://github.com/kpolley/Python_AVrecorder
Some of the code is is specific to my hardware, but give it a try and I hope it works out! Feel free to post any issues you face on the repo.
Hi @kpolley https://github.com/kpolley Thank you for responding and directing to your python solution. I will definitely try it to see how it works for my purpose.
Alongside, I have tried to record some video and audio using 'raspivid' and 'arecord' command line tools by using the below command,
raspivid -t 10000 -w 640 -h 480 -fps 25 -b 1200000 -p 0,0,640,480 -o video.h264 & arecord --device=hw:1,0 --format S16_LE --duration=10 --rate 44100 -c1 test.wav &
The audio noise/disturbance lived even while recording from the command line tools, as it was while recording the video from 'Picam'. So, do you think in my case could there be any other possible reason for this disturbance in audio? For example, the signals from 4g dongle? the power supply? the raspberry pi? the mic? capture card?
Kindly point out if you (or anyone) have some possible reasons for this, so I can test it for solution. Thanks for your help in advance.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/iizukanao/picam/issues/115#issuecomment-467098270, or mute the thread https://github.com/notifications/unsubscribe-auth/Ako7-oMgK8r3E4mI3wuMot9a2Pv17-p4ks5vRBtFgaJpZM4YX0W7 .
it is alsamixer, not alsmixer sorry for the spelling mistake
On Mon, Feb 25, 2019 at 11:27 PM rajesh kumar rajeshkrarora1@gmail.com wrote:
dear @viveksanagari https://github.com/viveksanagari, A closed room can also make sound bounce back and create a buzzing sound or create an echo, check ur room acoustics
On Mon, Feb 25, 2019 at 11:22 PM rajesh kumar rajeshkrarora1@gmail.com wrote:
Dear @viveksanagari https://github.com/viveksanagari, you try adjusting the mic sensitivity by going into alsmixer and after selecting your (f6) mic press (f5) to go into the soft-volume control and reduce the mic input to around 30 and see if that resolves ur problem
On Mon, Feb 25, 2019 at 10:50 PM vmiovneik notifications@github.com wrote:
@viveksanagari https://github.com/viveksanagari after lots of trial and error I came to the conclusion it was something wrong with picam and it's attempt to sync the audio and video. I actually ditched picam altogether and built something similar myself using python https://github.com/kpolley/Python_AVrecorder
Some of the code is is specific to my hardware, but give it a try and I hope it works out! Feel free to post any issues you face on the repo.
Hi @kpolley https://github.com/kpolley Thank you for responding and directing to your python solution. I will definitely try it to see how it works for my purpose.
Alongside, I have tried to record some video and audio using 'raspivid' and 'arecord' command line tools by using the below command,
raspivid -t 10000 -w 640 -h 480 -fps 25 -b 1200000 -p 0,0,640,480 -o video.h264 & arecord --device=hw:1,0 --format S16_LE --duration=10 --rate 44100 -c1 test.wav &
The audio noise/disturbance lived even while recording from the command line tools, as it was while recording the video from 'Picam'. So, do you think in my case could there be any other possible reason for this disturbance in audio? For example, the signals from 4g dongle? the power supply? the raspberry pi? the mic? capture card?
Kindly point out if you (or anyone) have some possible reasons for this, so I can test it for solution. Thanks for your help in advance.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/iizukanao/picam/issues/115#issuecomment-467098270, or mute the thread https://github.com/notifications/unsubscribe-auth/Ako7-oMgK8r3E4mI3wuMot9a2Pv17-p4ks5vRBtFgaJpZM4YX0W7 .
Hi @rajeshkrarora1
I have adjusted the mic volume from alsamixer.
Before adjusting the mic it was,
After adjusting the mic it is,
The noise was still there, only the voice signals were heard low.
I have tried to leave a room (not closed) with raspberry and mic with no other voice (except the voice of fan for laptop, however, it is very low). But still, the noise is alive.
I also tried to switch my raspberry pi 2 with a raspberry pi 3 (model B+) unfortunately it also didn't make any difference.
Do we have any other suggestions, please.
If any one else comes across this issue, I've found a solution that's working for me so far. I'm assuming the i2s microphone is set up as shown here: https://learn.adafruit.com/adafruit-i2s-mems-microphone-breakout/raspberry-pi-wiring-and-test#adding-volume-control-5-66. That is, there is a ~/.asoundrc (or /etc/asound.conf) file with contents:
#This section makes a reference to your I2S hardware, adjust the card name
# to what is shown in arecord -l after card x: before the name in []
#You may have to adjust channel count also but stick with default first
pcm.dmic_hw {
type hw
card sndrpisimplecar
channels 2
format S32_LE
}
#This is the software volume control, it links to the hardware above and after
# saving the .asoundrc file you can type alsamixer, press F6 to select
# your I2S mic then F4 to set the recording volume and arrow up and down
# to adjust the volume
# After adjusting the volume - go for 50 percent at first, you can do
# something like
# arecord -D dmic_sv -c2 -r 48000 -f S32_LE -t wav -V mono -v myfile.wav
pcm.dmic_sv {
type softvol
slave.pcm dmic_hw
control {
name "Boost Capture Volume"
card sndrpisimplecar
}
min_dB -3.0
max_dB 30.0
}
The issue seems to be with the software volume control in alsa (or at least the way it interacts with picam). If I run the command picam --alsadev plug:dmic_sv
as in the original issue, I get a loud buzzing noise after 10-15 seconds. However, running the command
picam --alsadev plug:dmic_hw
works with no buzzing for as long as I've tried it so far. To increase the volume, I just use the picam volume option: picam --alsadev plug:dmic_hw --volume 4
which also works without issue.
Note that simply using hw:1,0 for the alsa device doesn't work and you will get no sound. The configuration in pcm.dmic_hw is required for picam to use it (see #86).
Dear @samcormack , Sorry i read your suggestion today, and tried it with my setup, it is working wonderfully well, Thanks for sharing it.
This is the command:
./picam -w 1920 -h 1080 -f 15 --alsadev plug:dmic_sv
Sometimes the resulting video has no issues and great sound quality, sometimes the microphone creates a very loud buzzing sound. This happens anywhere between 10-25 seconds after recording. I'm assuming it's because of this error here:
Here are the picam logs where I created 5 videos: The 1st, 2nd and 3rd are great. The 4th and 5th have the buzzing sound.