A Python client for interacting with Bhashini inference services (ASR, NMT, TTS).
Project description
bhashini-client
A simple Python client library for interacting with Bhashini inference APIs.
Currently supports:
- ASR (Automatic Speech Recognition)
- NMT (Machine Translation)
- TTS (Text-to-Speech)
Installation
pip install bhashini-client
Example Usage
from bhashini_client import BhashiniClient
client = BhashiniClient(api_key="api-key")
# ASR basics
print(client.asr("https://example.com/audio.wav", "te"))
# ASR with explicit configuration
print(
client.asr(
"https://example.com/audio.wav",
"te",
serviceId="bhashini/ai4bharat/conformer-multilingual-asr",
samplingRate=44100,
)
)
# NMT with optional processors
print(
client.nmt(
"What are you doing?",
"en",
"hi",
numTranslation="False",
preProcessors=["glossary"],
postProcessors=["glossary"],
)
)
# TTS with preprocessing and file output
print(
client.tts(
"मेरा नाम विहिर है",
"en",
save_to="output_audio.wav",
gender="female",
preProcessors=["text-normalization"],
postProcessors=["high-compression"],
)
)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
bhashini_client-0.1.4.tar.gz
(7.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bhashini_client-0.1.4.tar.gz.
File metadata
- Download URL: bhashini_client-0.1.4.tar.gz
- Upload date:
- Size: 7.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
feaf83e7dfadaff99b1b2d00816bd1bf4c8ac6ab9b36e3ea23a29f8984a6d4c1
|
|
| MD5 |
7729e1eb16c0e150b276ae1fe2dbf0bf
|
|
| BLAKE2b-256 |
02c1c62a263d79794e4a85b11a905d60c83afdfe01e229f37e04569cf6e3b9a7
|
File details
Details for the file bhashini_client-0.1.4-py3-none-any.whl.
File metadata
- Download URL: bhashini_client-0.1.4-py3-none-any.whl
- Upload date:
- Size: 9.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
09b4f1a1840fdce75ca694cdac270020ae6c9a4faed9276f7de1a7b9878c5981
|
|
| MD5 |
4cd9b7e08cce32a0488c31ced31bf0a1
|
|
| BLAKE2b-256 |
9f115435d9ee7b0385bfc1d955784d6f1fd8d9aee90b29a4af03fd3f6cd5290a
|