# New Low-level Microphone API

DevFeed: [New Low-level Microphone API](<https://devfeed.tech/articles/new-low-level-microphone-api-19405.md>)

Original publisher: [Read original article](<https://www.codenameone.com/blog/new-low-level-microphone-api/>)

Author: Steve Hannah

Published: 2020-01-02T00:00:00Z

Content type: tutorial

Language: en

Sources: [CodeName One](<https://devfeed.tech/sources/codename-one.md>)

Topics: [API](<https://devfeed.tech/topics/api.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [async](<https://devfeed.tech/tags/async.md>), [audio](<https://devfeed.tech/tags/audio.md>), [callback](<https://devfeed.tech/tags/callback.md>), [stream](<https://devfeed.tech/tags/stream.md>), [visualization](<https://devfeed.tech/tags/visualization.md>), [voice](<https://devfeed.tech/tags/voice.md>)

## AI overview

This tutorial explains a new microphone API for accessing raw PCM audio data directly instead of saving recordings only to a file. It covers creating an audio buffer, handling callbacks on a separate thread, reading sample data and audio metadata, and connecting the buffer to MediaRecorderBuilder.

## Source excerpt

Today's blog post will delve further into our new media features. We've recently added an API to access raw PCM data from the device's microphone. Previously, the media recording API could only be configured to save audio to a file. This is fine for most use cases, but sometimes it is necessary to access the raw PCM stream directly. For example for voice recognition, or audio processing, or audio visualization.