On microphone library docs there would not appear to be a technique definition for getCurrentRecording
, which most likely is the rationale why you are dealing with this challenge. Yow will discover all of the supported strategies for MicrophoneRecorder
at MicrophoneRecorder Class Docs.
That mentioned, in an effort to retrieve the recording you might use the beneath:
- Report one thing, after which cease the recording (that is simply an instance right here, most likely you should use some logic to attain that – i.e., 2 buttons to start out and cease the recording and so forth).
_recorder.begin();
// report one thing in between
_recorder.cease();
- Retrieve the recording
_audioPlayer = AudioPlayer();
await _audioPlayer.setUrl(_recorder.worth.recording.url);
await _audioPlayer.play();
There’s a very good instance software demonstrating the microphone library on GitHub: microphone instance app. It can provide some concepts on find out how to make the most of the bundle.
Hope it helps.
Cheers,
Ioannis