sinapsis-speech 0.4.2__py3-none-any.whl → 0.4.3__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sinapsis-speech
3
- Version: 0.4.2
3
+ Version: 0.4.3
4
4
  Summary: Generate speech using various libraries.
5
5
  Author-email: SinapsisAI <dev@sinapsis.tech>
6
6
  Project-URL: Homepage, https://sinapsis.tech
@@ -30,15 +30,15 @@ sinapsis_parakeet_tdt/src/sinapsis_parakeet_tdt/helpers/__init__.py,sha256=47DEQ
30
30
  sinapsis_parakeet_tdt/src/sinapsis_parakeet_tdt/helpers/tags.py,sha256=OKZbq4zIL6XWM7eG5WuQ3dWYkmYNWjuCnlseXmjR_j0,262
31
31
  sinapsis_parakeet_tdt/src/sinapsis_parakeet_tdt/templates/__init__.py,sha256=3LppgbS6v70Rmx__yXXQgnoZ2ZBHcXkXeWZYQQf6Zwg,504
32
32
  sinapsis_parakeet_tdt/src/sinapsis_parakeet_tdt/templates/parakeet_tdt.py,sha256=ECNDd_zxkkop3WikQpkRW_bjLAMjROGpdWbChvaJdBE,9948
33
- sinapsis_speech-0.4.2.dist-info/licenses/LICENSE,sha256=hIahDEOTzuHCU5J2nd07LWwkLW7Hko4UFO__ffsvB-8,34523
33
+ sinapsis_speech-0.4.3.dist-info/licenses/LICENSE,sha256=hIahDEOTzuHCU5J2nd07LWwkLW7Hko4UFO__ffsvB-8,34523
34
34
  sinapsis_zonos/src/sinapsis_zonos/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
35
35
  sinapsis_zonos/src/sinapsis_zonos/helpers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
36
36
  sinapsis_zonos/src/sinapsis_zonos/helpers/tags.py,sha256=Y7MKQNx1E2k7ebF6r_1l1nBeS5k8hO424yFTT9NI7Rg,244
37
37
  sinapsis_zonos/src/sinapsis_zonos/helpers/zonos_keys.py,sha256=m1GdOYfzP73JGmtxH30mNiqbNkzFsQl9o2QaT7QxSVU,2470
38
38
  sinapsis_zonos/src/sinapsis_zonos/helpers/zonos_tts_utils.py,sha256=bwu88wsJGzEqbssgb-wpS_7lFscJ74J8cgyca-hX_Qw,6422
39
39
  sinapsis_zonos/src/sinapsis_zonos/templates/__init__.py,sha256=A-_F0K3hbEFqeWWAh4YftgU9CFX-WHrauSiCAww9yp8,482
40
- sinapsis_zonos/src/sinapsis_zonos/templates/zonos_tts.py,sha256=iwdouNWVt1phgQdW1Z3XtDz18K9IRbcYLFTmkT0l6i4,7698
41
- sinapsis_speech-0.4.2.dist-info/METADATA,sha256=tTNexyJQ4VvTH-VF-6hRx0M76wJikRSEpujw8OoMcos,12783
42
- sinapsis_speech-0.4.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
43
- sinapsis_speech-0.4.2.dist-info/top_level.txt,sha256=KvdwXupt5wnqb_4XGRcuJaL9Glgdw-DBvRkNzhgl_Ds,110
44
- sinapsis_speech-0.4.2.dist-info/RECORD,,
40
+ sinapsis_zonos/src/sinapsis_zonos/templates/zonos_tts.py,sha256=h5EToXoJgAgjqvz9WLDfSjhCsV5zgBwZrX5cTJ4VnhM,7679
41
+ sinapsis_speech-0.4.3.dist-info/METADATA,sha256=UZXiSYdXx8deyu9p28aaUkIDyxtfm1REJYrvV2JSj6E,12783
42
+ sinapsis_speech-0.4.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
43
+ sinapsis_speech-0.4.3.dist-info/top_level.txt,sha256=KvdwXupt5wnqb_4XGRcuJaL9Glgdw-DBvRkNzhgl_Ds,110
44
+ sinapsis_speech-0.4.3.dist-info/RECORD,,
@@ -109,16 +109,16 @@ class ZonosTTS(Template):
109
109
 
110
110
  Frees GPU memory by deleting the model and explicitly emptying the CUDA cache.
111
111
  """
112
- if self.model:
113
- del self.model
114
- torch.cuda.empty_cache()
112
+
113
+ torch.cuda.empty_cache()
114
+ torch.cuda.ipc_collect()
115
115
 
116
116
  def reset_state(self, template_name: str | None = None) -> None:
117
117
  """Reinitialize the model and random seed."""
118
118
  _ = template_name
119
+ super().reset_state(template_name)
119
120
  self._del_model()
120
- self.model = self._init_model()
121
- init_seed(self.attributes)
121
+
122
122
  self.logger.debug(f"Model {self.attributes.model} reset\nSeed: {self.attributes.seed}")
123
123
 
124
124
  def generate_speech(self, input_data: list[TextPacket]) -> torch.Tensor:
@@ -157,7 +157,9 @@ class ZonosTTS(Template):
157
157
  container (DataContainer): The container to store metadata.
158
158
  """
159
159
  audio_np = output_audio[0].cpu().numpy()
160
- container.audios.append(AudioPacket(content=audio_np, sample_rate=self.model.autoencoder.sampling_rate))
160
+ container.audios.append(
161
+ AudioPacket(content=audio_np.flatten(), sample_rate=self.model.autoencoder.sampling_rate)
162
+ )
161
163
 
162
164
  def execute(self, container: DataContainer) -> DataContainer:
163
165
  """Processes the input data and generates a speech output."""