title: Raspberry pi I2S MEMS Microphone Right CHN Mono Using pyaudio
body: <p>I am using Adafruit I2S MEMS Microphone Breakout for recording. ref. <a href="https://learn.adafruit.com/adafruit-i2s-mems-microphone-breakout?view=all" rel="nofollow noreferrer">https://learn.adafruit.com/adafruit-i2s-mems-microphone-breakout?view=all</a></p>
  
  <p>When i wire the Mic to RPI in Mono configuration as per below image I am able record audio using arecord command and below python code</p>
  
  <p><a href="https://i.stack.imgur.com/LRo4l.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LRo4l.png" alt="enter image description here"></a></p>
  
  <blockquote>
    <blockquote>
      <p>arecord -D dmic_sv -c2 -r 48000 -f S32_LE -t wav -V mono -v recording.wav</p>
    </blockquote>
  </blockquote>
  
  <p>Python Code snippet: </p>
  
  <p>channels=1, rate=48000, frames_per_buffer=2400</p>
  
  <pre><code>def start_recording(self):
          try:
              self.logger.info("start_recording()&gt; enter")
              # Use a stream with a callback in non-blocking mode
              self._stream = self._pa.open(format=pyaudio.paInt32,
                                              channels=self.channels,
                                              rate=self.rate,
                                              input=True,
                                              frames_per_buffer=self.frames_per_buffer,
                                              stream_callback=self.get_callback())
              self._stream.start_stream()
              self.logger.info("start_recording()&gt; exit")
              return self
          except Exception, e:
              self.logger.error("start_recording()&gt;", exc_info = True)
  </code></pre>
  
  <p>But If I connect channel selection pin to logic high vltage i am able to record audio using arecord command but uanble to record using python code.
  Any changes required in python code to record right channel mono audio?</p>