merge overide

This commit is contained in:
jiegeaiai 2024-09-09 08:30:15 +08:00
commit b0a600c7b7
3 changed files with 12 additions and 4 deletions

View File

@ -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

View File

@ -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

1
ui.py
View File

@ -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()