modify pause talk
This commit is contained in:
parent
055d1733f3
commit
362307f9f7
@ -121,3 +121,7 @@ class AudioInferenceHandler(AudioHandler):
|
|||||||
def stop(self):
|
def stop(self):
|
||||||
self._exit_event.clear()
|
self._exit_event.clear()
|
||||||
self._run_thread.join()
|
self._run_thread.join()
|
||||||
|
|
||||||
|
def pause_talk(self):
|
||||||
|
self._audio_queue.queue.clear()
|
||||||
|
self._mal_queue.queue.clear()
|
||||||
|
@ -89,3 +89,6 @@ class AudioMalHandler(AudioHandler):
|
|||||||
if self._thread.is_alive():
|
if self._thread.is_alive():
|
||||||
self._thread.join()
|
self._thread.join()
|
||||||
logging.info('chunk2mal stop')
|
logging.info('chunk2mal stop')
|
||||||
|
|
||||||
|
def pause_talk(self):
|
||||||
|
self._queue.queue.clear()
|
||||||
|
@ -21,7 +21,7 @@ except ImportError as e:
|
|||||||
|
|
||||||
def main():
|
def main():
|
||||||
print("Started! Please speak")
|
print("Started! Please speak")
|
||||||
handle = TTSAudioSaveHandle()
|
handle = TTSAudioSaveHandle(None, None)
|
||||||
tts = TTSEdge(handle)
|
tts = TTSEdge(handle)
|
||||||
split = PunctuationSplit()
|
split = PunctuationSplit()
|
||||||
nlp = DouBao(split, tts)
|
nlp = DouBao(split, tts)
|
||||||
|
Loading…
Reference in New Issue
Block a user