Skip to content

Commit

Permalink
fix: incompatibility for Python 3.9 and older
Browse files Browse the repository at this point in the history
  • Loading branch information
frostming committed Apr 20, 2024
1 parent 547ea38 commit e0bdf4c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion xiaogpt/xiaogpt.py
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ async def run_forever(self):
await self.wakeup_xiaoai()

async def speak(self, text_stream: AsyncIterator[str]) -> None:
text = await anext(text_stream)
text = await text_stream.__anext__()
# See if the first part contains language code(e.g. en-US|Hello world)
lang, _, first_chunk = text.rpartition("|")
if len(lang) > 7:
Expand Down

0 comments on commit e0bdf4c

Please sign in to comment.