smallestai 2.1.0__tar.gz → 3.0.0__tar.gz
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-2.1.0/smallestai.egg-info → smallestai-3.0.0}/PKG-INFO +194 -43
- {smallestai-2.1.0 → smallestai-3.0.0}/README.md +180 -38
- {smallestai-2.1.0 → smallestai-3.0.0}/pyproject.toml +14 -6
- smallestai-3.0.0/smallestai/__init__.py +95 -0
- smallestai-3.0.0/smallestai/atoms/__init__.py +182 -0
- smallestai-3.0.0/smallestai/atoms/api/__init__.py +12 -0
- smallestai-3.0.0/smallestai/atoms/api/agent_templates_api.py +573 -0
- smallestai-3.0.0/smallestai/atoms/api/agents_api.py +1465 -0
- smallestai-3.0.0/smallestai/atoms/api/calls_api.py +320 -0
- smallestai-3.0.0/smallestai/atoms/api/campaigns_api.py +1689 -0
- smallestai-3.0.0/smallestai/atoms/api/knowledge_base_api.py +2271 -0
- smallestai-3.0.0/smallestai/atoms/api/logs_api.py +305 -0
- smallestai-3.0.0/smallestai/atoms/api/organization_api.py +285 -0
- smallestai-3.0.0/smallestai/atoms/api/user_api.py +285 -0
- smallestai-3.0.0/smallestai/atoms/api_client.py +797 -0
- smallestai-3.0.0/smallestai/atoms/api_response.py +21 -0
- smallestai-3.0.0/smallestai/atoms/atoms_client.py +560 -0
- smallestai-3.0.0/smallestai/atoms/configuration.py +582 -0
- smallestai-3.0.0/smallestai/atoms/exceptions.py +216 -0
- smallestai-3.0.0/smallestai/atoms/models/__init__.py +72 -0
- smallestai-3.0.0/smallestai/atoms/models/agent_dto.py +130 -0
- smallestai-3.0.0/smallestai/atoms/models/agent_dto_language.py +91 -0
- smallestai-3.0.0/smallestai/atoms/models/agent_dto_synthesizer.py +99 -0
- smallestai-3.0.0/smallestai/atoms/models/agent_dto_synthesizer_voice_config.py +111 -0
- smallestai-3.0.0/smallestai/atoms/models/api_response.py +89 -0
- smallestai-3.0.0/smallestai/atoms/models/bad_request_error_response.py +89 -0
- smallestai-3.0.0/smallestai/atoms/models/create_agent_from_template200_response.py +89 -0
- smallestai-3.0.0/smallestai/atoms/models/create_agent_from_template_request.py +91 -0
- smallestai-3.0.0/smallestai/atoms/models/create_agent_request.py +113 -0
- smallestai-3.0.0/smallestai/atoms/models/create_agent_request_language.py +124 -0
- smallestai-3.0.0/smallestai/atoms/models/create_agent_request_language_synthesizer.py +110 -0
- smallestai-3.0.0/smallestai/atoms/models/create_agent_request_language_synthesizer_voice_config.py +137 -0
- smallestai-3.0.0/smallestai/atoms/models/create_campaign200_response.py +93 -0
- smallestai-3.0.0/smallestai/atoms/models/create_campaign200_response_data.py +106 -0
- smallestai-3.0.0/smallestai/atoms/models/create_campaign200_response_inner.py +106 -0
- smallestai-3.0.0/smallestai/atoms/models/create_campaign201_response.py +93 -0
- smallestai-3.0.0/smallestai/atoms/models/create_campaign201_response_data.py +104 -0
- smallestai-3.0.0/smallestai/atoms/models/create_campaign_request.py +93 -0
- smallestai-3.0.0/smallestai/atoms/models/create_knowledge_base201_response.py +89 -0
- smallestai-3.0.0/smallestai/atoms/models/create_knowledge_base_request.py +89 -0
- smallestai-3.0.0/smallestai/atoms/models/delete_agent200_response.py +87 -0
- smallestai-3.0.0/smallestai/atoms/models/get_agent_by_id200_response.py +93 -0
- smallestai-3.0.0/smallestai/atoms/models/get_agent_templates200_response.py +97 -0
- smallestai-3.0.0/smallestai/atoms/models/get_agent_templates200_response_data_inner.py +97 -0
- smallestai-3.0.0/smallestai/atoms/models/get_agents200_response.py +93 -0
- smallestai-3.0.0/smallestai/atoms/models/get_agents200_response_data.py +101 -0
- smallestai-3.0.0/smallestai/atoms/models/get_campaign_by_id200_response.py +93 -0
- smallestai-3.0.0/smallestai/atoms/models/get_campaign_by_id200_response_data.py +114 -0
- smallestai-3.0.0/smallestai/atoms/models/get_campaigns200_response.py +97 -0
- smallestai-3.0.0/smallestai/atoms/models/get_campaigns200_response_data_inner.py +118 -0
- smallestai-3.0.0/smallestai/atoms/models/get_campaigns200_response_data_inner_agent.py +89 -0
- smallestai-3.0.0/smallestai/atoms/models/get_campaigns200_response_data_inner_audience.py +89 -0
- smallestai-3.0.0/smallestai/atoms/models/get_campaigns_request.py +89 -0
- smallestai-3.0.0/smallestai/atoms/models/get_conversation200_response.py +93 -0
- smallestai-3.0.0/smallestai/atoms/models/get_conversation200_response_data.py +125 -0
- smallestai-3.0.0/smallestai/atoms/models/get_conversation_logs200_response.py +93 -0
- smallestai-3.0.0/smallestai/atoms/models/get_conversation_logs200_response_data.py +125 -0
- smallestai-3.0.0/smallestai/atoms/models/get_current_user200_response.py +93 -0
- smallestai-3.0.0/smallestai/atoms/models/get_current_user200_response_data.py +99 -0
- smallestai-3.0.0/smallestai/atoms/models/get_knowledge_base_by_id200_response.py +93 -0
- smallestai-3.0.0/smallestai/atoms/models/get_knowledge_base_items200_response.py +97 -0
- smallestai-3.0.0/smallestai/atoms/models/get_knowledge_bases200_response.py +97 -0
- smallestai-3.0.0/smallestai/atoms/models/get_organization200_response.py +93 -0
- smallestai-3.0.0/smallestai/atoms/models/get_organization200_response_data.py +105 -0
- smallestai-3.0.0/smallestai/atoms/models/get_organization200_response_data_members_inner.py +89 -0
- smallestai-3.0.0/smallestai/atoms/models/get_organization200_response_data_subscription.py +87 -0
- smallestai-3.0.0/smallestai/atoms/models/internal_server_error_response.py +89 -0
- smallestai-3.0.0/smallestai/atoms/models/knowledge_base_dto.py +93 -0
- smallestai-3.0.0/smallestai/atoms/models/knowledge_base_item_dto.py +124 -0
- smallestai-3.0.0/smallestai/atoms/models/start_outbound_call200_response.py +93 -0
- smallestai-3.0.0/smallestai/atoms/models/start_outbound_call200_response_data.py +87 -0
- smallestai-3.0.0/smallestai/atoms/models/start_outbound_call_request.py +89 -0
- smallestai-3.0.0/smallestai/atoms/models/unauthorized_error_reponse.py +89 -0
- smallestai-3.0.0/smallestai/atoms/models/update_agent200_response.py +89 -0
- smallestai-3.0.0/smallestai/atoms/models/update_agent_request.py +119 -0
- smallestai-3.0.0/smallestai/atoms/models/update_agent_request_language.py +99 -0
- smallestai-3.0.0/smallestai/atoms/models/update_agent_request_synthesizer.py +110 -0
- smallestai-3.0.0/smallestai/atoms/models/update_agent_request_synthesizer_voice_config.py +137 -0
- smallestai-3.0.0/smallestai/atoms/models/update_agent_request_synthesizer_voice_config_one_of.py +111 -0
- smallestai-3.0.0/smallestai/atoms/models/update_agent_request_synthesizer_voice_config_one_of1.py +99 -0
- smallestai-3.0.0/smallestai/atoms/models/upload_text_to_knowledge_base_request.py +89 -0
- smallestai-3.0.0/smallestai/atoms/py.typed +0 -0
- smallestai-3.0.0/smallestai/atoms/rest.py +258 -0
- smallestai-3.0.0/smallestai/waves/__init__.py +5 -0
- smallestai-2.1.0/smallest/async_tts.py → smallestai-3.0.0/smallestai/waves/async_waves_client.py +60 -47
- smallestai-3.0.0/smallestai/waves/stream_tts.py +272 -0
- {smallestai-2.1.0/smallest → smallestai-3.0.0/smallestai/waves}/utils.py +8 -8
- smallestai-2.1.0/smallest/tts.py → smallestai-3.0.0/smallestai/waves/waves_client.py +58 -46
- {smallestai-2.1.0 → smallestai-3.0.0/smallestai.egg-info}/PKG-INFO +194 -43
- smallestai-3.0.0/smallestai.egg-info/SOURCES.txt +95 -0
- smallestai-3.0.0/smallestai.egg-info/requires.txt +21 -0
- smallestai-3.0.0/smallestai.egg-info/top_level.txt +1 -0
- smallestai-2.1.0/smallest/__init__.py +0 -5
- smallestai-2.1.0/smallest/stream_tts.py +0 -161
- smallestai-2.1.0/smallestai.egg-info/SOURCES.txt +0 -18
- smallestai-2.1.0/smallestai.egg-info/requires.txt +0 -13
- smallestai-2.1.0/smallestai.egg-info/top_level.txt +0 -1
- smallestai-2.1.0/tests/test_async.py +0 -105
- smallestai-2.1.0/tests/test_sync.py +0 -98
- smallestai-2.1.0/tests/test_utils.py +0 -47
- {smallestai-2.1.0 → smallestai-3.0.0}/LICENSE +0 -0
- {smallestai-2.1.0 → smallestai-3.0.0}/setup.cfg +0 -0
- {smallestai-2.1.0/smallest → smallestai-3.0.0/smallestai/waves}/exceptions.py +0 -0
- {smallestai-2.1.0/smallest → smallestai-3.0.0/smallestai/waves}/models.py +0 -0
- {smallestai-2.1.0 → smallestai-3.0.0}/smallestai.egg-info/dependency_links.txt +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.0
|
|
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
|
|
@@ -15,15 +15,24 @@ License-File: LICENSE
|
|
|
15
15
|
Requires-Dist: aiohttp
|
|
16
16
|
Requires-Dist: aiofiles
|
|
17
17
|
Requires-Dist: requests
|
|
18
|
-
Requires-Dist: sacremoses
|
|
19
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
|
|
20
23
|
Provides-Extra: test
|
|
21
24
|
Requires-Dist: jiwer; extra == "test"
|
|
22
25
|
Requires-Dist: httpx; extra == "test"
|
|
23
|
-
Requires-Dist: pytest; extra == "test"
|
|
26
|
+
Requires-Dist: pytest>=7.2.1; extra == "test"
|
|
24
27
|
Requires-Dist: pytest-asyncio; extra == "test"
|
|
25
28
|
Requires-Dist: deepgram-sdk; extra == "test"
|
|
26
29
|
Requires-Dist: python-dotenv; extra == "test"
|
|
30
|
+
Requires-Dist: pytest-cov>=2.8.1; extra == "test"
|
|
31
|
+
Requires-Dist: tox>=3.9.0; extra == "test"
|
|
32
|
+
Requires-Dist: flake8>=4.0.0; extra == "test"
|
|
33
|
+
Requires-Dist: types-python-dateutil>=2.8.19.14; extra == "test"
|
|
34
|
+
Requires-Dist: mypy>=1.5; extra == "test"
|
|
35
|
+
Dynamic: license-file
|
|
27
36
|
|
|
28
37
|

|
|
29
38
|
|
|
@@ -31,7 +40,6 @@ Requires-Dist: python-dotenv; extra == "test"
|
|
|
31
40
|
<div align="center">
|
|
32
41
|
<a href="https://twitter.com/smallest_AI">
|
|
33
42
|
<img src="https://img.shields.io/twitter/url/https/twitter.com/smallest_AI.svg?style=social&label=Follow%20smallest_AI" alt="Twitter">
|
|
34
|
-
</a>
|
|
35
43
|
<a href="https://discord.gg/ywShEyXHBW">
|
|
36
44
|
<img src="https://dcbadge.vercel.app/api/server/ywShEyXHBW?style=flat" alt="Discord">
|
|
37
45
|
</a>
|
|
@@ -47,25 +55,30 @@ Requires-Dist: python-dotenv; extra == "test"
|
|
|
47
55
|
|
|
48
56
|
Smallest AI builds high-speed multi-lingual voice models tailored for real-time applications, achieving ultra-realistic audio generation in as fast as ~100 milliseconds for 10 seconds of audio. With this sdk, you can easily convert text into high-quality audio with humanlike expressiveness.
|
|
49
57
|
|
|
50
|
-
Currently, the
|
|
58
|
+
Currently, the WavesClient supports direct synthesis and the ability to synthesize streamed LLM output, both synchronously and asynchronously.
|
|
51
59
|
|
|
52
60
|
## Table of Contents
|
|
53
61
|
|
|
54
62
|
- [Installation](#installation)
|
|
55
63
|
- [Get the API Key](#get-the-api-key)
|
|
56
|
-
- [
|
|
57
|
-
- [
|
|
58
|
-
- [
|
|
59
|
-
- [
|
|
60
|
-
|
|
61
|
-
- [
|
|
62
|
-
|
|
63
|
-
- [
|
|
64
|
-
|
|
65
|
-
- [
|
|
66
|
-
- [
|
|
67
|
-
- [
|
|
68
|
-
- [
|
|
64
|
+
- [Atoms Documentation](#atoms-documentation)
|
|
65
|
+
- [Getting Started](#getting-started)
|
|
66
|
+
- [Documentation for API Endpoints](#documentation-for-api-endpoints)
|
|
67
|
+
- [Documentation For Models](#documentation-for-models)
|
|
68
|
+
- [Waves Documentation](#waves-documentation)
|
|
69
|
+
- [Best Practices for Input Text](#best-practices-for-input-text)
|
|
70
|
+
- [Examples](#examples)
|
|
71
|
+
- [Synchronous](#synchronous)
|
|
72
|
+
- [Asynchronous](#asynchronous)
|
|
73
|
+
- [LLM to Speech](#llm-to-speech)
|
|
74
|
+
- [Add your Voice](#add-your-voice)
|
|
75
|
+
- [Synchronously](#add-synchronously)
|
|
76
|
+
- [Asynchronously](#add-asynchronously)
|
|
77
|
+
- [Delete your Voice](#delete-your-voice)
|
|
78
|
+
- [Synchronously](#delete-synchronously)
|
|
79
|
+
- [Asynchronously](#delete-asynchronously)
|
|
80
|
+
- [Available Methods](#available-methods)
|
|
81
|
+
- [Technical Note: WAV Headers in Streaming Audio](#technical-note-wav-headers-in-streaming-audio)
|
|
69
82
|
|
|
70
83
|
## Installation
|
|
71
84
|
|
|
@@ -78,24 +91,162 @@ When using an SDK in your application, make sure to pin to at least the major ve
|
|
|
78
91
|
|
|
79
92
|
## Get the API Key
|
|
80
93
|
|
|
81
|
-
1. Visit [
|
|
82
|
-
2. Navigate to `API
|
|
94
|
+
1. Visit [console.smallest.ai](https://console.smallest.ai//) and sign up for an account or log in if you already have an account.
|
|
95
|
+
2. Navigate to `API Keys` tab in your account dashboard.
|
|
83
96
|
3. Create a new API Key and copy it.
|
|
84
97
|
4. Export the API Key in your environment with the name `SMALLEST_API_KEY`, ensuring that your application can access it securely for authentication.
|
|
85
98
|
|
|
86
99
|
|
|
87
|
-
##
|
|
100
|
+
## Atoms Documentation
|
|
101
|
+
|
|
102
|
+
### Getting Started
|
|
103
|
+
|
|
104
|
+
Please follow the [installation procedure](#installation--usage) and then run the following:
|
|
105
|
+
|
|
106
|
+
```python
|
|
107
|
+
import smallestai.atoms
|
|
108
|
+
from smallestai.atoms.rest import ApiException
|
|
109
|
+
from pprint import pprint
|
|
110
|
+
|
|
111
|
+
# Defining the host is optional and defaults to https://atoms-api.smallest.ai/api/v1
|
|
112
|
+
# See configuration.py for a list of all supported configuration parameters.
|
|
113
|
+
configuration = atoms.Configuration(
|
|
114
|
+
host = "https://atoms-api.smallest.ai/api/v1"
|
|
115
|
+
)
|
|
116
|
+
|
|
117
|
+
# The client must configure the authentication and authorization parameters
|
|
118
|
+
# in accordance with the API server security policy.
|
|
119
|
+
# Examples for each auth method are provided below, use the example that
|
|
120
|
+
# satisfies your auth use case.
|
|
121
|
+
|
|
122
|
+
# Configure Bearer authorization (JWT): BearerAuth
|
|
123
|
+
configuration = atoms.Configuration(
|
|
124
|
+
access_token = os.environ["BEARER_TOKEN"]
|
|
125
|
+
)
|
|
126
|
+
|
|
127
|
+
# Enter a context with an instance of the API client
|
|
128
|
+
with atoms.ApiClient(configuration) as api_client:
|
|
129
|
+
# Create an instance of the API class
|
|
130
|
+
api_instance = atoms.AgentTemplatesApi(api_client)
|
|
131
|
+
create_agent_from_template_request = atoms.CreateAgentFromTemplateRequest()
|
|
132
|
+
|
|
133
|
+
try:
|
|
134
|
+
# Create agent from template
|
|
135
|
+
api_response = api_instance.create_agent_from_template(create_agent_from_template_request)
|
|
136
|
+
print("The response of AgentTemplatesApi->create_agent_from_template:\n")
|
|
137
|
+
pprint(api_response)
|
|
138
|
+
except ApiException as e:
|
|
139
|
+
print("Exception when calling AgentTemplatesApi->create_agent_from_template: %s\n" % e)
|
|
140
|
+
```
|
|
88
141
|
|
|
89
|
-
###
|
|
142
|
+
### Documentation for API Endpoints
|
|
143
|
+
|
|
144
|
+
All URIs are relative to *https://atoms-api.smallest.ai/api/v1*
|
|
145
|
+
|
|
146
|
+
Class | Method | HTTP request | Description
|
|
147
|
+
------------ | ------------- | ------------- | -------------
|
|
148
|
+
*AgentTemplatesApi* | [**create_agent_from_template**](docs/atoms/AgentTemplatesApi.md#create_agent_from_template) | **POST** /agent/from-template | Create agent from template
|
|
149
|
+
*AgentTemplatesApi* | [**get_agent_templates**](docs/atoms/AgentTemplatesApi.md#get_agent_templates) | **GET** /agent/template | Get agent templates
|
|
150
|
+
*AgentsApi* | [**create_agent**](docs/atoms/AgentsApi.md#create_agent) | **POST** /agent | Create a new agent
|
|
151
|
+
*AgentsApi* | [**delete_agent**](docs/atoms/AgentsApi.md#delete_agent) | **DELETE** /agent/{id} | Delete an agent
|
|
152
|
+
*AgentsApi* | [**get_agent_by_id**](docs/atoms/AgentsApi.md#get_agent_by_id) | **GET** /agent/{id} | Get agent by ID
|
|
153
|
+
*AgentsApi* | [**get_agents**](docs/atoms/AgentsApi.md#get_agents) | **GET** /agent | Get all agents
|
|
154
|
+
*AgentsApi* | [**update_agent**](docs/atoms/AgentsApi.md#update_agent) | **PATCH** /agent/{id} | Update an agent
|
|
155
|
+
*CallsApi* | [**start_outbound_call**](docs/atoms/CallsApi.md#start_outbound_call) | **POST** /conversation/outbound | Start an outbound call
|
|
156
|
+
*CampaignsApi* | [**create_campaign**](docs/atoms/CampaignsApi.md#create_campaign) | **POST** /campaign | Create a campaign
|
|
157
|
+
*CampaignsApi* | [**delete_campaign**](docs/atoms/CampaignsApi.md#delete_campaign) | **DELETE** /campaign/{id} | Delete a campaign
|
|
158
|
+
*CampaignsApi* | [**get_campaign_by_id**](docs/atoms/CampaignsApi.md#get_campaign_by_id) | **GET** /campaign/{id} | Get a campaign
|
|
159
|
+
*CampaignsApi* | [**get_campaigns**](docs/atoms/CampaignsApi.md#get_campaigns) | **GET** /campaign | Retrieve all campaigns
|
|
160
|
+
*CampaignsApi* | [**pause_campaign**](docs/atoms/CampaignsApi.md#pause_campaign) | **POST** /campaign/{id}/pause | Pause a campaign
|
|
161
|
+
*CampaignsApi* | [**start_campaign**](docs/atoms/CampaignsApi.md#start_campaign) | **POST** /campaign/{id}/start | Start a campaign
|
|
162
|
+
*KnowledgeBaseApi* | [**create_knowledge_base**](docs/atoms/KnowledgeBaseApi.md#create_knowledge_base) | **POST** /knowledgebase | Create a knowledge base
|
|
163
|
+
*KnowledgeBaseApi* | [**delete_knowledge_base**](docs/atoms/KnowledgeBaseApi.md#delete_knowledge_base) | **DELETE** /knowledgebase/{id} | Delete a knowledge base
|
|
164
|
+
*KnowledgeBaseApi* | [**delete_knowledge_base_item**](docs/atoms/KnowledgeBaseApi.md#delete_knowledge_base_item) | **DELETE** /knowledgebase/{knowledgeBaseId}/items/{knowledgeBaseItemId} | Delete a knowledge base item
|
|
165
|
+
*KnowledgeBaseApi* | [**get_knowledge_base_by_id**](docs/atoms/KnowledgeBaseApi.md#get_knowledge_base_by_id) | **GET** /knowledgebase/{id} | Get a knowledge base
|
|
166
|
+
*KnowledgeBaseApi* | [**get_knowledge_base_items**](docs/atoms/KnowledgeBaseApi.md#get_knowledge_base_items) | **GET** /knowledgebase/{id}/items | Get all knowledge base items
|
|
167
|
+
*KnowledgeBaseApi* | [**get_knowledge_bases**](docs/atoms/KnowledgeBaseApi.md#get_knowledge_bases) | **GET** /knowledgebase | Get all knowledge bases
|
|
168
|
+
*KnowledgeBaseApi* | [**upload_media_to_knowledge_base**](docs/atoms/KnowledgeBaseApi.md#upload_media_to_knowledge_base) | **POST** /knowledgebase/{id}/items/upload-media | Upload a media to a knowledge base
|
|
169
|
+
*KnowledgeBaseApi* | [**upload_text_to_knowledge_base**](docs/atoms/KnowledgeBaseApi.md#upload_text_to_knowledge_base) | **POST** /knowledgebase/{id}/items/upload-text | Upload a text to a knowledge base
|
|
170
|
+
*LogsApi* | [**get_conversation_logs**](docs/atoms/LogsApi.md#get_conversation_logs) | **GET** /conversation/{id} | Get conversation logs
|
|
171
|
+
*OrganizationApi* | [**get_organization**](docs/atoms/OrganizationApi.md#get_organization) | **GET** /organization | Get organization details
|
|
172
|
+
*UserApi* | [**get_current_user**](docs/atoms/UserApi.md#get_current_user) | **GET** /user | Get user details
|
|
173
|
+
|
|
174
|
+
### Documentation For Models
|
|
175
|
+
|
|
176
|
+
- [AgentDTO](docs/atoms/AgentDTO.md)
|
|
177
|
+
- [AgentDTOLanguage](docs/atoms/AgentDTOLanguage.md)
|
|
178
|
+
- [AgentDTOSynthesizer](docs/atoms/AgentDTOSynthesizer.md)
|
|
179
|
+
- [AgentDTOSynthesizerVoiceConfig](docs/atoms/AgentDTOSynthesizerVoiceConfig.md)
|
|
180
|
+
- [ApiResponse](docs/atoms/ApiResponse.md)
|
|
181
|
+
- [BadRequestErrorResponse](docs/atoms/BadRequestErrorResponse.md)
|
|
182
|
+
- [CreateAgentFromTemplate200Response](docs/atoms/CreateAgentFromTemplate200Response.md)
|
|
183
|
+
- [CreateAgentFromTemplateRequest](docs/atoms/CreateAgentFromTemplateRequest.md)
|
|
184
|
+
- [CreateAgentRequest](docs/atoms/CreateAgentRequest.md)
|
|
185
|
+
- [CreateAgentRequestLanguage](docs/atoms/CreateAgentRequestLanguage.md)
|
|
186
|
+
- [CreateAgentRequestLanguageSynthesizer](docs/atoms/CreateAgentRequestLanguageSynthesizer.md)
|
|
187
|
+
- [CreateAgentRequestLanguageSynthesizerVoiceConfig](docs/atoms/CreateAgentRequestLanguageSynthesizerVoiceConfig.md)
|
|
188
|
+
- [CreateCampaign201Response](docs/atoms/CreateCampaign201Response.md)
|
|
189
|
+
- [CreateCampaign201ResponseData](docs/atoms/CreateCampaign201ResponseData.md)
|
|
190
|
+
- [CreateCampaignRequest](docs/atoms/CreateCampaignRequest.md)
|
|
191
|
+
- [CreateKnowledgeBase201Response](docs/atoms/CreateKnowledgeBase201Response.md)
|
|
192
|
+
- [CreateKnowledgeBaseRequest](docs/atoms/CreateKnowledgeBaseRequest.md)
|
|
193
|
+
- [DeleteAgent200Response](docs/atoms/DeleteAgent200Response.md)
|
|
194
|
+
- [GetAgentById200Response](docs/atoms/GetAgentById200Response.md)
|
|
195
|
+
- [GetAgentTemplates200Response](docs/atoms/GetAgentTemplates200Response.md)
|
|
196
|
+
- [GetAgentTemplates200ResponseDataInner](docs/atoms/GetAgentTemplates200ResponseDataInner.md)
|
|
197
|
+
- [GetAgents200Response](docs/atoms/GetAgents200Response.md)
|
|
198
|
+
- [GetAgents200ResponseData](docs/atoms/GetAgents200ResponseData.md)
|
|
199
|
+
- [GetCampaignById200Response](docs/atoms/GetCampaignById200Response.md)
|
|
200
|
+
- [GetCampaignById200ResponseData](docs/atoms/GetCampaignById200ResponseData.md)
|
|
201
|
+
- [GetCampaigns200Response](docs/atoms/GetCampaigns200Response.md)
|
|
202
|
+
- [GetCampaigns200ResponseDataInner](docs/atoms/GetCampaigns200ResponseDataInner.md)
|
|
203
|
+
- [GetCampaigns200ResponseDataInnerAgent](docs/atoms/GetCampaigns200ResponseDataInnerAgent.md)
|
|
204
|
+
- [GetCampaigns200ResponseDataInnerAudience](docs/atoms/GetCampaigns200ResponseDataInnerAudience.md)
|
|
205
|
+
- [GetCampaignsRequest](docs/atoms/GetCampaignsRequest.md)
|
|
206
|
+
- [GetConversationLogs200Response](docs/atoms/GetConversationLogs200Response.md)
|
|
207
|
+
- [GetConversationLogs200ResponseData](docs/atoms/GetConversationLogs200ResponseData.md)
|
|
208
|
+
- [GetCurrentUser200Response](docs/atoms/GetCurrentUser200Response.md)
|
|
209
|
+
- [GetCurrentUser200ResponseData](docs/atoms/GetCurrentUser200ResponseData.md)
|
|
210
|
+
- [GetKnowledgeBaseById200Response](docs/atoms/GetKnowledgeBaseById200Response.md)
|
|
211
|
+
- [GetKnowledgeBaseItems200Response](docs/atoms/GetKnowledgeBaseItems200Response.md)
|
|
212
|
+
- [GetKnowledgeBases200Response](docs/atoms/GetKnowledgeBases200Response.md)
|
|
213
|
+
- [GetOrganization200Response](docs/atoms/GetOrganization200Response.md)
|
|
214
|
+
- [GetOrganization200ResponseData](docs/atoms/GetOrganization200ResponseData.md)
|
|
215
|
+
- [GetOrganization200ResponseDataMembersInner](docs/atoms/GetOrganization200ResponseDataMembersInner.md)
|
|
216
|
+
- [GetOrganization200ResponseDataSubscription](docs/atoms/GetOrganization200ResponseDataSubscription.md)
|
|
217
|
+
- [InternalServerErrorResponse](docs/atoms/InternalServerErrorResponse.md)
|
|
218
|
+
- [KnowledgeBaseDTO](docs/atoms/KnowledgeBaseDTO.md)
|
|
219
|
+
- [KnowledgeBaseItemDTO](docs/atoms/KnowledgeBaseItemDTO.md)
|
|
220
|
+
- [StartOutboundCall200Response](docs/atoms/StartOutboundCall200Response.md)
|
|
221
|
+
- [StartOutboundCall200ResponseData](docs/atoms/StartOutboundCall200ResponseData.md)
|
|
222
|
+
- [StartOutboundCallRequest](docs/atoms/StartOutboundCallRequest.md)
|
|
223
|
+
- [UnauthorizedErrorReponse](docs/atoms/UnauthorizedErrorReponse.md)
|
|
224
|
+
- [UpdateAgent200Response](docs/atoms/UpdateAgent200Response.md)
|
|
225
|
+
- [UpdateAgentRequest](docs/atoms/UpdateAgentRequest.md)
|
|
226
|
+
- [UpdateAgentRequestLanguage](docs/atoms/UpdateAgentRequestLanguage.md)
|
|
227
|
+
- [UpdateAgentRequestSynthesizer](docs/atoms/UpdateAgentRequestSynthesizer.md)
|
|
228
|
+
- [UpdateAgentRequestSynthesizerVoiceConfig](docs/atoms/UpdateAgentRequestSynthesizerVoiceConfig.md)
|
|
229
|
+
- [UpdateAgentRequestSynthesizerVoiceConfigOneOf](docs/atoms/UpdateAgentRequestSynthesizerVoiceConfigOneOf.md)
|
|
230
|
+
- [UpdateAgentRequestSynthesizerVoiceConfigOneOf1](docs/atoms/UpdateAgentRequestSynthesizerVoiceConfigOneOf1.md)
|
|
231
|
+
- [UploadTextToKnowledgeBaseRequest](docs/atoms/UploadTextToKnowledgeBaseRequest.md)
|
|
232
|
+
|
|
233
|
+
## Waves Documentation
|
|
234
|
+
|
|
235
|
+
### Best Practices for Input Text
|
|
236
|
+
|
|
237
|
+
### Examples
|
|
238
|
+
|
|
239
|
+
#### Synchronous
|
|
90
240
|
A synchronous text-to-speech synthesis client.
|
|
91
241
|
|
|
92
242
|
**Basic Usage:**
|
|
93
243
|
```python
|
|
94
|
-
|
|
244
|
+
|
|
245
|
+
from smallestai.waves import WavesClient
|
|
95
246
|
|
|
96
247
|
def main():
|
|
97
|
-
|
|
98
|
-
|
|
248
|
+
waves_client = WavesClient(api_key="SMALLEST_API_KEY")
|
|
249
|
+
waves_client.synthesize(
|
|
99
250
|
text="Hello, this is a test for sync synthesis function.",
|
|
100
251
|
save_as="sync_synthesize.wav"
|
|
101
252
|
)
|
|
@@ -128,17 +279,17 @@ client.synthesize(
|
|
|
128
279
|
```
|
|
129
280
|
|
|
130
281
|
|
|
131
|
-
|
|
282
|
+
#### Asynchronous
|
|
132
283
|
Asynchronous text-to-speech synthesis client.
|
|
133
284
|
|
|
134
285
|
**Basic Usage:**
|
|
135
286
|
```python
|
|
136
287
|
import asyncio
|
|
137
288
|
import aiofiles
|
|
138
|
-
|
|
289
|
+
import smallestai
|
|
139
290
|
|
|
140
291
|
async def main():
|
|
141
|
-
client =
|
|
292
|
+
client = smallestai.waves.AsyncWavesClient(api_key="SMALLEST_API_KEY")
|
|
142
293
|
async with client as tts:
|
|
143
294
|
audio_bytes = await tts.synthesize("Hello, this is a test of the async synthesis function.")
|
|
144
295
|
async with aiofiles.open("async_synthesize.wav", "wb") as f:
|
|
@@ -187,11 +338,11 @@ audio_bytes = await tts.synthesize(
|
|
|
187
338
|
)
|
|
188
339
|
```
|
|
189
340
|
|
|
190
|
-
|
|
341
|
+
#### LLM to Speech
|
|
191
342
|
|
|
192
343
|
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.
|
|
193
344
|
|
|
194
|
-
|
|
345
|
+
##### Stream through a WebSocket
|
|
195
346
|
|
|
196
347
|
```python
|
|
197
348
|
import asyncio
|
|
@@ -242,7 +393,7 @@ if __name__ == "__main__":
|
|
|
242
393
|
asyncio.run(main())
|
|
243
394
|
```
|
|
244
395
|
|
|
245
|
-
|
|
396
|
+
##### Save to a File
|
|
246
397
|
```python
|
|
247
398
|
import wave
|
|
248
399
|
import asyncio
|
|
@@ -307,10 +458,10 @@ The processor yields raw audio data chunks without WAV headers for streaming eff
|
|
|
307
458
|
- Streamed over a network
|
|
308
459
|
- Further processed as needed
|
|
309
460
|
|
|
310
|
-
|
|
461
|
+
#### Add your Voice
|
|
311
462
|
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.
|
|
312
463
|
|
|
313
|
-
|
|
464
|
+
##### Add Synchronously
|
|
314
465
|
```python
|
|
315
466
|
from smallest import Smallest
|
|
316
467
|
|
|
@@ -323,7 +474,7 @@ if __name__ == "__main__":
|
|
|
323
474
|
main()
|
|
324
475
|
```
|
|
325
476
|
|
|
326
|
-
|
|
477
|
+
##### Add Asynchronously
|
|
327
478
|
```python
|
|
328
479
|
import asyncio
|
|
329
480
|
from smallest import AsyncSmallest
|
|
@@ -337,10 +488,10 @@ if __name__ == "__main__":
|
|
|
337
488
|
asyncio.run(main())
|
|
338
489
|
```
|
|
339
490
|
|
|
340
|
-
|
|
491
|
+
#### Delete your Voice
|
|
341
492
|
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.
|
|
342
493
|
|
|
343
|
-
|
|
494
|
+
##### Delete Synchronously
|
|
344
495
|
```python
|
|
345
496
|
from smallest import Smallest
|
|
346
497
|
|
|
@@ -353,7 +504,7 @@ if __name__ == "__main__":
|
|
|
353
504
|
main()
|
|
354
505
|
```
|
|
355
506
|
|
|
356
|
-
|
|
507
|
+
##### Delete Asynchronously
|
|
357
508
|
```python
|
|
358
509
|
import asyncio
|
|
359
510
|
from smallest import AsyncSmallest
|
|
@@ -367,7 +518,7 @@ if __name__ == "__main__":
|
|
|
367
518
|
asyncio.run(main())
|
|
368
519
|
```
|
|
369
520
|
|
|
370
|
-
|
|
521
|
+
#### Available Methods
|
|
371
522
|
|
|
372
523
|
```python
|
|
373
524
|
from smallest import Smallest
|
|
@@ -380,18 +531,18 @@ print(f"Available Voices: {client.get_cloned_voices()}")
|
|
|
380
531
|
print(f"Available Models: {client.get_models()}")
|
|
381
532
|
```
|
|
382
533
|
|
|
383
|
-
|
|
534
|
+
#### Technical Note: WAV Headers in Streaming Audio
|
|
384
535
|
|
|
385
536
|
When implementing audio streaming with chunks of synthesized speech, WAV headers are omitted from individual chunks because:
|
|
386
537
|
|
|
387
|
-
|
|
538
|
+
##### Technical Issues
|
|
388
539
|
- Each WAV header contains metadata about the entire audio file.
|
|
389
540
|
- Multiple headers would make chunks appear as separate audio files and add redundancy.
|
|
390
541
|
- Headers contain file-specific data (like total size) that's invalid for chunks.
|
|
391
542
|
- Sequential playback of chunks with headers causes audio artifacts (pop sounds) when concatenating or playing audio sequentially.
|
|
392
543
|
- Audio players would try to reinitialize audio settings for each chunk.
|
|
393
544
|
|
|
394
|
-
|
|
545
|
+
##### Best Practices for Audio Streaming
|
|
395
546
|
1. Stream raw PCM audio data without headers
|
|
396
547
|
2. Add a single WAV header only when:
|
|
397
548
|
- Saving the complete stream to a file
|