Metadata-Version: 2.1
Name: bhashini-client-sdk
Version: 0.1.5
Summary: Python SDK for Bhashini APIs including ASR, NMT, TTS, OCR, NER, and audio language services
Home-page: https://github.com/Nidhi18-git/bhashini-client
Author: Nidhi Jha
License: MIT
Project-URL: Homepage, https://github.com/Nidhi18-git/bhashini-client
Project-URL: Source, https://github.com/Nidhi18-git/bhashini-client
Project-URL: Issues, https://github.com/Nidhi18-git/bhashini-client/issues
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

# bhashini-client-sdk

Python SDK for Bhashini inference APIs.

## Features

- ASR
- NMT
- TTS
- Transliteration
- Text Language Detection
- NER
- OCR
- ASR + NMT
- 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"))
print(client.speech_translate("C:\\full\\path\\sample.wav", "hi", "en"))
```

## 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`
- Services accept file-path input and, where supported, base64 audio input

## Package Contents

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

## License

MIT
