Audio recording with a sample rate of 16 kHz

I'm trying to record audio with an Arduino I did this with TMRpcm. This time I need half a second or 1 second of recorded sound and I want to save the sample in an array.

I installed the Arduino bootloader on STM32F103C8 And I connected the microphone preamplifier to the analog pin of the microcontroller. But the problem is that I do not know how to get the sample rate in Arduino.

Does the STM32F103C8 work with TMRpcm?

... I found the documentation here:

audio.startRecording("sound.wav",16000,A0);  

Hi
thank you for your attention
But I need to move the sample rate to the array instead of the SD card.I only need half a second of the recorded sound

nobody can't help me ? :sob: :sob:

What do you need help with? You know how to code an array of int. And you know how to count the sample number. You know how to move the sample to the next array entry.
Paul

I am sorry. I misread your posting. I thought you were wanting to move the SAMPLES to an array. But, I see you want to determine the rate of sampling and move it to an array. Are you able to determine the sampling rate and what have you found?

Sample rate is just a number, you don’t need array for it