chore: applied all feedback
close: N25B-298
This commit is contained in:
@@ -20,7 +20,7 @@ class ActuationReceiver(ReceiverBase):
|
||||
:type port: int
|
||||
|
||||
:ivar _tts_service: The text-to-speech service object from the Qi session.
|
||||
:vartype _tts_service: ssl.SSLSession | None
|
||||
:vartype _tts_service: qi.Session | None
|
||||
"""
|
||||
def __init__(self, zmq_context, port=settings.agent_settings.actuating_receiver_port):
|
||||
|
||||
|
||||
@@ -24,13 +24,13 @@ class AudioSender(SocketBase):
|
||||
:type port: int
|
||||
|
||||
:ivar thread: Thread used for sending audio.
|
||||
:type thread: threading.Thread | None
|
||||
:vartype thread: threading.Thread | None
|
||||
|
||||
:ivar audio: PyAudio instance.
|
||||
:type audio: pyaudio.PyAudio | None
|
||||
:vartype audio: pyaudio.PyAudio | None
|
||||
|
||||
:ivar microphone: Selected microphone information.
|
||||
:type microphone: dict | None
|
||||
:vartype microphone: dict | None
|
||||
"""
|
||||
def __init__(self, zmq_context, port=settings.agent_settings.audio_sender_port):
|
||||
super(AudioSender, self).__init__(str("audio")) # Convert future's unicode_literal to str
|
||||
@@ -51,7 +51,6 @@ class AudioSender(SocketBase):
|
||||
|
||||
Will not start if no microphone is available.
|
||||
"""
|
||||
|
||||
if not self.microphone:
|
||||
logger.info("Not listening: no microphone available.")
|
||||
return
|
||||
|
||||
@@ -7,17 +7,20 @@ class SocketBase(object):
|
||||
"""
|
||||
Base class for endpoints associated with a ZeroMQ socket.
|
||||
|
||||
:ivar identifier: The identifier of the endpoint.
|
||||
:param identifier: The identifier of the endpoint.
|
||||
:type identifier: str
|
||||
|
||||
:ivar identifier: The identifier of the endpoint.
|
||||
:vartype identifier: str
|
||||
|
||||
:ivar port: The port used by the socket, set by `create_socket`.
|
||||
:type port: int | None
|
||||
:vartype port: int | None
|
||||
|
||||
:ivar socket: The ZeroMQ socket object, set by `create_socket`.
|
||||
:type socket: zmq.Socket | None
|
||||
:vartype socket: zmq.Socket | None
|
||||
|
||||
:ivar bound: Whether the socket is bound or connected, set by `create_socket`.
|
||||
:type bound: bool | None
|
||||
:vartype bound: bool | None
|
||||
"""
|
||||
__metaclass__ = ABCMeta
|
||||
|
||||
@@ -43,8 +46,7 @@ class SocketBase(object):
|
||||
:param port: The port to use.
|
||||
:type port: int
|
||||
|
||||
:param options: A list of options to be set on the socket. The list contains tuples where the first element contains the option
|
||||
and the second the value, for example (zmq.CONFLATE, 1).
|
||||
:param options: A list of tuples where the first element contains the option and the second the value.
|
||||
:type options: list[tuple[int, int]]
|
||||
|
||||
:param bind: Whether to bind the socket or connect to it.
|
||||
@@ -73,7 +75,7 @@ class SocketBase(object):
|
||||
Description of the endpoint. Used for negotiation.
|
||||
|
||||
:return: A dictionary with the following keys: id, port, bind. See API specification at:
|
||||
https://utrechtuniversity.youtrack.cloud/articles/N25B-A-14/RI-CB-Communication#negotiation
|
||||
https://utrechtuniversity.youtrack.cloud/articles/N25B-A-14/RI-CB-Communication#negotiation
|
||||
:rtype: dict
|
||||
"""
|
||||
return {
|
||||
|
||||
@@ -24,7 +24,7 @@ class VideoSender(SocketBase):
|
||||
"""
|
||||
Prepares arguments for retrieving video images from Pepper and starts video loop on a separate thread.
|
||||
|
||||
Will not start of no qi session is available.
|
||||
Will not start if no qi session is available.
|
||||
"""
|
||||
if not state.qi_session:
|
||||
logging.info("No Qi session available. Not starting video loop.")
|
||||
|
||||
Reference in New Issue
Block a user