# How to record sound from a microphone using the Core Sound library?

**URL:** <https://discourse.processing.org/t/how-to-record-sound-from-a-microphone-using-the-core-sound-library/39811>\
**Category:** Libraries\
**Created:** [November 21, 2022, 3:31pm UTC](https://discourse.processing.org/t/how-to-record-sound-from-a-microphone-using-the-core-sound-library/39811 "2022-11-21T15:31:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jvolker](https://avatars.discourse-cdn.com/v4/letter/j/f0a364/32.png) [@jvolker](https://discourse.processing.org/u/jvolker)\
**Post date:** [November 21, 2022, 3:31pm UTC](https://discourse.processing.org/t/how-to-record-sound-from-a-microphone-using-the-core-sound-library/39811/1 "2022-11-21T15:31:23Z")

</div>

Hi,

I’m looking for a way to record and playback sound from a microphone using the Core Sound library. It seems there are no examples to do this and looking at the API I don’t see a way to get from AudioIn to AudioSample or SoundFile. I don’t need to save it to disk. A buffer that I can play back later would be enough.

Am I missing something?

Thanks a lot.

---

<div class="post-metadata">

**Author:** ![amit-62](https://avatars.discourse-cdn.com/v4/letter/a/ba9def/32.png) [@amit-62](https://discourse.processing.org/u/amit-62)\
**Post date:** [November 27, 2022, 8:06pm UTC](https://discourse.processing.org/t/how-to-record-sound-from-a-microphone-using-the-core-sound-library/39811/2 "2022-11-27T20:06:10Z")

</div>

Hi @jvolker you can use p5.SoundRecorder() to record sound it has multiple option like setInput() , record(), stop(). you can also refer to this [link](https://p5js.org/reference/#/p5.SoundRecorder)
