smallestai 2.2.0__py3-none-any.whl → 3.0.1__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/__init__.py +95 -0
- smallestai/atoms/__init__.py +182 -0
- smallestai/atoms/api/__init__.py +12 -0
- smallestai/atoms/api/agent_templates_api.py +573 -0
- smallestai/atoms/api/agents_api.py +1465 -0
- smallestai/atoms/api/calls_api.py +320 -0
- smallestai/atoms/api/campaigns_api.py +1689 -0
- smallestai/atoms/api/knowledge_base_api.py +2271 -0
- smallestai/atoms/api/logs_api.py +305 -0
- smallestai/atoms/api/organization_api.py +285 -0
- smallestai/atoms/api/user_api.py +285 -0
- smallestai/atoms/api_client.py +797 -0
- smallestai/atoms/api_response.py +21 -0
- smallestai/atoms/atoms_client.py +560 -0
- smallestai/atoms/configuration.py +582 -0
- smallestai/atoms/exceptions.py +216 -0
- smallestai/atoms/models/__init__.py +72 -0
- smallestai/atoms/models/agent_dto.py +130 -0
- smallestai/atoms/models/agent_dto_language.py +91 -0
- smallestai/atoms/models/agent_dto_synthesizer.py +99 -0
- smallestai/atoms/models/agent_dto_synthesizer_voice_config.py +111 -0
- smallestai/atoms/models/api_response.py +89 -0
- smallestai/atoms/models/bad_request_error_response.py +89 -0
- smallestai/atoms/models/create_agent_from_template200_response.py +89 -0
- smallestai/atoms/models/create_agent_from_template_request.py +91 -0
- smallestai/atoms/models/create_agent_request.py +113 -0
- smallestai/atoms/models/create_agent_request_language.py +124 -0
- smallestai/atoms/models/create_agent_request_language_synthesizer.py +110 -0
- smallestai/atoms/models/create_agent_request_language_synthesizer_voice_config.py +137 -0
- smallestai/atoms/models/create_campaign201_response.py +93 -0
- smallestai/atoms/models/create_campaign201_response_data.py +104 -0
- smallestai/atoms/models/create_campaign_request.py +93 -0
- smallestai/atoms/models/create_knowledge_base201_response.py +89 -0
- smallestai/atoms/models/create_knowledge_base_request.py +89 -0
- smallestai/atoms/models/delete_agent200_response.py +87 -0
- smallestai/atoms/models/get_agent_by_id200_response.py +93 -0
- smallestai/atoms/models/get_agent_templates200_response.py +97 -0
- smallestai/atoms/models/get_agent_templates200_response_data_inner.py +97 -0
- smallestai/atoms/models/get_agents200_response.py +93 -0
- smallestai/atoms/models/get_agents200_response_data.py +101 -0
- smallestai/atoms/models/get_campaign_by_id200_response.py +93 -0
- smallestai/atoms/models/get_campaign_by_id200_response_data.py +110 -0
- smallestai/atoms/models/get_campaigns200_response.py +97 -0
- smallestai/atoms/models/get_campaigns200_response_data_inner.py +118 -0
- smallestai/atoms/models/get_campaigns200_response_data_inner_agent.py +89 -0
- smallestai/atoms/models/get_campaigns200_response_data_inner_audience.py +89 -0
- smallestai/atoms/models/get_campaigns_request.py +89 -0
- smallestai/atoms/models/get_conversation_logs200_response.py +93 -0
- smallestai/atoms/models/get_conversation_logs200_response_data.py +125 -0
- smallestai/atoms/models/get_current_user200_response.py +93 -0
- smallestai/atoms/models/get_current_user200_response_data.py +99 -0
- smallestai/atoms/models/get_knowledge_base_by_id200_response.py +93 -0
- smallestai/atoms/models/get_knowledge_base_items200_response.py +97 -0
- smallestai/atoms/models/get_knowledge_bases200_response.py +97 -0
- smallestai/atoms/models/get_organization200_response.py +93 -0
- smallestai/atoms/models/get_organization200_response_data.py +105 -0
- smallestai/atoms/models/get_organization200_response_data_members_inner.py +89 -0
- smallestai/atoms/models/get_organization200_response_data_subscription.py +87 -0
- smallestai/atoms/models/internal_server_error_response.py +89 -0
- smallestai/atoms/models/knowledge_base_dto.py +93 -0
- smallestai/atoms/models/knowledge_base_item_dto.py +124 -0
- smallestai/atoms/models/start_outbound_call200_response.py +93 -0
- smallestai/atoms/models/start_outbound_call200_response_data.py +87 -0
- smallestai/atoms/models/start_outbound_call_request.py +89 -0
- smallestai/atoms/models/unauthorized_error_reponse.py +89 -0
- smallestai/atoms/models/update_agent200_response.py +89 -0
- smallestai/atoms/models/update_agent_request.py +119 -0
- smallestai/atoms/models/update_agent_request_language.py +99 -0
- smallestai/atoms/models/update_agent_request_synthesizer.py +110 -0
- smallestai/atoms/models/update_agent_request_synthesizer_voice_config.py +137 -0
- smallestai/atoms/models/update_agent_request_synthesizer_voice_config_one_of.py +111 -0
- smallestai/atoms/models/update_agent_request_synthesizer_voice_config_one_of1.py +99 -0
- smallestai/atoms/models/upload_text_to_knowledge_base_request.py +89 -0
- smallestai/atoms/py.typed +0 -0
- smallestai/atoms/rest.py +258 -0
- smallestai/waves/__init__.py +5 -0
- smallest/async_tts.py → smallestai/waves/async_waves_client.py +3 -3
- {smallest → smallestai/waves}/stream_tts.py +6 -6
- {smallest → smallestai/waves}/utils.py +2 -2
- smallest/tts.py → smallestai/waves/waves_client.py +3 -3
- {smallestai-2.2.0.dist-info → smallestai-3.0.1.dist-info}/METADATA +182 -43
- smallestai-3.0.1.dist-info/RECORD +87 -0
- {smallestai-2.2.0.dist-info → smallestai-3.0.1.dist-info}/WHEEL +1 -1
- smallestai-3.0.1.dist-info/top_level.txt +1 -0
- smallest/__init__.py +0 -5
- smallestai-2.2.0.dist-info/RECORD +0 -12
- smallestai-2.2.0.dist-info/top_level.txt +0 -1
- {smallest → smallestai/waves}/exceptions.py +0 -0
- {smallest → smallestai/waves}/models.py +0 -0
- {smallestai-2.2.0.dist-info → smallestai-3.0.1.dist-info/licenses}/LICENSE +0 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: smallestai
|
|
3
|
-
Version:
|
|
3
|
+
Version: 3.0.1
|
|
4
4
|
Summary: Official Python client for the Smallest AI API
|
|
5
5
|
Author-email: Smallest <support@smallest.ai>
|
|
6
6
|
License: MIT
|
|
7
7
|
Project-URL: Homepage, https://github.com/smallest-inc/smallest-python-sdk
|
|
8
|
-
Keywords: smallest,smallest.ai,tts,text-to-speech
|
|
8
|
+
Keywords: smallest,smallest.ai,tts,text-to-speech,waves,atoms
|
|
9
9
|
Classifier: Intended Audience :: Developers
|
|
10
10
|
Classifier: License :: OSI Approved :: MIT License
|
|
11
11
|
Classifier: Programming Language :: Python :: 3
|
|
@@ -16,13 +16,24 @@ Requires-Dist: aiohttp
|
|
|
16
16
|
Requires-Dist: aiofiles
|
|
17
17
|
Requires-Dist: requests
|
|
18
18
|
Requires-Dist: pydub
|
|
19
|
+
Requires-Dist: urllib3<3.0.0,>=1.25.3
|
|
20
|
+
Requires-Dist: python-dateutil>=2.8.2
|
|
21
|
+
Requires-Dist: pydantic>=2
|
|
22
|
+
Requires-Dist: typing-extensions>=4.7.1
|
|
23
|
+
Requires-Dist: audioop-lts; python_version >= "3.13"
|
|
19
24
|
Provides-Extra: test
|
|
20
25
|
Requires-Dist: jiwer; extra == "test"
|
|
21
26
|
Requires-Dist: httpx; extra == "test"
|
|
22
|
-
Requires-Dist: pytest; extra == "test"
|
|
27
|
+
Requires-Dist: pytest>=7.2.1; extra == "test"
|
|
23
28
|
Requires-Dist: pytest-asyncio; extra == "test"
|
|
24
29
|
Requires-Dist: deepgram-sdk; extra == "test"
|
|
25
30
|
Requires-Dist: python-dotenv; extra == "test"
|
|
31
|
+
Requires-Dist: pytest-cov>=2.8.1; extra == "test"
|
|
32
|
+
Requires-Dist: tox>=3.9.0; extra == "test"
|
|
33
|
+
Requires-Dist: flake8>=4.0.0; extra == "test"
|
|
34
|
+
Requires-Dist: types-python-dateutil>=2.8.19.14; extra == "test"
|
|
35
|
+
Requires-Dist: mypy>=1.5; extra == "test"
|
|
36
|
+
Dynamic: license-file
|
|
26
37
|
|
|
27
38
|

|
|
28
39
|
|
|
@@ -30,7 +41,6 @@ Requires-Dist: python-dotenv; extra == "test"
|
|
|
30
41
|
<div align="center">
|
|
31
42
|
<a href="https://twitter.com/smallest_AI">
|
|
32
43
|
<img src="https://img.shields.io/twitter/url/https/twitter.com/smallest_AI.svg?style=social&label=Follow%20smallest_AI" alt="Twitter">
|
|
33
|
-
</a>
|
|
34
44
|
<a href="https://discord.gg/ywShEyXHBW">
|
|
35
45
|
<img src="https://dcbadge.vercel.app/api/server/ywShEyXHBW?style=flat" alt="Discord">
|
|
36
46
|
</a>
|
|
@@ -44,27 +54,36 @@ Requires-Dist: python-dotenv; extra == "test"
|
|
|
44
54
|
|
|
45
55
|
## Official Python Client for Smallest AI API
|
|
46
56
|
|
|
47
|
-
Smallest AI
|
|
57
|
+
Smallest AI offers an end to end Voice AI suite for developers trying to build real-time voice agents. You can either directly use our Text to Speech APIs through the Waves Client or use the Atoms Client to build and operate end to end enterprise ready Voice Agents.
|
|
58
|
+
|
|
59
|
+
With this sdk, you can easily interact with both Waves and Atoms from any Python 3.9+ application, by utilising WavesClient and AtomsClient classes respectively. Currently, the WavesClient supports direct synthesis and the ability to synthesize streamed LLM output, both synchronously and asynchronously. AtomsClient provides a simpler way of interacting with all our API's to develop and run agentic workflows.
|
|
48
60
|
|
|
49
|
-
|
|
61
|
+
To learn how to use our API's, check out our documentation for [Atoms](https://atoms-docs.smallest.ai/introduction) and [Waves](https://waves-docs.smallest.ai/content/introduction/)
|
|
50
62
|
|
|
51
63
|
## Table of Contents
|
|
52
64
|
|
|
53
65
|
- [Installation](#installation)
|
|
54
66
|
- [Get the API Key](#get-the-api-key)
|
|
55
|
-
- [
|
|
56
|
-
- [
|
|
57
|
-
- [
|
|
58
|
-
- [
|
|
59
|
-
- [
|
|
60
|
-
- [
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
- [
|
|
64
|
-
- [
|
|
65
|
-
- [
|
|
66
|
-
- [
|
|
67
|
-
- [
|
|
67
|
+
- [What are Atoms?](#what-are-atoms)
|
|
68
|
+
- [Creating your first Agent](#creating-your-first-agent)
|
|
69
|
+
- [Placing an outbound call](#placing-an-outbound-call)
|
|
70
|
+
- [Providing context to the agent](#providing-context-to-the-agent)
|
|
71
|
+
- [Configuring workflows to drive conversations](#configuring-workflows-to-drive-conversations)
|
|
72
|
+
- [Provisioning bulk calling using campaigns](#provisioning-bulk-calling-using-campaigns)
|
|
73
|
+
- [Getting started with Waves](#getting-started-with-waves)
|
|
74
|
+
- [Best Practices for Input Text](#best-practices-for-input-text)
|
|
75
|
+
- [Examples](#examples)
|
|
76
|
+
- [Synchronous](#synchronous)
|
|
77
|
+
- [Asynchronous](#asynchronous)
|
|
78
|
+
- [LLM to Speech](#llm-to-speech)
|
|
79
|
+
- [Add your Voice](#add-your-voice)
|
|
80
|
+
- [Synchronously](#add-synchronously)
|
|
81
|
+
- [Asynchronously](#add-asynchronously)
|
|
82
|
+
- [Delete your Voice](#delete-your-voice)
|
|
83
|
+
- [Synchronously](#delete-synchronously)
|
|
84
|
+
- [Asynchronously](#delete-asynchronously)
|
|
85
|
+
- [Available Methods](#available-methods)
|
|
86
|
+
- [Technical Note: WAV Headers in Streaming Audio](#technical-note-wav-headers-in-streaming-audio)
|
|
68
87
|
|
|
69
88
|
## Installation
|
|
70
89
|
|
|
@@ -77,24 +96,144 @@ When using an SDK in your application, make sure to pin to at least the major ve
|
|
|
77
96
|
|
|
78
97
|
## Get the API Key
|
|
79
98
|
|
|
80
|
-
1. Visit [
|
|
81
|
-
2. Navigate to `API
|
|
99
|
+
1. Visit [console.smallest.ai](https://console.smallest.ai//) and sign up for an account or log in if you already have an account.
|
|
100
|
+
2. Navigate to `API Keys` tab in your account dashboard.
|
|
82
101
|
3. Create a new API Key and copy it.
|
|
83
102
|
4. Export the API Key in your environment with the name `SMALLEST_API_KEY`, ensuring that your application can access it securely for authentication.
|
|
84
103
|
|
|
85
104
|
|
|
86
|
-
##
|
|
105
|
+
## What are Atoms
|
|
106
|
+
|
|
107
|
+
Atoms are agents that can talk to anyone on voice or text in any language, in any voice. Imagine an AI that you can hire to perform end-to-end tasks for your business. The following examples give an overview of how AtomsClient leverages abstractions such as KnowledgeBase, Campaigns and graph-based Workflows to let you build the smartest voice agent for your usecase.
|
|
108
|
+
|
|
109
|
+
You can find the full reference for Atoms [here](./docs/atoms/Api.md).
|
|
110
|
+
|
|
111
|
+
### Creating your first Agent
|
|
112
|
+
|
|
113
|
+
```python
|
|
114
|
+
from smallestai.atoms import AtomsClient
|
|
115
|
+
|
|
116
|
+
TARGET_PHONE_NUMBER = "+919666666666"
|
|
117
|
+
|
|
118
|
+
def main():
|
|
119
|
+
# alternatively, you can export API Key as environment variable SMALLEST_API_KEY.
|
|
120
|
+
config = Configuration(
|
|
121
|
+
access_token = 'SMALLEST_API_KEY'
|
|
122
|
+
)
|
|
123
|
+
|
|
124
|
+
atoms_client = AtomsClient(config)
|
|
125
|
+
|
|
126
|
+
agent_id = atoms_client.create_agent(
|
|
127
|
+
create_agent_request={
|
|
128
|
+
"name": "Atoms Multi-Modal Agent",
|
|
129
|
+
"description": "My first atoms agent",
|
|
130
|
+
"language": {
|
|
131
|
+
"enabled": "en",
|
|
132
|
+
"switching": False
|
|
133
|
+
},
|
|
134
|
+
"synthesizer": {
|
|
135
|
+
"voiceConfig": {
|
|
136
|
+
"model": "waves_lightning_large",
|
|
137
|
+
"voiceId": "nyah"
|
|
138
|
+
},
|
|
139
|
+
"speed": 1.2,
|
|
140
|
+
"consistency": 0.5,
|
|
141
|
+
"similarity": 0,
|
|
142
|
+
"enhancement": 1
|
|
143
|
+
},
|
|
144
|
+
"slmModel": "electron-v1",
|
|
145
|
+
}
|
|
146
|
+
).data
|
|
147
|
+
|
|
148
|
+
print(f"Successfully created agent with id: {agent_id}")
|
|
149
|
+
|
|
150
|
+
if __name__ == "__main__":
|
|
151
|
+
main()
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
### Placing an outbound call
|
|
155
|
+
|
|
156
|
+
```python
|
|
157
|
+
from smallestai.atoms import AtomsClient
|
|
158
|
+
from smallestai.atoms import Configuration
|
|
159
|
+
|
|
160
|
+
TARGET_PHONE_NUMBER = "+919666666666"
|
|
161
|
+
MY_AGENT_ID = "67e****ff*ec***82*3c9e**"
|
|
162
|
+
|
|
163
|
+
def main():
|
|
164
|
+
# assumes you have exported API_KEY in SMALLEST_API_KEY environment variable
|
|
165
|
+
atoms_client = AtomsClient()
|
|
166
|
+
|
|
167
|
+
call_response = atoms_client.start_outbound_call(
|
|
168
|
+
start_outbound_call_request={
|
|
169
|
+
"agent_id": MY_AGENT_ID,
|
|
170
|
+
"phone_number": TARGET_PHONE_NUMBER,
|
|
171
|
+
}
|
|
172
|
+
)
|
|
173
|
+
print(f"Successfully placed call with id: {call_response.conversation_id}")
|
|
174
|
+
|
|
175
|
+
if __name__ == "__main__":
|
|
176
|
+
main()
|
|
177
|
+
```
|
|
178
|
+
### Providing context to the agent
|
|
179
|
+
|
|
180
|
+
An agent can be attached to a knowledge base, which it can look up during conversations. Here is how you can do it:
|
|
181
|
+
|
|
182
|
+
```python
|
|
183
|
+
from smallestai.atoms import AtomsClient
|
|
184
|
+
|
|
185
|
+
def main():
|
|
186
|
+
# assumes you have exported API_KEY in SMALLEST_API_KEY environment variable
|
|
187
|
+
atoms_client = AtomsClient()
|
|
188
|
+
|
|
189
|
+
# Create a new knowledge base
|
|
190
|
+
knowledge_base = atoms_client.create_knowledge_base(
|
|
191
|
+
create_knowledge_base_request={
|
|
192
|
+
"name": "Customer Support Knowledge Base",
|
|
193
|
+
"description": "Contains FAQs and product information"
|
|
194
|
+
}
|
|
195
|
+
)
|
|
196
|
+
knowledge_base_id = knowledge_base.data
|
|
197
|
+
|
|
198
|
+
with open("product_manual.pdf", "rb") as f:
|
|
199
|
+
media_content = f.read()
|
|
200
|
+
media_response = atoms_client.upload_media_to_knowledge_base(
|
|
201
|
+
id=knowledge_base_id,
|
|
202
|
+
media=media_content
|
|
203
|
+
)
|
|
204
|
+
print("Added product_manual.pdf to knowledge base")
|
|
205
|
+
|
|
206
|
+
if __name__ == "__main__":
|
|
207
|
+
main()
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
### Configuring workflows to drive conversations
|
|
87
211
|
|
|
88
|
-
|
|
212
|
+
An agent can be configured with a graph-based workflow to help it drive meaningful conversations. You can explore making one on our [platform](https://atoms.smallest.ai/dashboard/agents). Refer to our [documentation](https://atoms-docs.smallest.ai/deep-dive/workflow/what-is-a-workflow) for learning more extensively.
|
|
213
|
+
|
|
214
|
+

|
|
215
|
+
|
|
216
|
+
### Provisioning bulk calling using campaigns
|
|
217
|
+
|
|
218
|
+
To manage bulk calls, you can use [Atoms platform](https://atoms.smallest.ai/dashboard/audience) to create [audience](https://atoms-docs.smallest.ai/deep-dive/audience/audience) (collection of contacts) and then configure [campaigns](https://atoms-docs.smallest.ai/deep-dive/campaign/campaign) to run.
|
|
219
|
+
|
|
220
|
+
## Getting started with Waves
|
|
221
|
+
|
|
222
|
+
### Best Practices for Input Text
|
|
223
|
+
|
|
224
|
+
### Examples
|
|
225
|
+
|
|
226
|
+
#### Synchronous
|
|
89
227
|
A synchronous text-to-speech synthesis client.
|
|
90
228
|
|
|
91
229
|
**Basic Usage:**
|
|
92
230
|
```python
|
|
93
|
-
|
|
231
|
+
|
|
232
|
+
from smallestai.waves import WavesClient
|
|
94
233
|
|
|
95
234
|
def main():
|
|
96
|
-
|
|
97
|
-
|
|
235
|
+
waves_client = WavesClient(api_key="SMALLEST_API_KEY")
|
|
236
|
+
waves_client.synthesize(
|
|
98
237
|
text="Hello, this is a test for sync synthesis function.",
|
|
99
238
|
save_as="sync_synthesize.wav"
|
|
100
239
|
)
|
|
@@ -127,17 +266,17 @@ client.synthesize(
|
|
|
127
266
|
```
|
|
128
267
|
|
|
129
268
|
|
|
130
|
-
|
|
269
|
+
#### Asynchronous
|
|
131
270
|
Asynchronous text-to-speech synthesis client.
|
|
132
271
|
|
|
133
272
|
**Basic Usage:**
|
|
134
273
|
```python
|
|
135
274
|
import asyncio
|
|
136
275
|
import aiofiles
|
|
137
|
-
|
|
276
|
+
import smallestai
|
|
138
277
|
|
|
139
278
|
async def main():
|
|
140
|
-
client =
|
|
279
|
+
client = smallestai.waves.AsyncWavesClient(api_key="SMALLEST_API_KEY")
|
|
141
280
|
async with client as tts:
|
|
142
281
|
audio_bytes = await tts.synthesize("Hello, this is a test of the async synthesis function.")
|
|
143
282
|
async with aiofiles.open("async_synthesize.wav", "wb") as f:
|
|
@@ -186,11 +325,11 @@ audio_bytes = await tts.synthesize(
|
|
|
186
325
|
)
|
|
187
326
|
```
|
|
188
327
|
|
|
189
|
-
|
|
328
|
+
#### LLM to Speech
|
|
190
329
|
|
|
191
330
|
The `TextToAudioStream` class provides real-time text-to-speech processing, converting streaming text into audio output. It's particularly useful for applications like voice assistants, live captioning, or interactive chatbots that require immediate audio feedback from text generation. Supports both synchronous and asynchronous TTS instance.
|
|
192
331
|
|
|
193
|
-
|
|
332
|
+
##### Stream through a WebSocket
|
|
194
333
|
|
|
195
334
|
```python
|
|
196
335
|
import asyncio
|
|
@@ -241,7 +380,7 @@ if __name__ == "__main__":
|
|
|
241
380
|
asyncio.run(main())
|
|
242
381
|
```
|
|
243
382
|
|
|
244
|
-
|
|
383
|
+
##### Save to a File
|
|
245
384
|
```python
|
|
246
385
|
import wave
|
|
247
386
|
import asyncio
|
|
@@ -306,10 +445,10 @@ The processor yields raw audio data chunks without WAV headers for streaming eff
|
|
|
306
445
|
- Streamed over a network
|
|
307
446
|
- Further processed as needed
|
|
308
447
|
|
|
309
|
-
|
|
448
|
+
#### Add your Voice
|
|
310
449
|
The Smallest AI SDK allows you to clone your voice by uploading an audio file. This feature is available both synchronously and asynchronously, making it flexible for different use cases. Below are examples of how to use this functionality.
|
|
311
450
|
|
|
312
|
-
|
|
451
|
+
##### Add Synchronously
|
|
313
452
|
```python
|
|
314
453
|
from smallest import Smallest
|
|
315
454
|
|
|
@@ -322,7 +461,7 @@ if __name__ == "__main__":
|
|
|
322
461
|
main()
|
|
323
462
|
```
|
|
324
463
|
|
|
325
|
-
|
|
464
|
+
##### Add Asynchronously
|
|
326
465
|
```python
|
|
327
466
|
import asyncio
|
|
328
467
|
from smallest import AsyncSmallest
|
|
@@ -336,10 +475,10 @@ if __name__ == "__main__":
|
|
|
336
475
|
asyncio.run(main())
|
|
337
476
|
```
|
|
338
477
|
|
|
339
|
-
|
|
478
|
+
#### Delete your Voice
|
|
340
479
|
The Smallest AI SDK allows you to delete your cloned voice. This feature is available both synchronously and asynchronously, making it flexible for different use cases. Below are examples of how to use this functionality.
|
|
341
480
|
|
|
342
|
-
|
|
481
|
+
##### Delete Synchronously
|
|
343
482
|
```python
|
|
344
483
|
from smallest import Smallest
|
|
345
484
|
|
|
@@ -352,7 +491,7 @@ if __name__ == "__main__":
|
|
|
352
491
|
main()
|
|
353
492
|
```
|
|
354
493
|
|
|
355
|
-
|
|
494
|
+
##### Delete Asynchronously
|
|
356
495
|
```python
|
|
357
496
|
import asyncio
|
|
358
497
|
from smallest import AsyncSmallest
|
|
@@ -366,7 +505,7 @@ if __name__ == "__main__":
|
|
|
366
505
|
asyncio.run(main())
|
|
367
506
|
```
|
|
368
507
|
|
|
369
|
-
|
|
508
|
+
#### Available Methods
|
|
370
509
|
|
|
371
510
|
```python
|
|
372
511
|
from smallest import Smallest
|
|
@@ -379,18 +518,18 @@ print(f"Available Voices: {client.get_cloned_voices()}")
|
|
|
379
518
|
print(f"Available Models: {client.get_models()}")
|
|
380
519
|
```
|
|
381
520
|
|
|
382
|
-
|
|
521
|
+
#### Technical Note: WAV Headers in Streaming Audio
|
|
383
522
|
|
|
384
523
|
When implementing audio streaming with chunks of synthesized speech, WAV headers are omitted from individual chunks because:
|
|
385
524
|
|
|
386
|
-
|
|
525
|
+
##### Technical Issues
|
|
387
526
|
- Each WAV header contains metadata about the entire audio file.
|
|
388
527
|
- Multiple headers would make chunks appear as separate audio files and add redundancy.
|
|
389
528
|
- Headers contain file-specific data (like total size) that's invalid for chunks.
|
|
390
529
|
- Sequential playback of chunks with headers causes audio artifacts (pop sounds) when concatenating or playing audio sequentially.
|
|
391
530
|
- Audio players would try to reinitialize audio settings for each chunk.
|
|
392
531
|
|
|
393
|
-
|
|
532
|
+
##### Best Practices for Audio Streaming
|
|
394
533
|
1. Stream raw PCM audio data without headers
|
|
395
534
|
2. Add a single WAV header only when:
|
|
396
535
|
- Saving the complete stream to a file
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
smallestai/__init__.py,sha256=zVO8iaNFVgNErxEt58AuB1npc7MR8x8Oi9A-Z2t8Q6w,2624
|
|
2
|
+
smallestai/atoms/__init__.py,sha256=cn5_9tVsUwFQ_zdAZv263P4ow4N7dxRWCYAz82GjwuI,9342
|
|
3
|
+
smallestai/atoms/api_client.py,sha256=EcyN6nFp9U4u8TPJx3a9ZvbM2T4a9xrHGopQGLZuJpw,27448
|
|
4
|
+
smallestai/atoms/api_response.py,sha256=eMxw1mpmJcoGZ3gs9z6jM4oYoZ10Gjk333s9sKxGv7s,652
|
|
5
|
+
smallestai/atoms/atoms_client.py,sha256=iQEPbnjRaAWo-RFwqUDrYF5h3EMnZYm5b4J7wyVrlpc,23496
|
|
6
|
+
smallestai/atoms/configuration.py,sha256=Q9p86XIcH5dMXJmIus7ncra3DgAGlSejdBMUqq4ALuE,18340
|
|
7
|
+
smallestai/atoms/exceptions.py,sha256=bQu7s-V5DH5g-Vi1N7uSYPuO_-JYXlW2TfHFOL04KAo,6433
|
|
8
|
+
smallestai/atoms/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
9
|
+
smallestai/atoms/rest.py,sha256=rT86MlRRO9lPXDH6VuEaUwMyeNl5caRd00LubxM7N6s,9432
|
|
10
|
+
smallestai/atoms/api/__init__.py,sha256=9jxkzMH4nqlcBYyH3ixdJkwF3ZqgmBHL3h6LtVUGTYs,520
|
|
11
|
+
smallestai/atoms/api/agent_templates_api.py,sha256=7_jX4BNFZ6eRTJe2o8diyxEpro2HYB6Lioa0zA7_gRM,23365
|
|
12
|
+
smallestai/atoms/api/agents_api.py,sha256=0iYOxjQur0S74wGbIj1QiKgtW_M8Ei1KaSlbDyIydI0,56346
|
|
13
|
+
smallestai/atoms/api/calls_api.py,sha256=E0nFzkI1hiNH4KWE68S7wob-JnuYcj1KqGK7oGHsg8o,12511
|
|
14
|
+
smallestai/atoms/api/campaigns_api.py,sha256=D5HGDHd2U1lhNMKPn-TMUDVAZMSOXYzxdgbj97x3L7Y,64720
|
|
15
|
+
smallestai/atoms/api/knowledge_base_api.py,sha256=WezdHQoliU8T-PsjGNk2IYyq6u0aq-6e-nzb4XiwvhE,89734
|
|
16
|
+
smallestai/atoms/api/logs_api.py,sha256=1sojnF-08zKtMxSpcHOdentghj-1JoPqWTXH4cWbzzY,11830
|
|
17
|
+
smallestai/atoms/api/organization_api.py,sha256=Bduw_YTK6ioHKE8HTqbRVp7d_ZbDu7loXYprLSHqCrU,10608
|
|
18
|
+
smallestai/atoms/api/user_api.py,sha256=76zvKzMYCmROs_HQWAq0S0XCfzNB5Yf1GIzdeS60eEM,10562
|
|
19
|
+
smallestai/atoms/models/__init__.py,sha256=s5DxDG3njaXD34bQsdm3Qo31PwBaO79MtpNTcnQvP7A,5787
|
|
20
|
+
smallestai/atoms/models/agent_dto.py,sha256=7lp9fbBKrfnWolyXT2K_xIB7QI_HIHo7vcwP_fcjvEM,5872
|
|
21
|
+
smallestai/atoms/models/agent_dto_language.py,sha256=6NQs9kVvWz0imE01mdWwwyLTnmeRsnUezJhkdKOnhbw,2934
|
|
22
|
+
smallestai/atoms/models/agent_dto_synthesizer.py,sha256=wlrnKMN3kF5azpfH-tmfuAKEPqwI7u7Ejoi7CL-eGw8,3850
|
|
23
|
+
smallestai/atoms/models/agent_dto_synthesizer_voice_config.py,sha256=zebSoOTv_u11POqKHM3WreKYWqr7QxGcMzLeINerkRo,3786
|
|
24
|
+
smallestai/atoms/models/api_response.py,sha256=2eCfbeDCg695blD8QKVacK1mwPIQC_0qXxJWE2kY3OI,2546
|
|
25
|
+
smallestai/atoms/models/bad_request_error_response.py,sha256=zkgU6NeDxddUzhAV0FunTRWrYsh6ex5HF_AuN_UuQhA,2614
|
|
26
|
+
smallestai/atoms/models/create_agent_from_template200_response.py,sha256=sgbUaQort1kw2uiiVZFQ6orqQioA2M0hNaMPP8KCLbI,2709
|
|
27
|
+
smallestai/atoms/models/create_agent_from_template_request.py,sha256=P-UOKqf-otmUoIhscdCKo1oSFFEsRQ21Ar1hy_BFt04,3067
|
|
28
|
+
smallestai/atoms/models/create_agent_request.py,sha256=794_Vgt8CMvlE_qwYvoQi5EF0OgIGLA5aS9qxrgFMzQ,4904
|
|
29
|
+
smallestai/atoms/models/create_agent_request_language.py,sha256=cZpex3ZXlMfYKYW1L8oLrlhsk94OX8ChXhXtTrU-a-g,5126
|
|
30
|
+
smallestai/atoms/models/create_agent_request_language_synthesizer.py,sha256=vupUNUwECH4CUql5yLEY4KdD6Ebcm6wqjg_xpEKClXs,4944
|
|
31
|
+
smallestai/atoms/models/create_agent_request_language_synthesizer_voice_config.py,sha256=2BiCvOWmkbSTm0STn9Hjw30EMDRZ9jAxZ-8HRza83zA,6636
|
|
32
|
+
smallestai/atoms/models/create_campaign201_response.py,sha256=RQx7y-VSzAs1mdKt4FxayYWTXnXjE2YcbAQRkwG_ip8,2947
|
|
33
|
+
smallestai/atoms/models/create_campaign201_response_data.py,sha256=L5nw5MRREPh9wMAHyyZ5HCuwqlYHpTSZvn5fggRfcHY,4106
|
|
34
|
+
smallestai/atoms/models/create_campaign_request.py,sha256=SZHMqJLxgXINA2t4kBcz_AzY-Henm0YwSPb_t1Fkr80,2993
|
|
35
|
+
smallestai/atoms/models/create_knowledge_base201_response.py,sha256=vZNJsmAWrwaHJFJkyH9BYSqLy9YSmPYscFiXdma8T-Q,2628
|
|
36
|
+
smallestai/atoms/models/create_knowledge_base_request.py,sha256=kVo0dnKq-7sYXc2-1X4t5twz4X5CwZEBjQTP4Gd-DYo,2602
|
|
37
|
+
smallestai/atoms/models/delete_agent200_response.py,sha256=dSSek6FoWFPCGCTRJCN8w4QkdJY-CaNydX59oLgu5j4,2503
|
|
38
|
+
smallestai/atoms/models/get_agent_by_id200_response.py,sha256=xEcKYD9dr2Awpxxw09MXlPdopRS8g6VX5-b11BxHsas,2853
|
|
39
|
+
smallestai/atoms/models/get_agent_templates200_response.py,sha256=UEOLL0VVfMX157G47Kyhqd8FgAtiWPOEffjLpatIDNw,3175
|
|
40
|
+
smallestai/atoms/models/get_agent_templates200_response_data_inner.py,sha256=9JuxFh5RXFQ_YO_TQAb5RbpcjjLVK-tf_hj8fQ6Vp1E,3438
|
|
41
|
+
smallestai/atoms/models/get_agents200_response.py,sha256=n-eCwPRkqe0xNoYn8ZMBCYfN3bFvGIozbUJTMHrXL24,2907
|
|
42
|
+
smallestai/atoms/models/get_agents200_response_data.py,sha256=TCxAELpPdsaqNoq3PyQp4W_r_f9dhV_uGeX8YbyFBAw,3580
|
|
43
|
+
smallestai/atoms/models/get_campaign_by_id200_response.py,sha256=OyjuzVcL3fcxOau6CqfBS4LrqxyMg0iMSJYJzIhTDbA,2957
|
|
44
|
+
smallestai/atoms/models/get_campaign_by_id200_response_data.py,sha256=uP1t4QXPsVo-iU44kZvs4uAu8fy7XUCDY6aLPTvLZ-I,4802
|
|
45
|
+
smallestai/atoms/models/get_campaigns200_response.py,sha256=E5GJUwZJSx65ko-DNwK3PGDVUJ49Z7t5V6qQ6oPdzE4,3134
|
|
46
|
+
smallestai/atoms/models/get_campaigns200_response_data_inner.py,sha256=9PVbplsKyCk1TVBQh8XbzQKgfCV1DR7qckiyR5N151s,5409
|
|
47
|
+
smallestai/atoms/models/get_campaigns200_response_data_inner_agent.py,sha256=zzJ6gK8ug44xQgFYecSBMV4FZ5fJ0a9j-KPJQnxmGrQ,2752
|
|
48
|
+
smallestai/atoms/models/get_campaigns200_response_data_inner_audience.py,sha256=OW8PRKI5dKX2fHgTtqpezE-SbrsN13kvB5tqNgjY58U,2770
|
|
49
|
+
smallestai/atoms/models/get_campaigns_request.py,sha256=1tB18zGHiL3M3Yczz1AbCZdrV0POrV07qij3tcbeMTs,2812
|
|
50
|
+
smallestai/atoms/models/get_conversation_logs200_response.py,sha256=H-6PF1xoTiOGVQLgzY-wNWsx5tZmT-K3t6buL9JEMoQ,2988
|
|
51
|
+
smallestai/atoms/models/get_conversation_logs200_response_data.py,sha256=zzqJXer4nLxLkfX2SPYQVs7PSo8NxQ07MWkMDyZZR0o,5554
|
|
52
|
+
smallestai/atoms/models/get_current_user200_response.py,sha256=rtevZM7dONTycqlP03uKzMAW9AeIdUw_zxR1pUJ3GW0,2948
|
|
53
|
+
smallestai/atoms/models/get_current_user200_response_data.py,sha256=X5IYlJ6HomuiXk-0K1jAbetIEDYFJDRqsVhD-X0qGWs,3713
|
|
54
|
+
smallestai/atoms/models/get_knowledge_base_by_id200_response.py,sha256=r6RaK1IgXqCbdqGHy-t3zEwWqX2WXPr4A0sRrC6PTs4,2918
|
|
55
|
+
smallestai/atoms/models/get_knowledge_base_items200_response.py,sha256=j5fCzR7m-VwzwhD2IkpmZpWNSfPdeZ58ts_lTpPr92s,3121
|
|
56
|
+
smallestai/atoms/models/get_knowledge_bases200_response.py,sha256=0uGGEc5Y8lVZAyeFE6EJDW0vDtjL10Toidd6dXMcvk8,3088
|
|
57
|
+
smallestai/atoms/models/get_organization200_response.py,sha256=6Apea32DyZu7_8rskl8LJiWYGlAoSkQny3GjfjdLtE4,2955
|
|
58
|
+
smallestai/atoms/models/get_organization200_response_data.py,sha256=_5SMwLbQJguadHK2udbbTyS6PvYQQyHD9zqMNtIRxYM,3898
|
|
59
|
+
smallestai/atoms/models/get_organization200_response_data_members_inner.py,sha256=j_6wI3nvx2X3hMHZDtDjpOMsd2LQ3QD1xOtL59PsOn4,2740
|
|
60
|
+
smallestai/atoms/models/get_organization200_response_data_subscription.py,sha256=iNtjC5fAHunAWSo50MJlyssnS1vJGZphjeYMffUICzQ,2620
|
|
61
|
+
smallestai/atoms/models/internal_server_error_response.py,sha256=NOGEBUknHF1zOMhFTsMICk7YO0I0HXzsD4F7ir0LUFs,2630
|
|
62
|
+
smallestai/atoms/models/knowledge_base_dto.py,sha256=r2I3ZM0_VAOjbJNh3KC2qSE5OPqZ8WQXhd5pQeIrmhE,2999
|
|
63
|
+
smallestai/atoms/models/knowledge_base_item_dto.py,sha256=BGNxsYk-m8x2fNAdLsKyvKAfujYydqA80m9eMH9k3FM,4421
|
|
64
|
+
smallestai/atoms/models/start_outbound_call200_response.py,sha256=vHDFP8D6-xw2Z3U-Hlnk_-Oxhc6TUQZFC7MTP_Supq8,2972
|
|
65
|
+
smallestai/atoms/models/start_outbound_call200_response_data.py,sha256=o2knQgPpbyN7fqetsbH9O5noPnf9wYWYQfKpdGHz6qs,2664
|
|
66
|
+
smallestai/atoms/models/start_outbound_call_request.py,sha256=hAb7KYLJlA5FzAcA4v5_JBBua4pj5FvdvmLroKP-wgg,2745
|
|
67
|
+
smallestai/atoms/models/unauthorized_error_reponse.py,sha256=TVV4SKcvCelKOsbKXTa3rL-pSHbMfKk3QZN6bSu1tgE,2618
|
|
68
|
+
smallestai/atoms/models/update_agent200_response.py,sha256=Kj0uArlKlbKT2tbgKQ4caPYWn2y4fCDwF6fuyIFutfE,2661
|
|
69
|
+
smallestai/atoms/models/update_agent_request.py,sha256=Mxy8Ij9wJ8xOkeKFplOaRe1-8onLwbezSUr9R44ntuE,5051
|
|
70
|
+
smallestai/atoms/models/update_agent_request_language.py,sha256=r4mEtJhbfwA-bBcMR4nfpT9qF732kXQh31ZfWVdzpUY,3419
|
|
71
|
+
smallestai/atoms/models/update_agent_request_synthesizer.py,sha256=2fRr23rZTWZegn4bCpGkt0RyoEHRAXA5LaNPFPYRtAo,4887
|
|
72
|
+
smallestai/atoms/models/update_agent_request_synthesizer_voice_config.py,sha256=txpS5fLeD0W1mNPj6gB5P3dNs_okEkBxZ9DWvZrvUs0,6572
|
|
73
|
+
smallestai/atoms/models/update_agent_request_synthesizer_voice_config_one_of.py,sha256=8nGPcJ_CRUlXXjy3vCjpmbHWVBwQo2ebFP1K0MZPAsk,3955
|
|
74
|
+
smallestai/atoms/models/update_agent_request_synthesizer_voice_config_one_of1.py,sha256=9AJxgngoNSMvDbceajIqnG23PY4rw84coTh7yUTNS3c,3487
|
|
75
|
+
smallestai/atoms/models/upload_text_to_knowledge_base_request.py,sha256=Sxg0vRv_naT15odE8fBUeyjwLpEYOmQwGcJuzRRr90A,2587
|
|
76
|
+
smallestai/waves/__init__.py,sha256=Hkq7N2nuz_wS7pC6QeUnIU1MzQnX_nrhfXGpjGSvFhQ,244
|
|
77
|
+
smallestai/waves/async_waves_client.py,sha256=hv9rQ8-ykWuHoAcmZPhwtX_-AAQT4H4G3H8c4BhO5-0,12658
|
|
78
|
+
smallestai/waves/exceptions.py,sha256=nY6I8fCXe2By54CytQ0-i3hFiYtt8TYAKj0g6OYsCjc,585
|
|
79
|
+
smallestai/waves/models.py,sha256=g2e_4nU5P48vyXZandKLWqZC1TkoEGeLvYKqJIqurSI,83
|
|
80
|
+
smallestai/waves/stream_tts.py,sha256=Ppjwp1jXpUSpyNkwCnesMYQbAdyzKLMj_1o1iTb3jaA,10958
|
|
81
|
+
smallestai/waves/utils.py,sha256=pyKx-JM6W112CJ_VvSVGqtlwKT6x2FOWp7X7DcHruXg,3365
|
|
82
|
+
smallestai/waves/waves_client.py,sha256=XKdPVWs-HZDzlxzF1x3cMdJQ_q71ZFS1P5oltzj2KO4,10740
|
|
83
|
+
smallestai-3.0.1.dist-info/licenses/LICENSE,sha256=kK3HNKhN7luQhkjkNWIvy9_gizbEDUM4mSv_HWq9uuM,1068
|
|
84
|
+
smallestai-3.0.1.dist-info/METADATA,sha256=mGthsmmMQVRXsN4CBqlxB7OunGSPFls8IAgVBXMuM3s,20392
|
|
85
|
+
smallestai-3.0.1.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
|
|
86
|
+
smallestai-3.0.1.dist-info/top_level.txt,sha256=pdJzm1VC2J6RxoobATz45L9U3cki4AFLigsfvETz7Io,11
|
|
87
|
+
smallestai-3.0.1.dist-info/RECORD,,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
smallestai
|
smallest/__init__.py
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
smallest/__init__.py,sha256=vaoIBml_IobavpVvFazB86iikg2iEy4h3ddxqv_0Fy4,190
|
|
2
|
-
smallest/async_tts.py,sha256=fyl1yBd4uqD2KthZMdnfsiY9ZlQlMXDK2JCWmjR03I4,12639
|
|
3
|
-
smallest/exceptions.py,sha256=nY6I8fCXe2By54CytQ0-i3hFiYtt8TYAKj0g6OYsCjc,585
|
|
4
|
-
smallest/models.py,sha256=g2e_4nU5P48vyXZandKLWqZC1TkoEGeLvYKqJIqurSI,83
|
|
5
|
-
smallest/stream_tts.py,sha256=MuQSOgOsZEAYcy-Hbs-ZhCNmtn0u3v9tfOk1RbfAsvY,10893
|
|
6
|
-
smallest/tts.py,sha256=_0OG-1DU0Fx3ZeVlJpNGk3fz6ZceaMfvb5ktkEH3tMw,10721
|
|
7
|
-
smallest/utils.py,sha256=7N4Pghv-6FQENdvWArxGpAuUF5xvcEJm2OxejJTIYnM,3349
|
|
8
|
-
smallestai-2.2.0.dist-info/LICENSE,sha256=kK3HNKhN7luQhkjkNWIvy9_gizbEDUM4mSv_HWq9uuM,1068
|
|
9
|
-
smallestai-2.2.0.dist-info/METADATA,sha256=-02Yij0bHSd6l1PKjJkZyuj7D5Zc5-fgZCeb5cA8T5c,14878
|
|
10
|
-
smallestai-2.2.0.dist-info/WHEEL,sha256=52BFRY2Up02UkjOa29eZOS2VxUrpPORXg1pkohGGUS8,91
|
|
11
|
-
smallestai-2.2.0.dist-info/top_level.txt,sha256=i5ktbWkG-2aS28vrYTeuhKtA-tY2ZG7SHgLHi87QTLw,9
|
|
12
|
-
smallestai-2.2.0.dist-info/RECORD,,
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
smallest
|
|
File without changes
|
|
File without changes
|
|
File without changes
|