sayna-client 0.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 sayna-client might be problematic. Click here for more details.

@@ -0,0 +1,228 @@
1
+ Metadata-Version: 2.4
2
+ Name: sayna-client
3
+ Version: 0.0.1
4
+ Summary: Python SDK for Sayna server-side WebSocket connections
5
+ Author: Sayna Team
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/sayna/saysdk
8
+ Project-URL: Repository, https://github.com/sayna/saysdk
9
+ Project-URL: Documentation, https://github.com/sayna/saysdk/tree/main/python-sdk
10
+ Project-URL: Issues, https://github.com/sayna/saysdk/issues
11
+ Keywords: sayna,websocket,sdk,server,real-time
12
+ Classifier: Development Status :: 3 - Alpha
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: License :: OSI Approved :: MIT License
15
+ Classifier: Operating System :: OS Independent
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.9
18
+ Classifier: Programming Language :: Python :: 3.10
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Programming Language :: Python :: 3.13
22
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
23
+ Classifier: Topic :: Communications
24
+ Classifier: Framework :: AsyncIO
25
+ Classifier: Typing :: Typed
26
+ Requires-Python: >=3.9
27
+ Description-Content-Type: text/markdown
28
+ Requires-Dist: aiohttp>=3.9.0
29
+ Requires-Dist: pydantic>=2.0.0
30
+ Provides-Extra: dev
31
+ Requires-Dist: pytest>=8.0.0; extra == "dev"
32
+ Requires-Dist: pytest-asyncio>=0.23.0; extra == "dev"
33
+ Requires-Dist: pytest-cov>=4.1.0; extra == "dev"
34
+ Requires-Dist: mypy>=1.8.0; extra == "dev"
35
+ Requires-Dist: ruff>=0.6.0; extra == "dev"
36
+
37
+ # Sayna Python SDK
38
+
39
+ Python SDK for Sayna server-side WebSocket connections, enabling real-time voice interactions with speech-to-text (STT) and text-to-speech (TTS) capabilities.
40
+
41
+ ## Features
42
+
43
+ - 🎤 **Speech-to-Text**: Real-time transcription with support for multiple providers (Deepgram, Google, etc.)
44
+ - 🔊 **Text-to-Speech**: High-quality voice synthesis with various TTS providers (ElevenLabs, Google, etc.)
45
+ - 🔌 **WebSocket Connection**: Async/await support with aiohttp
46
+ - ✅ **Type Safety**: Full type hints with Pydantic models
47
+ - 🚀 **Easy to Use**: Simple, intuitive API
48
+ - 📦 **Modern Python**: Built for Python 3.9+
49
+
50
+ ## Installation
51
+
52
+ ### Using pip
53
+
54
+ ```bash
55
+ pip install sayna-client
56
+ ```
57
+
58
+ ### Using uv (recommended for faster installation)
59
+
60
+ ```bash
61
+ uv pip install sayna-client
62
+ ```
63
+
64
+ ### From source
65
+
66
+ ```bash
67
+ git clone https://github.com/sayna/saysdk.git
68
+ cd saysdk/python-sdk
69
+ pip install -e .
70
+ ```
71
+
72
+ ## Development Setup
73
+
74
+ This project supports both traditional pip and modern uv package managers.
75
+
76
+ ### Option 1: Traditional Setup with pip
77
+
78
+ ```bash
79
+ # Create a virtual environment
80
+ python -m venv .venv
81
+
82
+ # Activate the virtual environment
83
+ # On Linux/macOS:
84
+ source .venv/bin/activate
85
+ # On Windows:
86
+ # .venv\Scripts\activate
87
+
88
+ # Install development dependencies
89
+ pip install -e ".[dev]"
90
+ ```
91
+
92
+ ### Option 2: Modern Setup with uv (Faster)
93
+
94
+ ```bash
95
+ # Install uv if you haven't already
96
+ pip install uv
97
+
98
+ # Create a virtual environment with uv
99
+ uv venv
100
+
101
+ # Activate the virtual environment
102
+ source .venv/bin/activate # On Linux/macOS
103
+ # .venv\Scripts\activate on Windows
104
+
105
+ # Install development dependencies with uv
106
+ uv pip install -e ".[dev]"
107
+ ```
108
+
109
+ ## Quick Start
110
+
111
+ ```python
112
+ import asyncio
113
+ from sayna_client import SaynaClient, STTConfig, TTSConfig
114
+
115
+ async def main():
116
+ # Initialize the client
117
+ client = SaynaClient(
118
+ url="wss://api.sayna.com/ws",
119
+ api_key="your-api-key"
120
+ )
121
+
122
+ # Configure STT and TTS
123
+ stt_config = STTConfig(
124
+ provider="deepgram",
125
+ language="en-US",
126
+ sample_rate=16000,
127
+ channels=1,
128
+ punctuation=True,
129
+ encoding="linear16",
130
+ model="nova-2"
131
+ )
132
+
133
+ tts_config = TTSConfig(
134
+ provider="elevenlabs",
135
+ voice_id="your-voice-id",
136
+ speaking_rate=1.0,
137
+ audio_format="mp3",
138
+ sample_rate=24000,
139
+ connection_timeout=5000,
140
+ request_timeout=10000,
141
+ model="eleven_multilingual_v2",
142
+ pronunciations=[]
143
+ )
144
+
145
+ # Connect to Sayna
146
+ await client.connect()
147
+
148
+ # Your application logic here
149
+
150
+ # Disconnect when done
151
+ await client.disconnect()
152
+
153
+ if __name__ == "__main__":
154
+ asyncio.run(main())
155
+ ```
156
+
157
+ ## Development
158
+
159
+ ### Running Tests
160
+
161
+ ```bash
162
+ # Run all tests
163
+ pytest
164
+
165
+ # Run with coverage
166
+ pytest --cov=sayna_client --cov-report=html
167
+
168
+ # Run specific test file
169
+ pytest tests/test_client.py
170
+ ```
171
+
172
+ ### Type Checking
173
+
174
+ ```bash
175
+ mypy src/sayna_client
176
+ ```
177
+
178
+ ### Linting and Formatting
179
+
180
+ This project uses [Ruff](https://github.com/astral-sh/ruff) for linting and formatting:
181
+
182
+ ```bash
183
+ # Check code
184
+ ruff check .
185
+
186
+ # Format code
187
+ ruff format .
188
+
189
+ # Fix auto-fixable issues
190
+ ruff check --fix .
191
+ ```
192
+
193
+ ### Project Structure
194
+
195
+ ```
196
+ python-sdk/
197
+ ├── src/
198
+ │ └── sayna_client/ # Main package
199
+ │ ├── __init__.py # Package exports
200
+ │ ├── client.py # SaynaClient implementation
201
+ │ ├── types.py # Pydantic models
202
+ │ ├── errors.py # Custom exceptions
203
+ │ └── py.typed # PEP 561 marker
204
+ ├── tests/ # Test suite
205
+ ├── examples/ # Usage examples
206
+ ├── pyproject.toml # Package configuration
207
+ ├── requirements.txt # Runtime dependencies
208
+ ├── requirements-dev.txt # Development dependencies
209
+ └── README.md # This file
210
+ ```
211
+
212
+ ## Requirements
213
+
214
+ - Python 3.9 or higher
215
+ - aiohttp >= 3.9.0
216
+ - pydantic >= 2.0.0
217
+
218
+ ## License
219
+
220
+ MIT License - see LICENSE file for details
221
+
222
+ ## Contributing
223
+
224
+ Contributions are welcome! Please feel free to submit a Pull Request.
225
+
226
+ ## Support
227
+
228
+ For issues and questions, please visit the [GitHub Issues](https://github.com/sayna/saysdk/issues) page.
@@ -0,0 +1,10 @@
1
+ sayna_client/__init__.py,sha256=V3228J8HjGrIqY_F5roIrszwC0i27fZhx2HfI8Bsr8o,1596
2
+ sayna_client/client.py,sha256=EOoThHrGFTyd_0rzAUH1aGIxDeqg8gpkSTVLqIkI6i8,22464
3
+ sayna_client/errors.py,sha256=_EJuKRZ8cTOR3jp7xf_miEnE6JALXXtKPfFmDcTBJJE,2057
4
+ sayna_client/http_client.py,sha256=zehh4hzCPzaQs9FHjH8kVOiVdiToO_suM1D82WJGmwU,5630
5
+ sayna_client/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
+ sayna_client/types.py,sha256=JXx2u2abSTK4_xjUJzYHkZ1glkLztig4uXt1861_8bE,10729
7
+ sayna_client-0.0.1.dist-info/METADATA,sha256=E0spfmhDdw71B1BJgrEklSXCZudgIMBIJiL3q5VppHg,5694
8
+ sayna_client-0.0.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
9
+ sayna_client-0.0.1.dist-info/top_level.txt,sha256=-GplaA_LXnxFbFb4Xhzu9hMHUMmoZ2cjgJAjtTVYp-8,13
10
+ sayna_client-0.0.1.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (80.9.0)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1 @@
1
+ sayna_client