Skip to main content

A library for analysis and synthesis of Indian classical music

Project description

# Bhargava Swara

A Python library for analyzing Indian classical music, including raga, tala, tempo, tradition, ornaments, and full analysis.


## Prerequisites
- **Gemini API Key:** This library uses Google's Gemini API for music analysis. You’ll need to:
1. Sign up for a Google Cloud account.
2. Enable the Generative AI API in the Google Cloud Console.
3. Create an API key in the "Credentials" section.
See [Google’s Generative AI Docs](https://cloud.google.com/generative-ai/docs) for details.


## Installation
```bash
pip install bhargava_swara



USAGE

from bhargava_swara import (
analyze_raga,
analyze_tala,
analyze_tempo,
analyze_tradition,
analyze_ornaments,
analyze_music_full
)

# Set your Gemini API key
api_key = "YOUR_API_KEY"
audio = "path/to/audio.wav"

# Individual analyses
print(f"Raga: {analyze_raga(audio, api_key)}")
print(f"Tala: {analyze_tala(audio, api_key)}")
print(f"Tempo: {analyze_tempo(audio, api_key)}")
print(f"Tradition: {analyze_tradition(audio, api_key)}")
print(f"Ornaments: {analyze_ornaments(audio, api_key)}")

# Full analysis
print(f"Full Analysis:\n{analyze_music_full(audio, api_key)}")

Change Log
==========

0.0.1 (26/03/2025)
-------------------
- First Release

===========

0.0.2 (27/03/2025)
-------------------
- Fixed missing module files in package

0.0.3 (27/03/2025)
-------------------
- Fixed ornaments detection file

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bhargava_swara-0.0.3.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bhargava_swara-0.0.3-py3-none-any.whl (9.6 kB view details)

Uploaded Python 3

File details

Details for the file bhargava_swara-0.0.3.tar.gz.

File metadata

  • Download URL: bhargava_swara-0.0.3.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.0

File hashes

Hashes for bhargava_swara-0.0.3.tar.gz
Algorithm Hash digest
SHA256 80162a9399b71ee87108736fa99611dfee359ac58d1009576bdbfadb053c0105
MD5 9b74bbe33bfb8c94b5023c3fcfaf4cf3
BLAKE2b-256 f7dacdd4aa158553cd9fa671257e341e5f36e72565677bbfceb7838173361da2

See more details on using hashes here.

File details

Details for the file bhargava_swara-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: bhargava_swara-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 9.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.0

File hashes

Hashes for bhargava_swara-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 3338c72ddf32d98d995a4a289e40af4c77d9992108cd4719b99222c116386178
MD5 80ab17424e0da573d323ba94f084159a
BLAKE2b-256 9212045b9926c5f515a81a8da0a96ea8e52f2bc8f3c539fa8c997b0bb4d61acd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page