I was looking at the code of Alexa integration with matrix
This file has been truncated.
#! /usr/bin/env python
from creds import *
import alsaaudio, time, audioop
from memcache import Client
from matrix_io.proto.malos.v1 import driver_pb2
from matrix_io.proto.malos.v1 import io_pb2
Capture channel 1 as out put of micarray_dump.cpp
uint16_t c = 0; // Only Channel is being written
seconds_to_record * mics.SamplingRate() * sizeof(int16_t));
Alexa Voice Wriet
process = subprocess.Popen(
[’./micarray/build/micarray_dump’], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
audio, err = process.communicate()
rf = open(path + ‘recording.wav’, ‘w’)
rf.write(audio) // Output of micarray_dump which is single channel
files = [ # a list
(‘file’, (‘request’, json.dumps(d), ‘application/json; charset=UTF-8’)),
(‘file’, (‘audio’, inf, ‘audio/L16; rate=16000; channels=1’))
r = requests.post(url, headers=headers, files=files)
If only one channel which is single mic output is used. How is beam forming and far field voice being captured ?
I am trying ot integrate with google speech api
https://cloud.google.com/speech/ and I need to understand this part. Could you guys please help me understand?
Hi Akash A.,
As you noticed, the Alexa demo is a simple demo to get started with the Matrix Creator and the mic array on it. We are working in more complex and polished recipes that can leverage the mic array by using beam-forming and other techniques as long a the others sensors that the board has.
You can always modify, improve and shared the code in the examples to build new exciting things with the Matrix Creator.
Thanks for the support and keep in touch with the growing community !
Thanks a lot for the info. I will play around with bream forming implementation then.