livekit-plugins-slng 1.5.7__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.
@@ -0,0 +1,180 @@
1
+ **/.vscode
2
+ **/.DS_Store
3
+ .env
4
+
5
+ # Byte-compiled / optimized / DLL files
6
+ __pycache__/
7
+ *.py[cod]
8
+ *$py.class
9
+
10
+ # C extensions
11
+ *.so
12
+
13
+ # Distribution / packaging
14
+ .Python
15
+ build/
16
+ develop-eggs/
17
+ dist/
18
+ downloads/
19
+ eggs/
20
+ .eggs/
21
+ lib/
22
+ lib64/
23
+ parts/
24
+ sdist/
25
+ var/
26
+ wheels/
27
+ share/python-wheels/
28
+ *.egg-info/
29
+ .installed.cfg
30
+ *.egg
31
+ MANIFEST
32
+
33
+ # PyInstaller
34
+ # Usually these files are written by a python script from a template
35
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
36
+ *.manifest
37
+ *.spec
38
+
39
+ # Installer logs
40
+ pip-log.txt
41
+ pip-delete-this-directory.txt
42
+
43
+ # Unit test / coverage reports
44
+ htmlcov/
45
+ .tox/
46
+ .nox/
47
+ .coverage
48
+ .coverage.*
49
+ .cache
50
+ nosetests.xml
51
+ coverage.xml
52
+ *.cover
53
+ *.py,cover
54
+ .hypothesis/
55
+ .pytest_cache/
56
+ cover/
57
+
58
+ # Translations
59
+ *.mo
60
+ *.pot
61
+
62
+ # Django stuff:
63
+ *.log
64
+ local_settings.py
65
+ db.sqlite3
66
+ db.sqlite3-journal
67
+
68
+ # Flask stuff:
69
+ instance/
70
+ .webassets-cache
71
+
72
+ # Scrapy stuff:
73
+ .scrapy
74
+
75
+ # Sphinx documentation
76
+ docs/_build/
77
+
78
+ # PyBuilder
79
+ .pybuilder/
80
+ target/
81
+
82
+ # Jupyter Notebook
83
+ .ipynb_checkpoints
84
+
85
+ # IPython
86
+ profile_default/
87
+ ipython_config.py
88
+
89
+ # pyenv
90
+ # For a library or package, you might want to ignore these files since the code is
91
+ # intended to run in multiple environments; otherwise, check them in:
92
+ # .python-version
93
+
94
+ # pipenv
95
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
96
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
97
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
98
+ # install all needed dependencies.
99
+ #Pipfile.lock
100
+
101
+ # poetry
102
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
103
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
104
+ # commonly ignored for libraries.
105
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
106
+ #poetry.lock
107
+
108
+ # pdm
109
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
110
+ #pdm.lock
111
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
112
+ # in version control.
113
+ # https://pdm.fming.dev/#use-with-ide
114
+ .pdm.toml
115
+
116
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
117
+ __pypackages__/
118
+
119
+ # Celery stuff
120
+ celerybeat-schedule
121
+ celerybeat.pid
122
+
123
+ # SageMath parsed files
124
+ *.sage.py
125
+
126
+ # Environments
127
+ .env
128
+ .venv
129
+ env/
130
+ venv/
131
+ ENV/
132
+ env.bak/
133
+ venv.bak/
134
+
135
+ # Spyder project settings
136
+ .spyderproject
137
+ .spyproject
138
+
139
+ # Rope project settings
140
+ .ropeproject
141
+
142
+ # mkdocs documentation
143
+ /site
144
+
145
+ # mypy
146
+ .mypy_cache/
147
+ .dmypy.json
148
+ dmypy.json
149
+
150
+ # trunk
151
+ .trunk/
152
+
153
+ # Pyre type checker
154
+ .pyre/
155
+
156
+ # pytype static type analyzer
157
+ .pytype/
158
+
159
+ # Cython debug symbols
160
+ cython_debug/
161
+
162
+ # PyCharm
163
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
164
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
165
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
166
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
167
+ .idea/
168
+
169
+ node_modules
170
+
171
+ credentials.json
172
+ pyrightconfig.json
173
+ docs/
174
+
175
+ # Database files
176
+ *.db
177
+
178
+
179
+ # Examples for development
180
+ examples/dev/*
@@ -0,0 +1,64 @@
1
+ Metadata-Version: 2.4
2
+ Name: livekit-plugins-slng
3
+ Version: 1.5.7
4
+ Summary: Agent Framework plugin for STT and TTS services using SLNG's gateway.
5
+ Project-URL: Documentation, https://docs.slng.ai/
6
+ Project-URL: Website, https://slng.ai/
7
+ Project-URL: Source, https://github.com/livekit/agents
8
+ Author-email: SLNG <hello@slng.ai>
9
+ License-Expression: Apache-2.0
10
+ Keywords: ai,audio,livekit,realtime,slng,stt,tts,voice
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: License :: OSI Approved :: Apache Software License
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3 :: Only
15
+ Classifier: Programming Language :: Python :: 3.10
16
+ Classifier: Topic :: Multimedia :: Sound/Audio
17
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
18
+ Requires-Python: >=3.10.0
19
+ Requires-Dist: aiohttp>=3.10
20
+ Requires-Dist: livekit-agents>=1.5.7
21
+ Description-Content-Type: text/markdown
22
+
23
+ # SLNG plugin for LiveKit Agents
24
+
25
+ Support for [SLNG](https://slng.ai/)'s voice AI gateway in LiveKit Agents, providing access to multiple STT and TTS providers through a unified API.
26
+
27
+ See [https://docs.slng.ai/](https://docs.slng.ai/) for more information.
28
+
29
+ ## Installation
30
+
31
+ ```bash
32
+ pip install livekit-plugins-slng
33
+ ```
34
+
35
+ ## Pre-requisites
36
+
37
+ You'll need an API key from SLNG. It can be set as an environment variable: `SLNG_API_KEY`
38
+
39
+ ## Region override
40
+
41
+ The plugin supports gateway region routing via the `region_override` option on both `STT` and `TTS`.
42
+ This maps directly to the gateway's `X-Region-Override` header.
43
+ See the available regions at [docs.slng.ai/region-override](https://docs.slng.ai/region-override).
44
+
45
+ You can pass either a single region:
46
+
47
+ ```python
48
+ stt = slng.STT(
49
+ api_key="your-slng-api-key",
50
+ model="deepgram/nova:3",
51
+ region_override="eu-west-1",
52
+ )
53
+ ```
54
+
55
+ Or multiple preferred regions in priority order:
56
+
57
+ ```python
58
+ tts = slng.TTS(
59
+ api_key="your-slng-api-key",
60
+ model="deepgram/aura:2",
61
+ voice="aura-2-thalia-en",
62
+ region_override=["eu-west-1", "us-east-1"],
63
+ )
64
+ ```
@@ -0,0 +1,42 @@
1
+ # SLNG plugin for LiveKit Agents
2
+
3
+ Support for [SLNG](https://slng.ai/)'s voice AI gateway in LiveKit Agents, providing access to multiple STT and TTS providers through a unified API.
4
+
5
+ See [https://docs.slng.ai/](https://docs.slng.ai/) for more information.
6
+
7
+ ## Installation
8
+
9
+ ```bash
10
+ pip install livekit-plugins-slng
11
+ ```
12
+
13
+ ## Pre-requisites
14
+
15
+ You'll need an API key from SLNG. It can be set as an environment variable: `SLNG_API_KEY`
16
+
17
+ ## Region override
18
+
19
+ The plugin supports gateway region routing via the `region_override` option on both `STT` and `TTS`.
20
+ This maps directly to the gateway's `X-Region-Override` header.
21
+ See the available regions at [docs.slng.ai/region-override](https://docs.slng.ai/region-override).
22
+
23
+ You can pass either a single region:
24
+
25
+ ```python
26
+ stt = slng.STT(
27
+ api_key="your-slng-api-key",
28
+ model="deepgram/nova:3",
29
+ region_override="eu-west-1",
30
+ )
31
+ ```
32
+
33
+ Or multiple preferred regions in priority order:
34
+
35
+ ```python
36
+ tts = slng.TTS(
37
+ api_key="your-slng-api-key",
38
+ model="deepgram/aura:2",
39
+ voice="aura-2-thalia-en",
40
+ region_override=["eu-west-1", "us-east-1"],
41
+ )
42
+ ```
@@ -0,0 +1,51 @@
1
+ # Copyright 2025 LiveKit, Inc.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ """SLNG plugin for LiveKit Agents
16
+
17
+ STT and TTS adapters for SLNG gateway models.
18
+
19
+ See https://docs.slng.ai/ for more information.
20
+ """
21
+
22
+ from .log import logger
23
+ from .stt import STT, SpeechStream
24
+ from .tts import TTS
25
+ from .version import __version__
26
+
27
+ __all__ = [
28
+ "STT",
29
+ "SpeechStream",
30
+ "TTS",
31
+ "__version__",
32
+ ]
33
+
34
+ from livekit.agents import Plugin
35
+
36
+
37
+ class SLNGPlugin(Plugin):
38
+ def __init__(self) -> None:
39
+ super().__init__(__name__, __version__, __package__, logger)
40
+
41
+
42
+ Plugin.register_plugin(SLNGPlugin())
43
+
44
+ # Cleanup docs of unexported modules
45
+ _module = dir()
46
+ NOT_IN_ALL = [m for m in _module if m not in __all__]
47
+
48
+ __pdoc__ = {}
49
+
50
+ for n in NOT_IN_ALL:
51
+ __pdoc__[n] = False