# UniTAP.dev.ports.modules.capturer.audio.audio_capturer

class AudioCapturer:

Class `AudioCapturer` allows working with capturing audio frames on Sink (RX - receiver) side. You can `start` capturing in several modes, `stop` capturing, getting current `status` and result of capturing `capture_result`.

AudioCapturer(capturer: UniTAP.dev.modules.capturer.capture.Capturer)
status: UniTAP.dev.modules.capturer.statuses.AudioCaptureStatus

Returns current audio capturer status.

###### Returns:

> object of `AudioCaptureStatus` type

capture_result: UniTAP.dev.ports.modules.capturer.audio.result_audio.ResultAudioObject

Returns result of audio capturing.

###### Returns:

> object of `ResultAudioObject` type

def start(self, frames_count=0, m_sec=0, timeout=None):

Start capturing. Possible some variants of capturing:

- Capture with fixed frames count (will be captured fixed frames count and capturing will be stopped).
- Capture with fixed audio duration (captures audio for the specified duration in milliseconds).
- Capture without parameters - Live capturing (for getting frames you need to use functions `pop_element`)
- Capture with timeout (maximum duration for capturing operations before stopping, in seconds).

All results can be obtained using the function `capture_result`.

###### Arguments:

- frames_count (int)
- m_sec (int)

def stop(self):

Stop capture audio.

def pop_element(self) -> List[ UniTAP.common.audio_mode.AudioFrameData ]:

Return first object of `AudioFrameData`.

###### Returns:

> object of `AudioFrameData` type

def pop_element_as_result_object( self) -> UniTAP.dev.ports.modules.capturer.audio.result_audio.ResultAudioObject:

Return captured audio frame(objects of `AudioFrameData`) as `ResultAudioObject`.

###### Returns:

> object of `ResultAudioObject` type