Metadata-Version: 2.4
Name: bhashini-client-sdk
Version: 0.1.7
Summary: Python SDK for Bhashini APIs including ASR, NMT, TTS, OCR, NER, and audio language services
Home-page: https://github.com/bhashini-dibd/Bhashini-client-python-library.git
Author: Nidhi Jha
License: MIT
Project-URL: Homepage, https://github.com/bhashini-dibd/Bhashini-client-python-library.git
Project-URL: Source, https://github.com/bhashini-dibd/Bhashini-client-python-library.git
Project-URL: Issues, https://github.com/bhashini-dibd/Bhashini-client-python-library.git
Keywords: bhashini,asr,nmt,tts,ocr,ner,translation,speech
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests>=2.25.0
Requires-Dist: openpyxl>=3.1.0
Dynamic: author
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: keywords
Dynamic: license
Dynamic: license-file
Dynamic: project-url
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# bhashini-client-sdk

Python SDK for Bhashini inference APIs.

## Features

- ASR
- NMT
- TTS
- Transliteration
- Text Language Detection
- NER
- OCR
- Audio Language Detection
- Speaker Diarization

## Installation

```bash
pip install bhashini-client-sdk
```

## Setup

Set your Bhashini API key before using the client.

```powershell
$env:BHASHINI_API_KEY="your_api_key"
```

Optional sample files for the demo:

```powershell
$env:BHASHINI_SAMPLE_AUDIO="C:\full\path\sample.wav"
$env:BHASHINI_SAMPLE_IMAGE="C:\full\path\sample.png"
```

## Quick Start

```python
from bhashini_client import BhashiniClient

client = BhashiniClient()

print(client.text_language_detection("Hello world"))
print(client.nmt("Hello", "en", "hi"))
print(client.transliteration("namaste", "en", "hi"))
print(client.ner("Narendra Modi went to Delhi.", "en"))
print(client.audio_language_detection("C:\\full\\path\\sample.wav"))
print(client.speaker_diarization("C:\\full\\path\\sample.wav"))
print(client.asr("C:\\full\\path\\sample.wav", "hi"))
```

## Demo

```powershell
python demo.py
```

## Testing

```powershell
python -m pytest tests
```

The test suite writes results to `final_bhashini_test_results.xlsx`.

## Supported Input Notes

- Audio input should be `.wav`
- Expected sampling rate is `16000`
- ASR also expects mono audio
- Services accept file-path input and, where supported, base64 audio input

## Package Contents

- `bhashini_client.BhashiniClient`
- `bhashini_client.get_models_info`

## License

MIT
