Skip to content

Commit 3b5bf0d

Browse files
cleanup
1 parent c777793 commit 3b5bf0d

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

doggo.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,10 @@ async def call_robot(self, api_id, params=None):
6262
if params:
6363
args["parameter"] = params
6464

65-
async def _call():
66-
await self.dog.maybe_reconnect()
67-
await self.dog.robot.datachannel.pub_sub.publish_request_new(
68-
RTC_TOPIC["SPORT_MOD"], args
69-
)
70-
71-
asyncio.create_task(_call())
65+
await self.dog.maybe_reconnect()
66+
self.dog.robot.datachannel.pub_sub.publish_request_new(
67+
topic=RTC_TOPIC["SPORT_MOD"], args
68+
)
7269

7370
def tool(self):
7471
return Tool(
@@ -323,6 +320,9 @@ async def speak(self, text):
323320
await loop.run_in_executor(None, self._speak_sync, text)
324321

325322
def _speak_sync(self, text):
323+
if not self.awake:
324+
return
325+
326326
print("Speaking: ", text)
327327
response = self.elevenlabs.text_to_speech.convert(
328328
voice_id=self.voice_id,

0 commit comments

Comments
 (0)