Hi I am able to record and play audio recordings using the record extension.
def on_button_pressed_a():
record.set_sample_rate(10000, record.AudioSampleRateScope.RECORDING)
basic.show_icon(IconNames.SMALL_SQUARE)
record.start_recording(record.BlockingState.BLOCKING)
basic.clear_screen()
input.on_button_pressed(Button.A, on_button_pressed_a)
def on_button_pressed_b():
record.set_sample_rate(20000, record.AudioSampleRateScope.PLAYBACK)
basic.show_leds("""
. # . . .
. # # . .
. # # # .
. # # . .
. # . . .
""")
record.play_audio(record.BlockingState.BLOCKING)
basic.clear_screen()
input.on_button_pressed(Button.B, on_button_pressed_b)
But I cant find a way to access the audio buffer to transmit the audio sample values over serial. Please any guide?