livekit-plugins-bodhi 0.1.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.
- livekit_plugins_bodhi-0.1.0/.gitignore +179 -0
- livekit_plugins_bodhi-0.1.0/PKG-INFO +66 -0
- livekit_plugins_bodhi-0.1.0/README.md +46 -0
- livekit_plugins_bodhi-0.1.0/livekit/plugins/bodhi/__init__.py +77 -0
- livekit_plugins_bodhi-0.1.0/livekit/plugins/bodhi/log.py +3 -0
- livekit_plugins_bodhi-0.1.0/livekit/plugins/bodhi/py.typed +0 -0
- livekit_plugins_bodhi-0.1.0/livekit/plugins/bodhi/version.py +1 -0
- livekit_plugins_bodhi-0.1.0/pyproject.toml +38 -0
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
share/python-wheels/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
.installed.cfg
|
|
26
|
+
*.egg
|
|
27
|
+
MANIFEST
|
|
28
|
+
|
|
29
|
+
# PyInstaller
|
|
30
|
+
# Usually these files are written by a python script from a template
|
|
31
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
32
|
+
*.manifest
|
|
33
|
+
*.spec
|
|
34
|
+
|
|
35
|
+
# Installer logs
|
|
36
|
+
pip-log.txt
|
|
37
|
+
pip-delete-this-directory.txt
|
|
38
|
+
|
|
39
|
+
# Unit test / coverage reports
|
|
40
|
+
htmlcov/
|
|
41
|
+
.tox/
|
|
42
|
+
.nox/
|
|
43
|
+
.coverage
|
|
44
|
+
.coverage.*
|
|
45
|
+
.cache
|
|
46
|
+
nosetests.xml
|
|
47
|
+
coverage.xml
|
|
48
|
+
*.cover
|
|
49
|
+
*.py,cover
|
|
50
|
+
.hypothesis/
|
|
51
|
+
.pytest_cache/
|
|
52
|
+
cover/
|
|
53
|
+
|
|
54
|
+
# Translations
|
|
55
|
+
*.mo
|
|
56
|
+
*.pot
|
|
57
|
+
|
|
58
|
+
# Django stuff:
|
|
59
|
+
*.log
|
|
60
|
+
local_settings.py
|
|
61
|
+
db.sqlite3
|
|
62
|
+
db.sqlite3-journal
|
|
63
|
+
|
|
64
|
+
# Flask stuff:
|
|
65
|
+
instance/
|
|
66
|
+
.webassets-cache
|
|
67
|
+
|
|
68
|
+
# Scrapy stuff:
|
|
69
|
+
.scrapy
|
|
70
|
+
|
|
71
|
+
# Sphinx documentation
|
|
72
|
+
docs/_build/
|
|
73
|
+
|
|
74
|
+
# PyBuilder
|
|
75
|
+
.pybuilder/
|
|
76
|
+
target/
|
|
77
|
+
|
|
78
|
+
# Jupyter Notebook
|
|
79
|
+
.ipynb_checkpoints
|
|
80
|
+
|
|
81
|
+
# IPython
|
|
82
|
+
profile_default/
|
|
83
|
+
ipython_config.py
|
|
84
|
+
|
|
85
|
+
# pyenv
|
|
86
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
87
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
88
|
+
# .python-version
|
|
89
|
+
|
|
90
|
+
# pipenv
|
|
91
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
92
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
93
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
94
|
+
# install all needed dependencies.
|
|
95
|
+
#Pipfile.lock
|
|
96
|
+
|
|
97
|
+
# UV
|
|
98
|
+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
|
|
99
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
100
|
+
# commonly ignored for libraries.
|
|
101
|
+
#uv.lock
|
|
102
|
+
|
|
103
|
+
# poetry
|
|
104
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
105
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
106
|
+
# commonly ignored for libraries.
|
|
107
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
108
|
+
#poetry.lock
|
|
109
|
+
|
|
110
|
+
# pdm
|
|
111
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
112
|
+
#pdm.lock
|
|
113
|
+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
|
|
114
|
+
# in version control.
|
|
115
|
+
# https://pdm.fming.dev/latest/usage/project/#working-with-version-control
|
|
116
|
+
.pdm.toml
|
|
117
|
+
.pdm-python
|
|
118
|
+
.pdm-build/
|
|
119
|
+
|
|
120
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
121
|
+
__pypackages__/
|
|
122
|
+
|
|
123
|
+
# Celery stuff
|
|
124
|
+
celerybeat-schedule
|
|
125
|
+
celerybeat.pid
|
|
126
|
+
|
|
127
|
+
# SageMath parsed files
|
|
128
|
+
*.sage.py
|
|
129
|
+
|
|
130
|
+
# Environments
|
|
131
|
+
.env
|
|
132
|
+
.venv
|
|
133
|
+
env/
|
|
134
|
+
venv/
|
|
135
|
+
ENV/
|
|
136
|
+
env.bak/
|
|
137
|
+
venv.bak/
|
|
138
|
+
|
|
139
|
+
# Spyder project settings
|
|
140
|
+
.spyderproject
|
|
141
|
+
.spyproject
|
|
142
|
+
|
|
143
|
+
# Rope project settings
|
|
144
|
+
.ropeproject
|
|
145
|
+
|
|
146
|
+
# mkdocs documentation
|
|
147
|
+
/site
|
|
148
|
+
|
|
149
|
+
# mypy
|
|
150
|
+
.mypy_cache/
|
|
151
|
+
.dmypy.json
|
|
152
|
+
dmypy.json
|
|
153
|
+
|
|
154
|
+
# Pyre type checker
|
|
155
|
+
.pyre/
|
|
156
|
+
|
|
157
|
+
# pytype static type analyzer
|
|
158
|
+
.pytype/
|
|
159
|
+
|
|
160
|
+
# Cython debug symbols
|
|
161
|
+
cython_debug/
|
|
162
|
+
|
|
163
|
+
# PyCharm
|
|
164
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
165
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
166
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
167
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
168
|
+
#.idea/
|
|
169
|
+
|
|
170
|
+
# Ruff stuff:
|
|
171
|
+
.ruff_cache/
|
|
172
|
+
|
|
173
|
+
# PyPI configuration file
|
|
174
|
+
.pypirc
|
|
175
|
+
|
|
176
|
+
# vsCode settings
|
|
177
|
+
.vscode/
|
|
178
|
+
# macOS
|
|
179
|
+
.DS_Store
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: livekit-plugins-bodhi
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: LiveKit Agents plugin for Bodhi (Navana Tech) STT and TTS
|
|
5
|
+
Project-URL: Homepage, https://www.navanatech.in/
|
|
6
|
+
Project-URL: Source, https://github.com/navana-tech/bodhi-python-sdk
|
|
7
|
+
Author: Navana Tech
|
|
8
|
+
License-Expression: Apache-2.0
|
|
9
|
+
Keywords: ai,audio,bodhi,livekit,navana,realtime,stt,tts,voice
|
|
10
|
+
Classifier: Intended Audience :: Developers
|
|
11
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
12
|
+
Classifier: Programming Language :: Python :: 3
|
|
13
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
14
|
+
Classifier: Topic :: Multimedia :: Sound/Audio
|
|
15
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
16
|
+
Requires-Python: >=3.9
|
|
17
|
+
Requires-Dist: bodhi-api-sdk>=1.3
|
|
18
|
+
Requires-Dist: livekit-agents>=1.0
|
|
19
|
+
Description-Content-Type: text/markdown
|
|
20
|
+
|
|
21
|
+
# LiveKit Agents plugin for Bodhi
|
|
22
|
+
|
|
23
|
+
Indian-language speech-to-text and text-to-speech from [Bodhi](https://www.navanatech.in/)
|
|
24
|
+
(Navana Tech), as LiveKit Agents `stt.STT` / `tts.TTS` providers.
|
|
25
|
+
|
|
26
|
+
## Install
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
pip install "livekit-plugins-bodhi"
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Usage
|
|
33
|
+
|
|
34
|
+
```python
|
|
35
|
+
from livekit.agents import AgentSession
|
|
36
|
+
from livekit.plugins import bodhi, silero
|
|
37
|
+
|
|
38
|
+
session = AgentSession(
|
|
39
|
+
stt=bodhi.STT(model="hi-general-v2-8khz", sample_rate=8000),
|
|
40
|
+
vad=silero.VAD.load(),
|
|
41
|
+
# llm=...,
|
|
42
|
+
tts=bodhi.TTS(language="hi", voice="default_female"),
|
|
43
|
+
)
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Set `BODHI_API_KEY` in the environment, or pass `api_key=` to either class.
|
|
47
|
+
|
|
48
|
+
Both default to the Navana hosts (`wss://stt.navana.ai` / `https://tts.navana.ai`);
|
|
49
|
+
pass `base_url=` to target another deployment.
|
|
50
|
+
|
|
51
|
+
### STT options
|
|
52
|
+
|
|
53
|
+
`model`, `language`, `sample_rate`, `interim_results`, `parse_number`, `aux`,
|
|
54
|
+
`min_confidence`, `hotwords` (`bodhi.BodhiHotword(phrase, score)`),
|
|
55
|
+
`endpoint_silence_duration`.
|
|
56
|
+
|
|
57
|
+
### TTS options
|
|
58
|
+
|
|
59
|
+
`voice`, `language`, `sample_rate` (8000/16000/24000), `use_fast`, `num_step`,
|
|
60
|
+
`guidance_scale`.
|
|
61
|
+
|
|
62
|
+
## License
|
|
63
|
+
|
|
64
|
+
Apache-2.0. The implementation ships in the
|
|
65
|
+
[`bodhi-api-sdk`](https://github.com/navana-tech/bodhi-python-sdk) package; this
|
|
66
|
+
plugin re-exports it under the `livekit.plugins.bodhi` namespace.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# LiveKit Agents plugin for Bodhi
|
|
2
|
+
|
|
3
|
+
Indian-language speech-to-text and text-to-speech from [Bodhi](https://www.navanatech.in/)
|
|
4
|
+
(Navana Tech), as LiveKit Agents `stt.STT` / `tts.TTS` providers.
|
|
5
|
+
|
|
6
|
+
## Install
|
|
7
|
+
|
|
8
|
+
```bash
|
|
9
|
+
pip install "livekit-plugins-bodhi"
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Usage
|
|
13
|
+
|
|
14
|
+
```python
|
|
15
|
+
from livekit.agents import AgentSession
|
|
16
|
+
from livekit.plugins import bodhi, silero
|
|
17
|
+
|
|
18
|
+
session = AgentSession(
|
|
19
|
+
stt=bodhi.STT(model="hi-general-v2-8khz", sample_rate=8000),
|
|
20
|
+
vad=silero.VAD.load(),
|
|
21
|
+
# llm=...,
|
|
22
|
+
tts=bodhi.TTS(language="hi", voice="default_female"),
|
|
23
|
+
)
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Set `BODHI_API_KEY` in the environment, or pass `api_key=` to either class.
|
|
27
|
+
|
|
28
|
+
Both default to the Navana hosts (`wss://stt.navana.ai` / `https://tts.navana.ai`);
|
|
29
|
+
pass `base_url=` to target another deployment.
|
|
30
|
+
|
|
31
|
+
### STT options
|
|
32
|
+
|
|
33
|
+
`model`, `language`, `sample_rate`, `interim_results`, `parse_number`, `aux`,
|
|
34
|
+
`min_confidence`, `hotwords` (`bodhi.BodhiHotword(phrase, score)`),
|
|
35
|
+
`endpoint_silence_duration`.
|
|
36
|
+
|
|
37
|
+
### TTS options
|
|
38
|
+
|
|
39
|
+
`voice`, `language`, `sample_rate` (8000/16000/24000), `use_fast`, `num_step`,
|
|
40
|
+
`guidance_scale`.
|
|
41
|
+
|
|
42
|
+
## License
|
|
43
|
+
|
|
44
|
+
Apache-2.0. The implementation ships in the
|
|
45
|
+
[`bodhi-api-sdk`](https://github.com/navana-tech/bodhi-python-sdk) package; this
|
|
46
|
+
plugin re-exports it under the `livekit.plugins.bodhi` namespace.
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
#
|
|
2
|
+
# Bodhi (Navana Tech) plugin for LiveKit Agents.
|
|
3
|
+
#
|
|
4
|
+
# Licensed under the Apache License, Version 2.0.
|
|
5
|
+
#
|
|
6
|
+
|
|
7
|
+
"""Bodhi plugin for LiveKit Agents.
|
|
8
|
+
|
|
9
|
+
Indian-language speech-to-text and text-to-speech from Bodhi (Navana Tech),
|
|
10
|
+
exposed as LiveKit ``stt.STT`` / ``tts.TTS`` providers::
|
|
11
|
+
|
|
12
|
+
from livekit.plugins import bodhi
|
|
13
|
+
|
|
14
|
+
session = AgentSession(
|
|
15
|
+
stt=bodhi.STT(model="hi-general-v2-8khz", sample_rate=8000),
|
|
16
|
+
tts=bodhi.TTS(language="hi", voice="default_female"),
|
|
17
|
+
# ... vad, llm
|
|
18
|
+
)
|
|
19
|
+
|
|
20
|
+
Set ``BODHI_API_KEY`` in the environment, or pass ``api_key=`` to either class.
|
|
21
|
+
Both default to the Navana hosts (``stt.navana.ai`` / ``tts.navana.ai``); pass
|
|
22
|
+
``base_url=`` to point at another deployment.
|
|
23
|
+
|
|
24
|
+
The implementation lives in the ``bodhi-api-sdk`` package; this plugin re-exports
|
|
25
|
+
it under the ``livekit.plugins.bodhi`` namespace so it installs and imports the
|
|
26
|
+
same way as every other LiveKit provider plugin.
|
|
27
|
+
"""
|
|
28
|
+
|
|
29
|
+
try:
|
|
30
|
+
from bodhi.integrations.livekit_stt import (
|
|
31
|
+
BodhiHotword,
|
|
32
|
+
BodhiSTT as STT,
|
|
33
|
+
SpeechStream,
|
|
34
|
+
)
|
|
35
|
+
from bodhi.integrations.livekit_tts import (
|
|
36
|
+
BodhiTTS as TTS,
|
|
37
|
+
ChunkedStream,
|
|
38
|
+
SynthesizeStream,
|
|
39
|
+
)
|
|
40
|
+
except ImportError as e: # pragma: no cover
|
|
41
|
+
raise ImportError(
|
|
42
|
+
"livekit-plugins-bodhi needs bodhi-api-sdk with its LiveKit integration. "
|
|
43
|
+
'Install with: pip install "livekit-plugins-bodhi" '
|
|
44
|
+
"(or upgrade bodhi-api-sdk)."
|
|
45
|
+
) from e
|
|
46
|
+
|
|
47
|
+
from .version import __version__
|
|
48
|
+
|
|
49
|
+
__all__ = [
|
|
50
|
+
"STT",
|
|
51
|
+
"TTS",
|
|
52
|
+
"BodhiHotword",
|
|
53
|
+
"SpeechStream",
|
|
54
|
+
"ChunkedStream",
|
|
55
|
+
"SynthesizeStream",
|
|
56
|
+
"__version__",
|
|
57
|
+
]
|
|
58
|
+
|
|
59
|
+
from livekit.agents import Plugin
|
|
60
|
+
|
|
61
|
+
from .log import logger
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
class BodhiPlugin(Plugin):
|
|
65
|
+
def __init__(self) -> None:
|
|
66
|
+
super().__init__(__name__, __version__, __package__, logger)
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
Plugin.register_plugin(BodhiPlugin())
|
|
70
|
+
|
|
71
|
+
# Hide re-exported helper modules from generated docs.
|
|
72
|
+
_module = dir()
|
|
73
|
+
NOT_IN_ALL = [m for m in _module if m not in __all__]
|
|
74
|
+
|
|
75
|
+
__pdoc__ = {}
|
|
76
|
+
for _n in NOT_IN_ALL:
|
|
77
|
+
__pdoc__[_n] = False
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.1.0"
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["hatchling"]
|
|
3
|
+
build-backend = "hatchling.build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "livekit-plugins-bodhi"
|
|
7
|
+
dynamic = ["version"]
|
|
8
|
+
description = "LiveKit Agents plugin for Bodhi (Navana Tech) STT and TTS"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
license = "Apache-2.0"
|
|
11
|
+
requires-python = ">=3.9"
|
|
12
|
+
authors = [{ name = "Navana Tech" }]
|
|
13
|
+
keywords = ["voice", "ai", "realtime", "audio", "livekit", "bodhi", "navana", "stt", "tts"]
|
|
14
|
+
classifiers = [
|
|
15
|
+
"Intended Audience :: Developers",
|
|
16
|
+
"License :: OSI Approved :: Apache Software License",
|
|
17
|
+
"Topic :: Multimedia :: Sound/Audio",
|
|
18
|
+
"Topic :: Scientific/Engineering :: Artificial Intelligence",
|
|
19
|
+
"Programming Language :: Python :: 3",
|
|
20
|
+
"Programming Language :: Python :: 3 :: Only",
|
|
21
|
+
]
|
|
22
|
+
dependencies = [
|
|
23
|
+
"livekit-agents>=1.0",
|
|
24
|
+
"bodhi-api-sdk>=1.3",
|
|
25
|
+
]
|
|
26
|
+
|
|
27
|
+
[project.urls]
|
|
28
|
+
Homepage = "https://www.navanatech.in/"
|
|
29
|
+
Source = "https://github.com/navana-tech/bodhi-python-sdk"
|
|
30
|
+
|
|
31
|
+
[tool.hatch.version]
|
|
32
|
+
path = "livekit/plugins/bodhi/version.py"
|
|
33
|
+
|
|
34
|
+
[tool.hatch.build.targets.wheel]
|
|
35
|
+
packages = ["livekit"]
|
|
36
|
+
|
|
37
|
+
[tool.hatch.build.targets.sdist]
|
|
38
|
+
include = ["/livekit", "/README.md"]
|