smallestai 3.0.3__py3-none-any.whl → 3.1.0__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.
Potentially problematic release.
This version of smallestai might be problematic. Click here for more details.
- smallestai/waves/async_waves_client.py +4 -4
- smallestai/waves/models.py +5 -2
- smallestai/waves/utils.py +10 -3
- smallestai/waves/waves_client.py +4 -4
- {smallestai-3.0.3.dist-info → smallestai-3.1.0.dist-info}/METADATA +1 -1
- {smallestai-3.0.3.dist-info → smallestai-3.1.0.dist-info}/RECORD +9 -9
- {smallestai-3.0.3.dist-info → smallestai-3.1.0.dist-info}/WHEEL +1 -1
- {smallestai-3.0.3.dist-info → smallestai-3.1.0.dist-info}/licenses/LICENSE +0 -0
- {smallestai-3.0.3.dist-info → smallestai-3.1.0.dist-info}/top_level.txt +0 -0
|
@@ -89,9 +89,9 @@ class AsyncWavesClient:
|
|
|
89
89
|
return False
|
|
90
90
|
|
|
91
91
|
|
|
92
|
-
def get_languages(self) -> List[str]:
|
|
92
|
+
def get_languages(self, model="lightning") -> List[str]:
|
|
93
93
|
"""Returns a list of available languages."""
|
|
94
|
-
return get_smallest_languages()
|
|
94
|
+
return get_smallest_languages(model)
|
|
95
95
|
|
|
96
96
|
def get_cloned_voices(self) -> str:
|
|
97
97
|
"""Returns a list of your cloned voices."""
|
|
@@ -176,7 +176,7 @@ class AsyncWavesClient:
|
|
|
176
176
|
validate_input(text, opts.model, opts.sample_rate, opts.speed, opts.consistency, opts.similarity, opts.enhancement)
|
|
177
177
|
|
|
178
178
|
self.chunk_size = 250
|
|
179
|
-
if opts.model == 'lightning-large':
|
|
179
|
+
if opts.model == 'lightning-large' or opts.model == "lightning-v2":
|
|
180
180
|
self.chunk_size = 140
|
|
181
181
|
|
|
182
182
|
chunks = chunk_text(text, self.chunk_size)
|
|
@@ -192,7 +192,7 @@ class AsyncWavesClient:
|
|
|
192
192
|
"model": opts.model
|
|
193
193
|
}
|
|
194
194
|
|
|
195
|
-
if opts.model == "lightning-large":
|
|
195
|
+
if opts.model == "lightning-large" or opts.model == "lightning-v2":
|
|
196
196
|
if opts.consistency is not None:
|
|
197
197
|
payload["consistency"] = opts.consistency
|
|
198
198
|
if opts.similarity is not None:
|
smallestai/waves/models.py
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
TTSLanguages_lightning = ["en", "hi"]
|
|
2
|
+
TTSLanguages_lightning_large = ["en", "hi"]
|
|
3
|
+
TTSLanguages_lightning_v2 = ["en", "hi", "mr", "kn", "ta", "bn", "gu", "de", "fr", "es", "it", "pl", "nl", "ru", "ar", "he"]
|
|
2
4
|
TTSModels = [
|
|
3
5
|
"lightning",
|
|
4
|
-
"lightning-large"
|
|
6
|
+
"lightning-large",
|
|
7
|
+
"lightning-v2"
|
|
5
8
|
]
|
smallestai/waves/utils.py
CHANGED
|
@@ -6,7 +6,7 @@ from pydub import AudioSegment
|
|
|
6
6
|
from dataclasses import dataclass
|
|
7
7
|
|
|
8
8
|
from smallestai.waves.exceptions import ValidationError
|
|
9
|
-
from smallestai.waves.models import TTSModels,
|
|
9
|
+
from smallestai.waves.models import TTSModels, TTSLanguages_lightning, TTSLanguages_lightning_large, TTSLanguages_lightning_v2
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
API_BASE_URL = "https://waves-api.smallest.ai/api/v1"
|
|
@@ -90,8 +90,15 @@ def chunk_text(text: str, chunk_size: int = 250) -> List[str]:
|
|
|
90
90
|
return chunks
|
|
91
91
|
|
|
92
92
|
|
|
93
|
-
def get_smallest_languages() -> List[str]:
|
|
94
|
-
|
|
93
|
+
def get_smallest_languages(model: str = 'lightning') -> List[str]:
|
|
94
|
+
if model == 'lightning':
|
|
95
|
+
return TTSLanguages_lightning
|
|
96
|
+
elif model == 'lightning-large':
|
|
97
|
+
return TTSLanguages_lightning_large
|
|
98
|
+
elif model == 'lightning-v2':
|
|
99
|
+
return TTSLanguages_lightning_v2
|
|
100
|
+
else:
|
|
101
|
+
raise ValidationError(f"Invalid model: {model}. Must be one of {TTSModels}")
|
|
95
102
|
|
|
96
103
|
def get_smallest_models() -> List[str]:
|
|
97
104
|
return TTSModels
|
smallestai/waves/waves_client.py
CHANGED
|
@@ -66,9 +66,9 @@ class WavesClient:
|
|
|
66
66
|
)
|
|
67
67
|
|
|
68
68
|
|
|
69
|
-
def get_languages(self) -> List[str]:
|
|
69
|
+
def get_languages(self, model:str="lightning") -> List[str]:
|
|
70
70
|
"""Returns a list of available languages."""
|
|
71
|
-
return get_smallest_languages()
|
|
71
|
+
return get_smallest_languages(model)
|
|
72
72
|
|
|
73
73
|
def get_cloned_voices(self) -> str:
|
|
74
74
|
"""Returns a list of your cloned voices."""
|
|
@@ -144,7 +144,7 @@ class WavesClient:
|
|
|
144
144
|
validate_input(text, opts.model, opts.sample_rate, opts.speed, opts.consistency, opts.similarity, opts.enhancement)
|
|
145
145
|
|
|
146
146
|
self.chunk_size = 250
|
|
147
|
-
if opts.model == "lightning-large":
|
|
147
|
+
if opts.model == "lightning-large" or opts.model == "lightning-v2":
|
|
148
148
|
self.chunk_size = 140
|
|
149
149
|
|
|
150
150
|
chunks = chunk_text(text, self.chunk_size)
|
|
@@ -159,7 +159,7 @@ class WavesClient:
|
|
|
159
159
|
"speed": opts.speed,
|
|
160
160
|
}
|
|
161
161
|
|
|
162
|
-
if opts.model == "lightning-large":
|
|
162
|
+
if opts.model == "lightning-large" or opts.model == "lightning-v2":
|
|
163
163
|
if opts.consistency is not None:
|
|
164
164
|
payload["consistency"] = opts.consistency
|
|
165
165
|
if opts.similarity is not None:
|
|
@@ -74,14 +74,14 @@ smallestai/atoms/models/update_agent_request_synthesizer_voice_config_one_of.py,
|
|
|
74
74
|
smallestai/atoms/models/update_agent_request_synthesizer_voice_config_one_of1.py,sha256=9AJxgngoNSMvDbceajIqnG23PY4rw84coTh7yUTNS3c,3487
|
|
75
75
|
smallestai/atoms/models/upload_text_to_knowledge_base_request.py,sha256=Sxg0vRv_naT15odE8fBUeyjwLpEYOmQwGcJuzRRr90A,2587
|
|
76
76
|
smallestai/waves/__init__.py,sha256=Hkq7N2nuz_wS7pC6QeUnIU1MzQnX_nrhfXGpjGSvFhQ,244
|
|
77
|
-
smallestai/waves/async_waves_client.py,sha256=
|
|
77
|
+
smallestai/waves/async_waves_client.py,sha256=sZrBnH_oi3wumL-w_2ccn1MZkLz7eYOyUFZEwjC-2vY,12746
|
|
78
78
|
smallestai/waves/exceptions.py,sha256=nY6I8fCXe2By54CytQ0-i3hFiYtt8TYAKj0g6OYsCjc,585
|
|
79
|
-
smallestai/waves/models.py,sha256=
|
|
79
|
+
smallestai/waves/models.py,sha256=FaMVkOFyNCVpWvyMCmqkv3t1wmnfCs1HIULxLr1L8XE,283
|
|
80
80
|
smallestai/waves/stream_tts.py,sha256=Ppjwp1jXpUSpyNkwCnesMYQbAdyzKLMj_1o1iTb3jaA,10958
|
|
81
|
-
smallestai/waves/utils.py,sha256=
|
|
82
|
-
smallestai/waves/waves_client.py,sha256=
|
|
83
|
-
smallestai-3.0.
|
|
84
|
-
smallestai-3.0.
|
|
85
|
-
smallestai-3.0.
|
|
86
|
-
smallestai-3.0.
|
|
87
|
-
smallestai-3.0.
|
|
81
|
+
smallestai/waves/utils.py,sha256=UPThOnh1O5_6nZ9ZBJoY--iDOnFKBP9Nq3qGHhuDPbc,3692
|
|
82
|
+
smallestai/waves/waves_client.py,sha256=KMUpWolrKqEP24DTRkNzHWpYuWxO3buVpX1cHn90gGY,10832
|
|
83
|
+
smallestai-3.1.0.dist-info/licenses/LICENSE,sha256=kK3HNKhN7luQhkjkNWIvy9_gizbEDUM4mSv_HWq9uuM,1068
|
|
84
|
+
smallestai-3.1.0.dist-info/METADATA,sha256=Gs-xjdLWK7ihF3JH98PpZd4afswx-6Qj7BT3IxUyHoA,20392
|
|
85
|
+
smallestai-3.1.0.dist-info/WHEEL,sha256=zaaOINJESkSfm_4HQVc5ssNzHCPXhJm0kEUakpsEHaU,91
|
|
86
|
+
smallestai-3.1.0.dist-info/top_level.txt,sha256=pdJzm1VC2J6RxoobATz45L9U3cki4AFLigsfvETz7Io,11
|
|
87
|
+
smallestai-3.1.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|