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.
status: UniTAP.dev.modules.capturer.statuses.AudioCaptureStatus
Returns current audio capturer status.
Returns:
object of
AudioCaptureStatustype
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
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
ResultAudioObjecttype