1
1
mirror of https://github.com/leon-ai/leon.git synced 2024-11-27 16:16:48 +03:00

feat(python tcp server): warm up TTS model on start

This commit is contained in:
louistiti 2024-05-23 09:24:46 +08:00
parent 528257664a
commit beb208973f
No known key found for this signature in database
GPG Key ID: 92CD6A2E497E1669

View File

@ -72,6 +72,11 @@ class TTS(nn.Module):
self.log(f"Time taken to load model: {toc - tic:0.4f} seconds")
self.log('Warming up model...')
speaker_ids = self.hps.data.spk2id
self.tts_to_file('This is a test.', speaker_ids['EN-Leon-V1'], quiet=True, format='wav')
self.log('Model warmed up')
@staticmethod
def audio_numpy_concat(segment_data_list, sr, speed=1.):
audio_segments = []