Skip to main content

Turn text into music. Hackathon using ElevenLabs

Project description

beatscore

A small libary that converts structured text into short music clips by mapping properties of the input (intensity, repetition, pace, tone, coherence) into promptable audio generation using the ElevenLabs Music API

The goal is to experiment how differences in source material can be perceptible in sound.

Example

  • Opinionated text → more forceful, higher energy
  • Neutral news → more structured, calmer
  • Fragmented text → faster, less predictable

API

run_digest(sources, source_type, output_dir)

where:

  • sources: a dictionary of articles, feeds, or any text.
  • source_type: one of 'news' or 'speech'. News expects sources to be a dictionary of rss feeds.
  • output_dir: the location for generated files

News RSS Example:

from beatscore import run_digest

sources = {
    "reuters": "http://feeds.reuters.com/reuters/topNews",
    "bbc": "http://feeds.bbci.co.uk/news/rss.xml",
    "nyt": "https://rss.nytimes.com/services/xml/rss/nyt/HomePage.xml",
    "rollingStone": "https://www.rollingstone.com/feed/"
    }


run_digest(sources, "news", output_dir="./output")

Speech example:

from beatscore import run_digest

sources = {
    "mlk_dream": "https://kr.usembassy.gov/martin-luther-king-jr-dream-speech-1963/", #https://www.americanrhetoric.com/speeches/mlkihaveadream.htm",
    "gettysburg": "https://www.abrahamlincolnonline.org/lincoln/speeches/gettysburg.htm",
    "churchill_beaches": "https://winstonchurchill.org/resources/speeches/1940-the-finest-hour/we-shall-fight-on-the-beaches/",
    }


run_digest(sources, "speech", output_dir="./output")

Setup

You'll need three API keys:

  • ELEVENLABS_API_KEY — for music generation
  • HF_TOKEN — for embeddings and emotion models
  • ANTHROPIC_API_KEY — for prompt engineering with Claude

Set them as environment variables or pass directly to functions.

Installation

Install latest from the GitHub repository:

$ pip install git+https://github.com/funkstop/beatscore.git

or from pypi

$ pip install beatscore

Documentation

Documentation can be found hosted on this GitHub repository's pages. Additionally you can find package manager specific guidelines on pypi.

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

beatscore-0.0.1.tar.gz (15.6 kB view details)

Uploaded Source

Built Distribution

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

beatscore-0.0.1-py3-none-any.whl (15.8 kB view details)

Uploaded Python 3

File details

Details for the file beatscore-0.0.1.tar.gz.

File metadata

  • Download URL: beatscore-0.0.1.tar.gz
  • Upload date:
  • Size: 15.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for beatscore-0.0.1.tar.gz
Algorithm Hash digest
SHA256 522e9da816d97a9694e6dcdb9482e717203ee7c112eada436b72c783c137b657
MD5 eccf790ad35614084fd7cedc1fb1b32a
BLAKE2b-256 77ae4215fb3ce5f69161b036a183eff9f8bf0f88bde3390cf893d420b6617e4b

See more details on using hashes here.

File details

Details for the file beatscore-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: beatscore-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 15.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for beatscore-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a625568ea0efb0bfe074ce50104b4013de5cd7e58de694de26a2260df21ba45a
MD5 89bdf299bfb9267efe8e2572a5240637
BLAKE2b-256 a951617e0a32f28df7a5179071f1dc24e7122ebcffa9a3628c092676dd91420e

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