Fix logging indentation in CosyVoice TTS method for improved clarity

This commit is contained in:
禾息
2025-04-16 11:24:51 +08:00
parent 62e04e8856
commit fd9b7d45e2

View File

@@ -135,9 +135,9 @@ class CosyVoice:
logging.info('synthesis text {}'.format(i))
for model_output in self.model.tts(**model_input, stream=stream, speed=speed):
speech_len = model_output['tts_speech'].shape[1] / self.sample_rate
logging.info('yield speech len {}, rtf {}'.format(speech_len, (time.time() - start_time) / speech_len))
yield model_output
start_time = time.time()
logging.info('yield speech len {}, rtf {}'.format(speech_len, (time.time() - start_time) / speech_len))
yield model_output
start_time = time.time()
cuda_stream.synchronize()
self.stream_pool.put(cuda_stream)