Skip to content
This repository has been archived by the owner on Apr 13, 2018. It is now read-only.

Commit

Permalink
新增闲聊模式
Browse files Browse the repository at this point in the history
  • Loading branch information
wzpan committed Aug 27, 2017
1 parent 3717eb4 commit 2ffb258
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion client/conversation.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ def handleForever(self):
continue
self._logger.info("Keyword '%s' has been said!", self.persona)
else:
self.mic.skip_passive = False
if not self.mic.chatting_mode:
self.mic.skip_passive = False

self._logger.debug("Started to listen actively with threshold: %r",
threshold)
Expand Down
1 change: 1 addition & 0 deletions client/mic.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ def __init__(self, profile, speaker, passive_stt_engine,
self._logger.info("Initialization of PyAudio completed.")
self.stop_passive = False
self.skip_passive = False
self.chatting_mode = False

def __del__(self):
self._audio.terminate()
Expand Down

0 comments on commit 2ffb258

Please sign in to comment.