Simple cheap USB Microphone / Soundcard

Hmm mine doesn’t sound like this:
https://drive.google.com/file/d/1x0jGJLIDa1Sa-AFRYHPE0aTfDNfaWYro/view?usp=sharing
This is the 2 mic hat recording a tv that is ca 4m away. It’s recorded with a sox record command with a compand effect with a transfer function that effectively acts as an agc. The tv is running at normal room level and there is no other effects. Sorry for the amount of base but we have a 2.1 system with a big subwoofer connected to the tv.

Edit here is another one with some talking by me and my girlfriend over the tv between 3 and 4 meters away from the mic and talking away from it:
https://drive.google.com/file/d/1gu3EqmqkDQVDIUmDRfBaHjFeJTKJ_vUL/view?usp=sharing

You need to record the exact same at the same volume at near & far as otherwise its impossible to tell what that should be like.
As we can only tell by comparing the 2 if they are the same source.
Maybe you should post the sox settings & commands you have as it is not likely to sound the same if you are using a different effect.

Do you not have a bluetooth speaker or something that you can move or move the rhasspy to record a prerecorded playback each time.
Also why are you using sox when this 2mic is supposedly so good with all functionality all in?

never said anything about agc

Because Im the developer of https://github.com/johanneskropf/node-red-contrib-sox-utils and this is what i use in combination with voice2json and as I find sox to be a great all around tool offering much more flexibility than arecord or parec. This was recorded straight from nodered. The compand is the only applied effect. Its pretty much the same as doing sox -t alsa plughw:1,0 -L -e signed-integer -c 1 -r 16000 -b 16 test.wav trim 0 60 compand 0.1,0.3 -40,-40,-20,-10,0,-10 -10 -60 from the commandline. The installation of the 2 mic pi hat is stock with no settings changed.

near (1.5 meters):
https://drive.google.com/file/d/146HSYi1_PYQInMD6CSC0V7RXvsj3jXJO/view?usp=sharing

far (4.5 meters):
https://drive.google.com/file/d/1bQPYgqjH-tyE1ItDhXZms-Q3uD4FsbAr/view?usp=sharing

With just default settings no alc, agc or anything with the default gain of 40 (12db)

Running near and far @3m.

Near
https://drive.google.com/open?id=1YRUMobeWg5LJ3W7s1cRYhR05j12AmEY_
Far
https://drive.google.com/open?id=1e8mh0whva8doO9WKRLX03THYVKXFx3vR

It really sounds to me like at least for the 2mic hat the speex agc is doing no favors and your better of without it.

Well that is a problem as have you seen the amplitude of the last far signal and that is only @ 3m.

The USB mic @3 meter looks like this.

Problem is without Speex AGC due to the ALC not seeming to working correctly on the 2 mic your signal is woefully low.

I ve been playing some more with the sox compand. Added a noise gate and will see how I go:

compand 0.1,0.2 -inf,-35.1,-inf,-35,-35,-25,-12,0,-12 -12 -60 0.1

Edit:
Also I think the sox compand transfer function agc is doing a better job than the speex when you look at the far example at 4.5 meters above.

I just posted above a respeaker not running AGC with the sox compand and the picture is there right above and its far field is truly awful.

sox -t alsa plughw:1,0 -L -e signed-integer -c 1 -r 16000 -b 16 test.wav trim 0 60 compand 0.1,0.3 -40,-40,-20,-10,0,-10 -10 -60

Here I have got my posh Max9814 boards that are 3.6v-12v supply with own regulator and jumpers to select A/R & gain.
Its being fed from the 5v rail this time and because once more I ripped the solder pad off the cheaper Max9814 boards trying to remove the electret I dug one these out as the mic connector is on jumper leads.
Apart from that essentially the same but this does let me try out an el cheapo 20p directional electret.

Its the same thing again but this time near-rear has the mic facing the opposite way as its directional.
far-rear has a much lesser effect because of room echo and dispersion of sound so much less hits the rear as it does in the near-far sample.
Also distance sensitivity is much less because again due to room echo and dispersion of sound much more hits the rear of the mic.

This is where a sound card and mic module really shines as its the only form of 3rd party noise suppression available to us without expensive beamforming.

https://drive.google.com/open?id=15fGs3rwbAAO3nI5RPLapGTKAv9x00MvP

https://drive.google.com/open?id=1wKbfUc7-qHCVYSQvVBBqD0xnLi7O9SBO

https://drive.google.com/open?id=1wUTH2DLO7O4OZZP_hFo_o4M0nsOxvcAd

https://drive.google.com/open?id=1nMi5EStkPOv5zZn5QejRvvpER3hD90je

Its placement and using directionality but as you can see it will attenuate noise from the rear.

There are better electrets than the el cheapo 20p china ones but struggled to source them prob would have to buy more than just a couple and need to try and find them again.

They exist like these out of a cheap £10 directional microphone.

I think I ll stay with the 2 mic pi hat and sox for now as building a nice compact satellite out of this with a button as an additional stt trigger, an amp, rgb leds, a speaker and no cables visible apart from the power cable really would be pain and not one I would want to have four times which is how many satellites I have right now. Soon it will be six. I can see this on my workbench for playing but not as something that would be accepted as a general solution in the household that everybody has to be happy with.
It would really be a tiny improvement for hours I’d have to spent to build it.
That’s the charme of the hat. Takes me 3 minutes to assemble another satellite.
But thanks for the noise gate inspiration, I think it will be a nice addition to my sox command.
And at least for me the 2mic works fine up too more than four meters set up like this.

If that is what your happy with the fair enough but when I tried the commands you forwarded for sox with a Pi2Mic with the default settings you said of 40(12db) gain far field was absolutely tragic.

But hey if your happy with that go for it.

That’s what my 4.5 m example above was recorded with.

I copied and pasted what you posted here and @ 3m it was tragic.


Was near and far with a Pi2Mix recorded with your sox command.
I will try it with more gain on the capture but you did say defaults.

PS can you play to a sink rather than a file with Sox?

I didn’t change anything in the settings or a mixer. Pretty much the only thing I did was install the seeed driver, sox and nodered.

Edit just confirmed default 40

Yes should be possible. It should support alsa or pulseaudio sinks as outputs.
You would probably have to add something pretty similar to the input argument:
-t alsa yoursink but you should better google that. You can also play to standard out when defining the format with the t argument: -t raw -.

You saw the volumes with those settings and they are far to quiet maybe not all wm8960 2mics are alike!?

Do you have a copy or one of the seeedstudio originals? Because I know I ve had bad clones before.

Copy I guess.

Maybe the mics on it are shit as it is.

You would probably need an original to compare against.
By the way i cant recommend trying to integrate a noisegate into the compand. At least i didn’t find a sweet spot.

Prob not as it sort of already is compander doesn’t expand the higher energies and compress the smaller ones.
I always forget but seem to remember compander will help drop noise, so maybe what it could do is already done.
But unless your broadcasting don’t worry about low level noise as recognition ignores it.

1 Like