We’re running a modified version of Ubuntu (one-os) instead of raspbian on our Pi and one of the main things we want to do is get sound to flow back and forth between mic and speaker. We have found that getting sound to work at different volumes and networks and mic-speaker combinations can be tricky to get to work. It’s helpful to understand what is going on.
As a note remember that some monitors and projectors pull audio and video through the HDMI cable. This may be impacting the audio settings on your Pi.
First, let’s do a test with your audio. Start by refreshing all of your connected audio.
sudo alsa force-unload sudo alsa force-reload
sudo arecord test.wav sudo aplay test.wav
If the audio levels aren’t correct or if you are getting scratchy audio you may need to restart the Pi or search the available commands for alsa to set the correct input and output devices for your Pi. If you have tried multiple speakers and mics and USB connections there is a pretty good chance you’ve restarted the Pi and set the default input or output to the wrong device.
Finally, alsamixer is a great visual tool to adjust mic and speaker levels.
sudo apt-get install alsa-utils sudo apt-get install alsamixer alsamixer