mirror of
https://github.com/huggingface/lerobot.git
synced 2026-07-23 17:56:07 +00:00
fix(__str__): adding missing __str__ method in PortAudioMicrophone
This commit is contained in:
@@ -95,7 +95,6 @@ class PortAudioMicrophone(Microphone):
|
|||||||
self.audio_callback_start_event = process_Event()
|
self.audio_callback_start_event = process_Event()
|
||||||
|
|
||||||
# Process-safe concurrent queue to send audio from the recording process to the writing process/thread
|
# 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()
|
self.write_queue = process_Queue()
|
||||||
|
|
||||||
# SharedArray to store audio from the recording process.
|
# SharedArray to store audio from the recording process.
|
||||||
@@ -108,6 +107,9 @@ class PortAudioMicrophone(Microphone):
|
|||||||
|
|
||||||
self.logs = {}
|
self.logs = {}
|
||||||
|
|
||||||
|
def __str__(self) -> str:
|
||||||
|
return f"{self.__class__.__name__}({self.microphone_index})"
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def is_connected(self) -> bool:
|
def is_connected(self) -> bool:
|
||||||
return self.record_process is not None and self.record_process.is_alive()
|
return self.record_process is not None and self.record_process.is_alive()
|
||||||
|
|||||||
Reference in New Issue
Block a user