# Hinglish Market Brief — Daily Finance News Summarizer > An automated voice pipeline that fetches daily *Economic Times* headlines, translates and summarises them into Hinglish using Sarvam-30B, and delivers the output as natural-sounding audio via Bulbul v3 TTS. --- ## What it does Indian retail investors and finance enthusiasts who are more comfortable in Hindi than English often miss out on daily market news because most financial media publishes in formal English. This pipeline bridges that gap by converting top ET headlines into a spoken Hinglish brief — think of it as a 2-minute daily finance podcast, auto-generated. **Core flow:** ``` ET Headlines (RSS/scrape) ↓ Mayura (translation & Hinglish rewrite) ↓ Sarvam-30B (summarisation & financial term retention) ↓ Bulbul v3 TTS (audio synthesis) ↓ Output: .mp3 daily brief ``` --- ## Tech stack | Component | Role | |---|---| | `Sarvam-30B` | LLM — Hinglish summarisation | | `Bulbul v3` | TTS — natural Hindi-English voice output | | `Saaras v3 STT` | Speech-to-text (for input audio validation) | | `Mayura` | Translation layer — English → Hinglish rewrite | | `Python` | Pipeline orchestration, API calls, error handling | | Sarvam AI SDK | Auth, speaker config, parameter management | --- ## Results - **88% financial term retention** across 300 headlines — terms like *SEBI*, *FII outflows*, *yield curve* preserved correctly in Hinglish output - **~4s average latency** end-to-end per headline - **Zero English fallback** in audio output — full Hinglish throughout --- ## Setup ### Prerequisites - Python 3.9+ - Sarvam AI API key — get one at [sarvam.ai](https://sarvam.ai) ### Install ```bash git clone https://github.com/your-username/hinglish-market-brief cd hinglish-market-brief pip install -r requirements.txt ``` ### Configure Create a `.env` file in the root: ``` SARVAM_API_KEY=your_api_key_here ``` ### Run ```bash python pipeline.py ``` Output `.mp3` files are saved to `/output`. --- ## Project structure ``` hinglish-market-brief/ ├── pipeline.py # Main orchestration script ├── scraper.py # ET headline fetcher ├── translator.py # Mayura + Sarvam-30B rewrite logic ├── tts.py # Bulbul v3 audio synthesis ├── evaluator.py # Financial term retention scoring ├── output/ # Generated audio files ├── requirements.txt └── .env.example ``` --- ## Key engineering challenges **API integration from scratch** — Sarvam's SDK documentation was sparse at the time of building. Speaker config, auth headers, and audio parameter errors (sample rate, encoding format) had to be debugged manually by reading raw HTTP responses and SDK source. **Financial term retention** — Generic Hinglish translation tends to calque financial jargon incorrectly (e.g., translating *"yield"* literally). Prompt engineering on Sarvam-30B with explicit term preservation instructions was required to hit the 88% retention benchmark. **Latency optimisation** — Initial pipeline latency was ~11s per headline. Batching translation calls and parallelising TTS requests brought this down to ~4s. --- ## Evaluation methodology Term retention was measured by: 1. Extracting a reference list of financial terms from each raw headline 2. Parsing the Hinglish output for presence of the same terms (exact or transliterated) 3. Computing retention rate = matched terms / total reference terms Scored across 300 headlines from a 30-day ET archive. --- ## Potential extensions - [ ] WhatsApp/Telegram delivery via Twilio or WATI - [ ] User-configurable topic filters (equity, macro, crypto) - [ ] Multi-language support — Tamil, Telugu, Bengali via Sarvam's regional models - [ ] Scheduled daily cron job with cloud deployment (Render / Railway) --- ## Author **Devdutt Patel** — B.E. EEE + M.Sc. Economics, BITS Pilani [LinkedIn](https://linkedin.com/in/devduttpatel) · [devduttpatel001@gmail.com](mailto:devduttpatel001@gmail.com)