gnani-mcp 0.2.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.
- gnani_mcp-0.2.0/.gitignore +230 -0
- gnani_mcp-0.2.0/LICENSE +21 -0
- gnani_mcp-0.2.0/PKG-INFO +226 -0
- gnani_mcp-0.2.0/README.md +190 -0
- gnani_mcp-0.2.0/pyproject.toml +107 -0
- gnani_mcp-0.2.0/src/gnani_mcp/__init__.py +8 -0
- gnani_mcp-0.2.0/src/gnani_mcp/__main__.py +5 -0
- gnani_mcp-0.2.0/src/gnani_mcp/_registry.py +22 -0
- gnani_mcp-0.2.0/src/gnani_mcp/audio.py +193 -0
- gnani_mcp-0.2.0/src/gnani_mcp/config.py +86 -0
- gnani_mcp-0.2.0/src/gnani_mcp/exceptions.py +55 -0
- gnani_mcp-0.2.0/src/gnani_mcp/http.py +362 -0
- gnani_mcp-0.2.0/src/gnani_mcp/server.py +239 -0
- gnani_mcp-0.2.0/src/gnani_mcp/tools/__init__.py +5 -0
- gnani_mcp-0.2.0/src/gnani_mcp/tools/_common.py +580 -0
- gnani_mcp-0.2.0/src/gnani_mcp/tools/stt.py +265 -0
- gnani_mcp-0.2.0/src/gnani_mcp/tools/stt_batch.py +629 -0
- gnani_mcp-0.2.0/src/gnani_mcp/tools/tts.py +261 -0
- gnani_mcp-0.2.0/src/gnani_mcp/tools/voice_clone.py +179 -0
- gnani_mcp-0.2.0/src/gnani_mcp/voices.py +146 -0
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[codz]
|
|
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
|
+
# poetry.toml
|
|
110
|
+
|
|
111
|
+
# pdm
|
|
112
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
113
|
+
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
|
|
114
|
+
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
|
|
115
|
+
# pdm.lock
|
|
116
|
+
# pdm.toml
|
|
117
|
+
.pdm-python
|
|
118
|
+
.pdm-build/
|
|
119
|
+
|
|
120
|
+
# pixi
|
|
121
|
+
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
|
|
122
|
+
# pixi.lock
|
|
123
|
+
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
|
|
124
|
+
# in the .venv directory. It is recommended not to include this directory in version control.
|
|
125
|
+
.pixi
|
|
126
|
+
|
|
127
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
128
|
+
__pypackages__/
|
|
129
|
+
|
|
130
|
+
# Celery stuff
|
|
131
|
+
celerybeat-schedule
|
|
132
|
+
celerybeat.pid
|
|
133
|
+
|
|
134
|
+
# Redis
|
|
135
|
+
*.rdb
|
|
136
|
+
*.aof
|
|
137
|
+
*.pid
|
|
138
|
+
|
|
139
|
+
# RabbitMQ
|
|
140
|
+
mnesia/
|
|
141
|
+
rabbitmq/
|
|
142
|
+
rabbitmq-data/
|
|
143
|
+
|
|
144
|
+
# ActiveMQ
|
|
145
|
+
activemq-data/
|
|
146
|
+
|
|
147
|
+
# SageMath parsed files
|
|
148
|
+
*.sage.py
|
|
149
|
+
|
|
150
|
+
# Environments
|
|
151
|
+
.env
|
|
152
|
+
.envrc
|
|
153
|
+
.venv
|
|
154
|
+
env/
|
|
155
|
+
venv/
|
|
156
|
+
ENV/
|
|
157
|
+
env.bak/
|
|
158
|
+
venv.bak/
|
|
159
|
+
|
|
160
|
+
# Spyder project settings
|
|
161
|
+
.spyderproject
|
|
162
|
+
.spyproject
|
|
163
|
+
|
|
164
|
+
# Rope project settings
|
|
165
|
+
.ropeproject
|
|
166
|
+
|
|
167
|
+
# mkdocs documentation
|
|
168
|
+
/site
|
|
169
|
+
|
|
170
|
+
# mypy
|
|
171
|
+
.mypy_cache/
|
|
172
|
+
.dmypy.json
|
|
173
|
+
dmypy.json
|
|
174
|
+
|
|
175
|
+
# Pyre type checker
|
|
176
|
+
.pyre/
|
|
177
|
+
|
|
178
|
+
# pytype static type analyzer
|
|
179
|
+
.pytype/
|
|
180
|
+
|
|
181
|
+
# Cython debug symbols
|
|
182
|
+
cython_debug/
|
|
183
|
+
|
|
184
|
+
# PyCharm
|
|
185
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
186
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
187
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
188
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
189
|
+
# .idea/
|
|
190
|
+
|
|
191
|
+
# Abstra
|
|
192
|
+
# Abstra is an AI-powered process automation framework.
|
|
193
|
+
# Ignore directories containing user credentials, local state, and settings.
|
|
194
|
+
# Learn more at https://abstra.io/docs
|
|
195
|
+
.abstra/
|
|
196
|
+
|
|
197
|
+
# Visual Studio Code
|
|
198
|
+
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
|
|
199
|
+
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
|
|
200
|
+
# and can be added to the global gitignore or merged into this file. However, if you prefer,
|
|
201
|
+
# you could uncomment the following to ignore the entire vscode folder
|
|
202
|
+
# .vscode/
|
|
203
|
+
# Temporary file for partial code execution
|
|
204
|
+
tempCodeRunnerFile.py
|
|
205
|
+
|
|
206
|
+
# Ruff stuff:
|
|
207
|
+
.ruff_cache/
|
|
208
|
+
|
|
209
|
+
# PyPI configuration file
|
|
210
|
+
.pypirc
|
|
211
|
+
|
|
212
|
+
# Marimo
|
|
213
|
+
marimo/_static/
|
|
214
|
+
marimo/_lsp/
|
|
215
|
+
__marimo__/
|
|
216
|
+
|
|
217
|
+
# Streamlit
|
|
218
|
+
.streamlit/secrets.toml
|
|
219
|
+
|
|
220
|
+
# Gnani MCP — generated audio output files
|
|
221
|
+
gnani_*.wav
|
|
222
|
+
gnani_*.mp3
|
|
223
|
+
gnani_*.ogg
|
|
224
|
+
gnani_*.raw
|
|
225
|
+
|
|
226
|
+
# Gnani credentials
|
|
227
|
+
.gnani/
|
|
228
|
+
|
|
229
|
+
# Local audio output from manual MCP testing
|
|
230
|
+
.audio-out/
|
gnani_mcp-0.2.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Gnani AI
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
gnani_mcp-0.2.0/PKG-INFO
ADDED
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: gnani-mcp
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: Official Gnani AI MCP server — Speech-to-Text, Text-to-Speech, and Voice Clone for Indian languages
|
|
5
|
+
Project-URL: Homepage, https://gnani.ai
|
|
6
|
+
Project-URL: Documentation, https://docs.gnani.ai
|
|
7
|
+
Project-URL: Repository, https://github.com/Gnani-AI-Mintlify/gnani-mcp
|
|
8
|
+
Project-URL: Issues, https://github.com/Gnani-AI-Mintlify/gnani-mcp/issues
|
|
9
|
+
Author-email: Gnani AI <support@gnani.ai>
|
|
10
|
+
License-Expression: MIT
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Keywords: asr,gnani,indian-languages,indic,mcp,model-context-protocol,speech-to-text,stt,text-to-speech,tts,vachana,voice-clone
|
|
13
|
+
Classifier: Development Status :: 4 - Beta
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: Operating System :: OS Independent
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
21
|
+
Classifier: Topic :: Multimedia :: Sound/Audio :: Speech
|
|
22
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
23
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
24
|
+
Requires-Python: >=3.10
|
|
25
|
+
Requires-Dist: anyio>=4.3
|
|
26
|
+
Requires-Dist: fastmcp<5,>=2.12
|
|
27
|
+
Requires-Dist: httpx>=0.27.0
|
|
28
|
+
Requires-Dist: pydantic>=2.6
|
|
29
|
+
Provides-Extra: dev
|
|
30
|
+
Requires-Dist: mypy>=1.8; extra == 'dev'
|
|
31
|
+
Requires-Dist: pytest-asyncio>=0.23; extra == 'dev'
|
|
32
|
+
Requires-Dist: pytest>=8.0; extra == 'dev'
|
|
33
|
+
Requires-Dist: respx>=0.21; extra == 'dev'
|
|
34
|
+
Requires-Dist: ruff<1.0,>=0.4; extra == 'dev'
|
|
35
|
+
Description-Content-Type: text/markdown
|
|
36
|
+
|
|
37
|
+
# gnani-mcp
|
|
38
|
+
|
|
39
|
+
Official Gnani AI MCP server. Exposes Gnani Speech-to-Text (Prisma v2.5 / v3.0), Text-to-Speech (Timbre v2.5 / v3.0), and Voice Clone APIs as first-class MCP tools, so any MCP-aware client (Claude Desktop, Claude Code, Cursor, Windsurf, Zed) can call them with zero boilerplate.
|
|
40
|
+
|
|
41
|
+
Cross-platform Python package: **macOS, Windows, and Linux** (Python 3.10+).
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## Quickstart
|
|
46
|
+
|
|
47
|
+
### 1. Get your API key
|
|
48
|
+
|
|
49
|
+
Sign up or log in at **dashboard.gnani.ai** and copy your API key.
|
|
50
|
+
|
|
51
|
+
### 2. Add to your MCP client
|
|
52
|
+
|
|
53
|
+
Paste this into your MCP config JSON:
|
|
54
|
+
|
|
55
|
+
```json
|
|
56
|
+
{
|
|
57
|
+
"mcpServers": {
|
|
58
|
+
"gnani": {
|
|
59
|
+
"command": "uvx",
|
|
60
|
+
"args": ["gnani-mcp"],
|
|
61
|
+
"env": {
|
|
62
|
+
"GNANI_API_KEY": "your-api-key"
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Replace `your-api-key` with your actual API key.
|
|
70
|
+
|
|
71
|
+
If you have installed via `pip install gnani-mcp`, use the console script directly:
|
|
72
|
+
|
|
73
|
+
```json
|
|
74
|
+
{
|
|
75
|
+
"mcpServers": {
|
|
76
|
+
"gnani": {
|
|
77
|
+
"command": "gnani-mcp",
|
|
78
|
+
"env": {
|
|
79
|
+
"GNANI_API_KEY": "your-api-key"
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### 3. Config file locations
|
|
87
|
+
|
|
88
|
+
| Client | Config path |
|
|
89
|
+
|--------|-------------|
|
|
90
|
+
| **Cursor** | `~/.cursor/mcp.json` (macOS/Linux) · `%USERPROFILE%\.cursor\mcp.json` (Windows) |
|
|
91
|
+
| **Claude Desktop** | `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) |
|
|
92
|
+
| **Claude Code** | `claude mcp add gnani -- uvx gnani-mcp` (then set `GNANI_API_KEY` env var) |
|
|
93
|
+
| **Windsurf** | Cascade settings → MCP servers |
|
|
94
|
+
| **Zed** | `settings.json` → `context_servers` |
|
|
95
|
+
|
|
96
|
+
### Alternative: credentials file
|
|
97
|
+
|
|
98
|
+
Instead of setting `GNANI_API_KEY` in the JSON config, you can store it in `~/.gnani/credentials`:
|
|
99
|
+
|
|
100
|
+
```ini
|
|
101
|
+
api_key = your-api-key
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
The server checks `GNANI_API_KEY` env var first, then falls back to `~/.gnani/credentials`.
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
## Install
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
# Option A: run directly (no install needed)
|
|
112
|
+
uvx gnani-mcp
|
|
113
|
+
|
|
114
|
+
# Option B: install globally
|
|
115
|
+
pip install gnani-mcp
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
---
|
|
119
|
+
|
|
120
|
+
## Tools
|
|
121
|
+
|
|
122
|
+
| Tool | What it does |
|
|
123
|
+
|------|-------------|
|
|
124
|
+
| `gnani_stt_transcribe` | Transcribe a short clip (≤ 30 s) in 10 Indian languages — WAV, MP3, OGG, FLAC, AAC, M4A. `model`: `prisma-v2.5` (default) or `prisma-v3.0` |
|
|
125
|
+
| `gnani_stt_batch_transcribe` | Transcribe long (up to 4 h) or remote audio: create → start → poll → fetch, in one call. Supports both models |
|
|
126
|
+
| `gnani_stt_batch_list_jobs` | List Batch STT jobs (status filter + cursor pagination) |
|
|
127
|
+
| `gnani_stt_batch_status` / `_get_transcripts` / `_cancel` | Check, download, or cancel an existing Batch job |
|
|
128
|
+
| `gnani_tts_synthesize` | Synthesize speech. `model`: `timbre-v2.5` (default, 42 voices) or `timbre-v3.0` (13 voices, all 10 languages, inline audio tags) |
|
|
129
|
+
| `gnani_tts_list_voices` | Browse the voice catalog for either TTS model (language, gender, persona, description) |
|
|
130
|
+
| `gnani_vc_generate_embedding` | Extract a speaker embedding from a reference audio clip (step 1 of voice cloning) |
|
|
131
|
+
| `gnani_vc_synthesize` | Synthesize speech in a cloned voice using a speaker embedding (step 2) |
|
|
132
|
+
|
|
133
|
+
### Choosing a model
|
|
134
|
+
|
|
135
|
+
Both new models are **opt-in** — omit `model` and behaviour is unchanged (Prisma v2.5 / Timbre v2.5).
|
|
136
|
+
|
|
137
|
+
**Prisma v3.0** (`model="prisma-v3.0"`) on `gnani_stt_transcribe` and `gnani_stt_batch_transcribe`:
|
|
138
|
+
|
|
139
|
+
- `language_code="indic-auto"` lets the model identify the language, or pass 1–4 comma-separated codes (`"hi-IN,en-IN"`) as hints. REST results include `detected_language_code`.
|
|
140
|
+
- `format` adds `codemix` (English words stay Latin) and, on REST only, `transliterate` (Latin-letter output). When `format` is omitted v3.0 picks a style per request (digits for a single `hi-IN`/`en-IN`) — pass `format` explicitly to keep v2.5-style output.
|
|
141
|
+
- Context hints: `keyterms`, `topic`, `speaker_names`, and (REST only) `previous_text`. On Batch only one of `keyterms`, `topic`, `topic + keyterms`, or `speaker_names` is accepted, and `topic` must be 30–1,600 characters.
|
|
142
|
+
|
|
143
|
+
**Timbre v3.0** (`model="timbre-v3.0"`) on `gnani_tts_synthesize`:
|
|
144
|
+
|
|
145
|
+
- Voices are **not** shared between models: Shivani, Lakshmi, Kalpana, Chetana, Vasudha, Riyaa, Tarika (F); Avinash, Shubham, Prakash, Devansh, Yashraj, Harshad (M). Every voice speaks all 10 languages.
|
|
146
|
+
- Inline audio tags in `text`: `<laugh>`, `<giggle>`, `<sigh>`, `<exhales>`, `<sniffles>`, `<yawns>`, `<coughs>`, `<clears throat>`, `<whispers>`, `<shouting>`, `<excited>`, `<slow>`, `<pauses>` (silence, never spoken). A tag applies until the next tag; tags are billed as characters. With v2.5 they are stripped, and the tool returns a warning.
|
|
147
|
+
|
|
148
|
+
---
|
|
149
|
+
|
|
150
|
+
## Configuration
|
|
151
|
+
|
|
152
|
+
| Env var | Default | Description |
|
|
153
|
+
|---------|---------|-------------|
|
|
154
|
+
| `GNANI_API_KEY` | — | **Required.** Your Gnani API key. |
|
|
155
|
+
| `GNANI_API_BASE_URL` | `https://api.vachana.ai` | Override for testing / staging. |
|
|
156
|
+
| `GNANI_MCP_BASE_PATH` | `~/Desktop` | Directory where audio output files are saved. |
|
|
157
|
+
| `GNANI_AUDIO_OUTPUT_MODE` | `files` | `files` · `resources` · `both` |
|
|
158
|
+
|
|
159
|
+
---
|
|
160
|
+
|
|
161
|
+
## Supported Languages
|
|
162
|
+
|
|
163
|
+
### STT (Prisma v2.5 / v3.0)
|
|
164
|
+
|
|
165
|
+
| Language | Code |
|
|
166
|
+
|----------|------|
|
|
167
|
+
| Bengali | `bn-IN` |
|
|
168
|
+
| English (India) | `en-IN` |
|
|
169
|
+
| Gujarati | `gu-IN` |
|
|
170
|
+
| Hindi | `hi-IN` |
|
|
171
|
+
| Kannada | `kn-IN` |
|
|
172
|
+
| Malayalam | `ml-IN` |
|
|
173
|
+
| Marathi | `mr-IN` |
|
|
174
|
+
| Punjabi | `pa-IN` |
|
|
175
|
+
| Tamil | `ta-IN` |
|
|
176
|
+
| Telugu | `te-IN` |
|
|
177
|
+
|
|
178
|
+
### TTS (Timbre v2.5 / v3.0) — also supports Hinglish (`hi-en`) and `auto`
|
|
179
|
+
|
|
180
|
+
Timbre v2.5: 42 voices across all 10 Indian languages plus Hinglish, one preferred language each. Timbre v3.0: 13 voices that each speak all 10 languages. Use `gnani_tts_list_voices` (with `model`) to browse.
|
|
181
|
+
|
|
182
|
+
---
|
|
183
|
+
|
|
184
|
+
## Voice Clone Workflow
|
|
185
|
+
|
|
186
|
+
```python
|
|
187
|
+
# Step 1 — generate embedding from reference audio (do this once per voice)
|
|
188
|
+
embedding_result = gnani_vc_generate_embedding(audio_path="/path/to/reference.wav")
|
|
189
|
+
speaker_embedding = embedding_result["speaker_embedding"]
|
|
190
|
+
|
|
191
|
+
# Step 2 — synthesize with the cloned voice (reuse embedding as many times as needed)
|
|
192
|
+
audio_result = gnani_vc_synthesize(
|
|
193
|
+
text="नमस्ते, आप कैसे हैं?",
|
|
194
|
+
speaker_embedding=speaker_embedding,
|
|
195
|
+
)
|
|
196
|
+
print(audio_result["audio_file"]) # path to saved WAV file
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
---
|
|
200
|
+
|
|
201
|
+
## Development
|
|
202
|
+
|
|
203
|
+
```bash
|
|
204
|
+
# Clone and set up
|
|
205
|
+
git clone https://github.com/Gnani-AI-Mintlify/gnani-mcp.git
|
|
206
|
+
cd gnani-mcp
|
|
207
|
+
|
|
208
|
+
uv venv && source .venv/bin/activate
|
|
209
|
+
uv pip install -e ".[dev]"
|
|
210
|
+
|
|
211
|
+
# Run tests
|
|
212
|
+
pytest -q
|
|
213
|
+
|
|
214
|
+
# Run the MCP server locally
|
|
215
|
+
gnani-mcp
|
|
216
|
+
|
|
217
|
+
# Print client config JSON
|
|
218
|
+
gnani-mcp --print
|
|
219
|
+
gnani-mcp --api-key=your-key --print
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
---
|
|
223
|
+
|
|
224
|
+
## License
|
|
225
|
+
|
|
226
|
+
[MIT](LICENSE)
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
# gnani-mcp
|
|
2
|
+
|
|
3
|
+
Official Gnani AI MCP server. Exposes Gnani Speech-to-Text (Prisma v2.5 / v3.0), Text-to-Speech (Timbre v2.5 / v3.0), and Voice Clone APIs as first-class MCP tools, so any MCP-aware client (Claude Desktop, Claude Code, Cursor, Windsurf, Zed) can call them with zero boilerplate.
|
|
4
|
+
|
|
5
|
+
Cross-platform Python package: **macOS, Windows, and Linux** (Python 3.10+).
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Quickstart
|
|
10
|
+
|
|
11
|
+
### 1. Get your API key
|
|
12
|
+
|
|
13
|
+
Sign up or log in at **dashboard.gnani.ai** and copy your API key.
|
|
14
|
+
|
|
15
|
+
### 2. Add to your MCP client
|
|
16
|
+
|
|
17
|
+
Paste this into your MCP config JSON:
|
|
18
|
+
|
|
19
|
+
```json
|
|
20
|
+
{
|
|
21
|
+
"mcpServers": {
|
|
22
|
+
"gnani": {
|
|
23
|
+
"command": "uvx",
|
|
24
|
+
"args": ["gnani-mcp"],
|
|
25
|
+
"env": {
|
|
26
|
+
"GNANI_API_KEY": "your-api-key"
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Replace `your-api-key` with your actual API key.
|
|
34
|
+
|
|
35
|
+
If you have installed via `pip install gnani-mcp`, use the console script directly:
|
|
36
|
+
|
|
37
|
+
```json
|
|
38
|
+
{
|
|
39
|
+
"mcpServers": {
|
|
40
|
+
"gnani": {
|
|
41
|
+
"command": "gnani-mcp",
|
|
42
|
+
"env": {
|
|
43
|
+
"GNANI_API_KEY": "your-api-key"
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### 3. Config file locations
|
|
51
|
+
|
|
52
|
+
| Client | Config path |
|
|
53
|
+
|--------|-------------|
|
|
54
|
+
| **Cursor** | `~/.cursor/mcp.json` (macOS/Linux) · `%USERPROFILE%\.cursor\mcp.json` (Windows) |
|
|
55
|
+
| **Claude Desktop** | `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) |
|
|
56
|
+
| **Claude Code** | `claude mcp add gnani -- uvx gnani-mcp` (then set `GNANI_API_KEY` env var) |
|
|
57
|
+
| **Windsurf** | Cascade settings → MCP servers |
|
|
58
|
+
| **Zed** | `settings.json` → `context_servers` |
|
|
59
|
+
|
|
60
|
+
### Alternative: credentials file
|
|
61
|
+
|
|
62
|
+
Instead of setting `GNANI_API_KEY` in the JSON config, you can store it in `~/.gnani/credentials`:
|
|
63
|
+
|
|
64
|
+
```ini
|
|
65
|
+
api_key = your-api-key
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
The server checks `GNANI_API_KEY` env var first, then falls back to `~/.gnani/credentials`.
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## Install
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
# Option A: run directly (no install needed)
|
|
76
|
+
uvx gnani-mcp
|
|
77
|
+
|
|
78
|
+
# Option B: install globally
|
|
79
|
+
pip install gnani-mcp
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## Tools
|
|
85
|
+
|
|
86
|
+
| Tool | What it does |
|
|
87
|
+
|------|-------------|
|
|
88
|
+
| `gnani_stt_transcribe` | Transcribe a short clip (≤ 30 s) in 10 Indian languages — WAV, MP3, OGG, FLAC, AAC, M4A. `model`: `prisma-v2.5` (default) or `prisma-v3.0` |
|
|
89
|
+
| `gnani_stt_batch_transcribe` | Transcribe long (up to 4 h) or remote audio: create → start → poll → fetch, in one call. Supports both models |
|
|
90
|
+
| `gnani_stt_batch_list_jobs` | List Batch STT jobs (status filter + cursor pagination) |
|
|
91
|
+
| `gnani_stt_batch_status` / `_get_transcripts` / `_cancel` | Check, download, or cancel an existing Batch job |
|
|
92
|
+
| `gnani_tts_synthesize` | Synthesize speech. `model`: `timbre-v2.5` (default, 42 voices) or `timbre-v3.0` (13 voices, all 10 languages, inline audio tags) |
|
|
93
|
+
| `gnani_tts_list_voices` | Browse the voice catalog for either TTS model (language, gender, persona, description) |
|
|
94
|
+
| `gnani_vc_generate_embedding` | Extract a speaker embedding from a reference audio clip (step 1 of voice cloning) |
|
|
95
|
+
| `gnani_vc_synthesize` | Synthesize speech in a cloned voice using a speaker embedding (step 2) |
|
|
96
|
+
|
|
97
|
+
### Choosing a model
|
|
98
|
+
|
|
99
|
+
Both new models are **opt-in** — omit `model` and behaviour is unchanged (Prisma v2.5 / Timbre v2.5).
|
|
100
|
+
|
|
101
|
+
**Prisma v3.0** (`model="prisma-v3.0"`) on `gnani_stt_transcribe` and `gnani_stt_batch_transcribe`:
|
|
102
|
+
|
|
103
|
+
- `language_code="indic-auto"` lets the model identify the language, or pass 1–4 comma-separated codes (`"hi-IN,en-IN"`) as hints. REST results include `detected_language_code`.
|
|
104
|
+
- `format` adds `codemix` (English words stay Latin) and, on REST only, `transliterate` (Latin-letter output). When `format` is omitted v3.0 picks a style per request (digits for a single `hi-IN`/`en-IN`) — pass `format` explicitly to keep v2.5-style output.
|
|
105
|
+
- Context hints: `keyterms`, `topic`, `speaker_names`, and (REST only) `previous_text`. On Batch only one of `keyterms`, `topic`, `topic + keyterms`, or `speaker_names` is accepted, and `topic` must be 30–1,600 characters.
|
|
106
|
+
|
|
107
|
+
**Timbre v3.0** (`model="timbre-v3.0"`) on `gnani_tts_synthesize`:
|
|
108
|
+
|
|
109
|
+
- Voices are **not** shared between models: Shivani, Lakshmi, Kalpana, Chetana, Vasudha, Riyaa, Tarika (F); Avinash, Shubham, Prakash, Devansh, Yashraj, Harshad (M). Every voice speaks all 10 languages.
|
|
110
|
+
- Inline audio tags in `text`: `<laugh>`, `<giggle>`, `<sigh>`, `<exhales>`, `<sniffles>`, `<yawns>`, `<coughs>`, `<clears throat>`, `<whispers>`, `<shouting>`, `<excited>`, `<slow>`, `<pauses>` (silence, never spoken). A tag applies until the next tag; tags are billed as characters. With v2.5 they are stripped, and the tool returns a warning.
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
## Configuration
|
|
115
|
+
|
|
116
|
+
| Env var | Default | Description |
|
|
117
|
+
|---------|---------|-------------|
|
|
118
|
+
| `GNANI_API_KEY` | — | **Required.** Your Gnani API key. |
|
|
119
|
+
| `GNANI_API_BASE_URL` | `https://api.vachana.ai` | Override for testing / staging. |
|
|
120
|
+
| `GNANI_MCP_BASE_PATH` | `~/Desktop` | Directory where audio output files are saved. |
|
|
121
|
+
| `GNANI_AUDIO_OUTPUT_MODE` | `files` | `files` · `resources` · `both` |
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
## Supported Languages
|
|
126
|
+
|
|
127
|
+
### STT (Prisma v2.5 / v3.0)
|
|
128
|
+
|
|
129
|
+
| Language | Code |
|
|
130
|
+
|----------|------|
|
|
131
|
+
| Bengali | `bn-IN` |
|
|
132
|
+
| English (India) | `en-IN` |
|
|
133
|
+
| Gujarati | `gu-IN` |
|
|
134
|
+
| Hindi | `hi-IN` |
|
|
135
|
+
| Kannada | `kn-IN` |
|
|
136
|
+
| Malayalam | `ml-IN` |
|
|
137
|
+
| Marathi | `mr-IN` |
|
|
138
|
+
| Punjabi | `pa-IN` |
|
|
139
|
+
| Tamil | `ta-IN` |
|
|
140
|
+
| Telugu | `te-IN` |
|
|
141
|
+
|
|
142
|
+
### TTS (Timbre v2.5 / v3.0) — also supports Hinglish (`hi-en`) and `auto`
|
|
143
|
+
|
|
144
|
+
Timbre v2.5: 42 voices across all 10 Indian languages plus Hinglish, one preferred language each. Timbre v3.0: 13 voices that each speak all 10 languages. Use `gnani_tts_list_voices` (with `model`) to browse.
|
|
145
|
+
|
|
146
|
+
---
|
|
147
|
+
|
|
148
|
+
## Voice Clone Workflow
|
|
149
|
+
|
|
150
|
+
```python
|
|
151
|
+
# Step 1 — generate embedding from reference audio (do this once per voice)
|
|
152
|
+
embedding_result = gnani_vc_generate_embedding(audio_path="/path/to/reference.wav")
|
|
153
|
+
speaker_embedding = embedding_result["speaker_embedding"]
|
|
154
|
+
|
|
155
|
+
# Step 2 — synthesize with the cloned voice (reuse embedding as many times as needed)
|
|
156
|
+
audio_result = gnani_vc_synthesize(
|
|
157
|
+
text="नमस्ते, आप कैसे हैं?",
|
|
158
|
+
speaker_embedding=speaker_embedding,
|
|
159
|
+
)
|
|
160
|
+
print(audio_result["audio_file"]) # path to saved WAV file
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
---
|
|
164
|
+
|
|
165
|
+
## Development
|
|
166
|
+
|
|
167
|
+
```bash
|
|
168
|
+
# Clone and set up
|
|
169
|
+
git clone https://github.com/Gnani-AI-Mintlify/gnani-mcp.git
|
|
170
|
+
cd gnani-mcp
|
|
171
|
+
|
|
172
|
+
uv venv && source .venv/bin/activate
|
|
173
|
+
uv pip install -e ".[dev]"
|
|
174
|
+
|
|
175
|
+
# Run tests
|
|
176
|
+
pytest -q
|
|
177
|
+
|
|
178
|
+
# Run the MCP server locally
|
|
179
|
+
gnani-mcp
|
|
180
|
+
|
|
181
|
+
# Print client config JSON
|
|
182
|
+
gnani-mcp --print
|
|
183
|
+
gnani-mcp --api-key=your-key --print
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
---
|
|
187
|
+
|
|
188
|
+
## License
|
|
189
|
+
|
|
190
|
+
[MIT](LICENSE)
|