Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 5827

Advanced users • Audio Input and Output Help

$
0
0
Hi,

Bit of a mixed bag this one.

I am building a full sized Dalek and decided that, instead of buying a hardware voice modulator, I'd do the voice with a Raspberry Pi.
I have been successful in using Sox (IIRC) to take the input from a microphone, apply the required effects to it, and output the sound over a speaker connected to the audio out socket.

So bench test was successful.

I then started to look at installing and using the Pi in the Dalek itself.
I am using a Pi 4 2GB with Raspbian Bookworm installed

According to my notes, before installing sox I used the following terminal command:

Code:

play "|rec -d overdrive 30 tremolo 50 50"
Then after installing sox this command achieved the same:

rec -d overdrive 30 tremolo 50 50

To improve the audio and for use inside the Dalek, in haste I purchased a Waveshare WM8960 Audio Hat, because it came with a built in mic. It can with some small speakers, but they are not really up to much.
https://thepihut.com/products/hi-fi-sou ... y8EALw_wcB

I also bought a Wireless 2.4Ghz Headset Mic that comes with a dongle that plugs into the 3.5mm Mic Socket (which the Pi does not have).

Image

So to help with the missing 3.5mm Mic Input, I dug out a USB sound card with Mic In and Headphone Out from my box of bits.

Image

Testing
Today I started testing with what I have on the Pi 4, I installed the Waveshare WM8960 software and it is showing as a device when you right click the speaker.

Image

I then got completely lost, mainly because this is where I am completely out of my depth, I have never really understood the raspberry Pi sound management e.g. alsa / pulse audio etc or how to select specific devices.

With the WM8960 selected as default I can record and play the recording using:

Code:

arecord -D hw:4,0 -f S32_LE -r 16000 -c 2 test.wav

Code:

aplay -D hw:4,0 test.wav
This bash command was from the WaveShare (limited docs) and I found the hardware number using:

Code:

aplay -l

Code:

arecord -l
Whilst this works, I am assuming that it is using the WaveShare mics.

The problem is I am trying to record using one device (USB Sound Card) and output using another (WaveShare HAT). Can this be done? Can you select audio hardware in Sox?

The other issue is that I am not sure that my setup is suitable. Because of being inside the Dalek, I think a headset mic would be better than a mic on a HAT, either the one I have or a bluetooth mic (although sound quality is usually bad with a bluetooth headset mic, or so I have been told).

I could possibly use a different HAT with sound in and out?

The other thing I need help with is a speaker solution.
The Waveshare is only capable of 1W per channel?

Audio Upgrade
What are the thoughts on:

Regarding sound, I have been struggling, however to get decent sound we need:
Pi DAC Hat https://thepihut.com/products/iqaudio-dac-pro

2 x Car Speakers - Something like these as they are the correct dimension to fit (IIRC) and matched to the amplifier (although the amp will go higher. https://www.amazon.co.uk/VIBE-Audio-Pul ... C87&sr=1-5

2 Channel Amplifier A little over the top, but other cheaper ones may turn out rubbish?
https://www.ebay.co.uk/itm/395036805086 ... 8FF03Y8JWA

I also have this IQaudIO HAT which has Mic L and Mic R / Aux in / Spk Out, currently testing for using in my car audio project.

Image

Thoughts and help please?

Statistics: Posted by JonnyAlpha — Mon Sep 16, 2024 7:09 pm



Viewing all articles
Browse latest Browse all 5827

Trending Articles