fix(__str__): adding missing __str__ method in PortAudioMicrophone

This commit is contained in:
CarolinePascal
2025-10-27 14:27:36 +01:00
parent b879cf3d04
commit 6bd40ca219
@@ -95,7 +95,6 @@ class PortAudioMicrophone(Microphone):
self.audio_callback_start_event = process_Event()
# Process-safe concurrent queue to send audio from the recording process to the writing process/thread
# TODO(CarolinePascal): replace by a Pipe (more efficient !)
self.write_queue = process_Queue()
# SharedArray to store audio from the recording process.
@@ -108,6 +107,9 @@ class PortAudioMicrophone(Microphone):
self.logs = {}
def __str__(self) -> str:
return f"{self.__class__.__name__}({self.microphone_index})"
@property
def is_connected(self) -> bool:
return self.record_process is not None and self.record_process.is_alive()