Read the statement by Michael Teeuw here.
Microphone advise for PI2 & voice control
-
PlayStation pseye works great.
4 mic array. And camera :-)
Works out of the box
Costs 8 eur -
@dvbit @maxbachmann I do not want to run anything any here else but at the same room at the same pi…i want to run alexa and MMM-voice thats it but they will not work with one mic …they need 2 mics to be configured somehow on the pi.
Hotword and Snowboy will not help me much but something like MMM-MirrorMirrorOnTheWall will but that is getting way to difficult to install for some reason…i am on my 3rd try
as far as the playstation mic goes i am sure that may be a good mic but i am not suffering from quality …does that act as 2 separate mics not as an array??
Denis -
@richland007 I am not familar with the ps eye (I know a couple people using it where it works way worse then the respeaker 2 mic hat the moment your not close to the mic, but I only saw the ps eye in action in a quite noisy environment once, which is definetly not the normal case at home)
I personally use the respeaker 4mic hat for the pi (25$) and the respeaker mic array v2 (70$)(pretty awesome but definetly overkill for you)
The 4 mic array always inputs with 4 separate channels the mic array v2 has two different firmwares one only outputs the processed audio channel the other one outputs the input of the 4 mics, the processed audio channel and the music you play with the array which gets used for the AEC)
The 2 mic hat (10$) is already quite good and I guess it just streams the 2 channels aswell.get the index
import pyaudio p = pyaudio.PyAudio() info = p.get_host_api_info_by_index(0) numdevices = info.get('deviceCount') for i in range(0, numdevices): if (p.get_device_info_by_host_api_device_index(0, i).get('maxInputChannels')) > 0: print "Input Device id ", i, " - ", p.get_device_info_by_host_api_device_index(0, i).get('name')
thats the output when executing
Input Device id 2 - ReSpeaker 4 Mic Array (UAC1.0): USB Audio (hw:1,0)
import pyaudio import wave RESPEAKER_RATE = 16000 RESPEAKER_CHANNELS = 6 # change base on firmwares, 1_channel_firmware.bin as 1 or 6_channels_firmware.bin as 6 RESPEAKER_WIDTH = 2 # run getDeviceInfo.py to get index RESPEAKER_INDEX = 2 # refer to input device id CHUNK = 1024 RECORD_SECONDS = 5 WAVE_OUTPUT_FILENAME = "output.wav" p = pyaudio.PyAudio() stream = p.open( rate=RESPEAKER_RATE, format=p.get_format_from_width(RESPEAKER_WIDTH), channels=RESPEAKER_CHANNELS, input=True, input_device_index=RESPEAKER_INDEX,) print("* recording") frames = [] for i in range(0, int(RESPEAKER_RATE / CHUNK * RECORD_SECONDS)): data = stream.read(CHUNK) frames.append(data) print("* done recording") stream.stop_stream() stream.close() p.terminate() wf = wave.open(WAVE_OUTPUT_FILENAME, 'wb') wf.setnchannels(RESPEAKER_CHANNELS) wf.setsampwidth(p.get_sample_size(p.get_format_from_width(RESPEAKER_WIDTH))) wf.setframerate(RESPEAKER_RATE) wf.writeframes(b''.join(frames)) wf.close()
Thats a code example of respeaker on how two get the channels in python with the mic array v2, but I guess it should work similar with other mic arrays
-
I got the info here
https://medium.com/snips-ai/benchmarking-microphone-arrays-respeaker-conexant-microsemi-acuedge-matrix-creator-minidsp-950de8876fda
And it works pretty well. -
Yeah i know that benchmark (using that speech recognition with my mirror already) :) (newer reapeakers not included there yet they definetly perform a lot better with background music as they use the xvf3000 resulting in them nearly completely removing the background music from any samples)
When I saw it it was used in a small robot with speech recognition and it absolutely failed with a distance over around 1 m, but it was on a hackathon so maybe it was just the background noise causing problems.
@dvbit it just sends all four channels to the pc aswell? or does it already create just one channel out of the four?