2x $1.80 I2S Mems Mics + Pi 3.5mm & EC (But buy Adafruit if you can)

Ok 2x $1.80 I2S Mems Mics + Pi 3.5mm

The above is worth a read as " What is the difference between an omnidirectional microphone and a unidirectional microphone:" is pure comedy.

Really all the thunder goes to Adafruit as they have done all the work and looks like it supports all Pi models now.

I have a adafruit module on the way and will tell you if the audio quality is any better but the cheap aliexpress modules are at least adequate.
Adafruit document and provide the driver so if you can purchase from them.

All the wiring and install is in the brilliant adafruit tutorial.

My .asoundrc is as so.

pcm.!default {
    type asym
    playback.pcm "eci"
    capture.pcm "eco"
}


pcm.eci {
    type plug
    slave {
        format S16_LE
        rate 16000
        channels 1
        pcm {
            type file
            slave.pcm null
            file "/tmp/ec.input"
            format "raw"
        }
    }
}

pcm.eco {
    type plug
    slave.pcm {
        type fifo
        infile "/tmp/ec.output"
        rate 16000
        format S16_LE
        channels 2
    }
}




pcm.dmic_hw {
	type hw
	card sndrpii2scard
	channels 2
	format S32_LE
}
 
pcm.dmic_sv {
	type softvol
	slave.pcm dmic_hw
	control {
		name "Boost Capture Volume"
		card sndrpii2scard
	}
	min_dB -3.0
	max_dB 30.0
}


pcm.cap {
 type plug
 slave {
   pcm "dmic_sv"
   channels 2
   }
 route_policy sum

}

Then in 3 cli windows for ec its start ec with

```` ./ec -i plug:cap -o plughw:1 -d 20`

then just
aplay file_example_WAV_10MG.wav
arecord -r16000 -fS16_LE -c1 ec-i2s.wav

So no soundcard needed just 2x I2S mics direct to GPIO & 3.5mm Pi output.
Was pretty sure this would work as they are essentially all on the same clock of the Pi I2S.

EC supplied by the usual https://github.com/voice-engine/ec

I actually prefer this to the seeedvoice non usb voice cards as the driver is much better and doesn’t force a kernel freeze.
I does use DKMS but you can just install again on any kernel updates but I just absolutely hate the mess of the seeedvoice drivers.

Usb will obviously have better sound output via a codec than the Pi 3.5mm but mic wise they are pretty damn good and because they are wired much easier to fit and place correctly in an enclosure.

For the cable and a bit of soldering

2 Likes