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 generationHF_TOKEN— for embeddings and emotion modelsANTHROPIC_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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
522e9da816d97a9694e6dcdb9482e717203ee7c112eada436b72c783c137b657
|
|
| MD5 |
eccf790ad35614084fd7cedc1fb1b32a
|
|
| BLAKE2b-256 |
77ae4215fb3ce5f69161b036a183eff9f8bf0f88bde3390cf893d420b6617e4b
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a625568ea0efb0bfe074ce50104b4013de5cd7e58de694de26a2260df21ba45a
|
|
| MD5 |
89bdf299bfb9267efe8e2572a5240637
|
|
| BLAKE2b-256 |
a951617e0a32f28df7a5179071f1dc24e7122ebcffa9a3628c092676dd91420e
|