diff --git a/Human.py b/Human.py index 4f35eda..a2ecf69 100644 --- a/Human.py +++ b/Human.py @@ -1,5 +1,6 @@ #encoding = utf8 import logging + import multiprocessing as mp import queue import time @@ -164,9 +165,7 @@ class Human: def on_destroy(self): self.render_event.set() - self._chunk_2_mal.stop() - if self._tts is not None: self._tts.stop() logger.info('human destroy') @@ -193,3 +192,12 @@ class Human: print("21") self._feat_queue.put(mel_chunks) print("22") + + # def pull_audio_chunk(self): + # try: + # chunk = self._audio_chunk_queue.get(block=True, timeout=1.0) + # type = 1 + # except queue.Empty: + # chunk = np.zeros(self._chunk, dtype=np.float32) + # type = 0 + # return chunk, type diff --git a/tts/Chunk2Mal.py b/tts/Chunk2Mal.py index 3d4e8a6..8396e78 100644 --- a/tts/Chunk2Mal.py +++ b/tts/Chunk2Mal.py @@ -1,4 +1,5 @@ #encoding = utf8 + import logging import queue from queue import Queue @@ -86,5 +87,3 @@ class Chunk2Mal: type = 0 return chunk, type - - diff --git a/ui.py b/ui.py index 503d018..1ace440 100644 --- a/ui.py +++ b/ui.py @@ -120,6 +120,7 @@ def config_logging(file_name: str, console_level: int=logging.INFO, file_level: if __name__ == "__main__": # logging.basicConfig(filename='./logs/info.log', level=logging.INFO) config_logging('./logs/info.log', logging.INFO, logging.INFO) + logger.info('------------start------------') app = App() app.mainloop()