Merge dev with main #27
@@ -44,17 +44,17 @@ class ActuationReceiver(ReceiverBase):
|
|||||||
return None
|
return None
|
||||||
|
|
||||||
def _handle_speech(self, message):
|
def _handle_speech(self, message):
|
||||||
if not self._qi_session: return
|
|
||||||
|
|
||||||
if not self._tts_service:
|
|
||||||
self._tts_service = self._qi_session.service("ALTextToSpeech")
|
|
||||||
|
|
||||||
text = message.get("data")
|
text = message.get("data")
|
||||||
if not text:
|
if not text:
|
||||||
logging.warn("Received message to speak, but it lacks data.")
|
logging.warn("Received message to speak, but it lacks data.")
|
||||||
return
|
return
|
||||||
|
|
||||||
logging.debug("Speaking received message: {}".format(text))
|
logging.debug("Received message to speak: {}".format(text))
|
||||||
|
|
||||||
|
if not self._qi_session: return
|
||||||
|
|
||||||
|
if not self._tts_service:
|
||||||
|
self._tts_service = self._qi_session.service("ALTextToSpeech")
|
||||||
|
|
||||||
self._tts_service.say(text)
|
self._tts_service.say(text)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user