Shabda
Shabda is a tool to fetch random samples from https://freesound.org/ based on given words or to generate Text-to-Speech samples for use in impro sessions on instruments such as Tidal Cycles, Estuary or Strudel.
Shabda is the Sanskrit word for "speech sound". In Sanskrit grammar, the term refers to an utterance in the sense of linguistic performance.
Install
- Install Python 3: https://www.python.org/
- Install pip: https://pypi.org/project/pip/
- Install ffmpeg: https://ffmpeg.org/ (e.g. Debian/Ubuntu:
apt install ffmpeg) - Install Shabda for standard usage:
pip install shabdaor - Install shabda for hacking:
- Install poetry: https://python-poetry.org/docs/#installation
- In Shabda repository, install dependencies:
poetry install
Use (command line)
In order to download a sample pack, execute in the terminal shabda <definition> --licenses <license_name>.
Any word can be a pack definition. If you want more than one sample, separate words by a comma: blue,red
You can define how many variations of a sample to assemble by adding a colon and a number.
e.g. blue,red:3,yellow:2 will produce one 'blue' sample, three 'red' samples and two 'yellow' sample.
The optional --licenses parameter allows to fetch only samples that have the specified license. Multiple licenses can be allowed by repeating the --licenses argument. Possible licenses are cc0 (Creative Commons Zero), by (Creative Commons Attribution), and by-nc (Creative Commons Attribution Non-Commercial).
Full example:
shabda spaghetti:2,monster:4 --licenses cc0 --licenses by
The first time you execute this command, it will ask you for a Freesound token, that you will be redirected to. You will need a Freesound account.
By default, samples will be downloaded in a samples directory under the current working directory. You can override this by adding a config.ini file to the $HOME/.shabda/ directory, containing:
[shabda]
samples_path=/path/to/your/desired/samples/directory/
Use (web application)
Launch the web application:
In debug mode:
FLASK_APP=shabda FLASK_DEBUG=1 flask run
In production:
gunicorn --workers=4 "shabda:create_app()" -b localhost:8000
Test
poetry run pytest
Notes
With Estuary, Shabda makes use of this feature: https://github.com/dktr0/estuary/wiki#adding-sound-files-to-estuarywebdirt-on-the-fly
All command line examples must be preceded by poetry run if in hacking/development mode.
Roadmap
Metadata
Release files for shabda 0.2.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| shabda-0.2.2.1.tar.gz | 16.7 kB | Without provenance | Details for shabda-0.2.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| shabda-0.2.2.1-py3-none-any.whl | Python 3 | none | any | Details for shabda-0.2.2.1-py3-none-any.whl |
Total release size: 35.6 kB
Release files / shabda-0.2.2.1.tar.gz
| Download URL | shabda-0.2.2.1.tar.gz |
|---|---|
| Size | 16.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d9692c51cf2278481cd6a35d97b5ed00fe6e3be7fab77359818add8699acbcde
|
|
BLAKE2b-256 checksum How to use checksums |
3661aca461672db19a3ef4c9e95ce1d6cc13106159bc3f1c438e49e3151625b1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / shabda-0.2.2.1-py3-none-any.whl
| Download URL | shabda-0.2.2.1-py3-none-any.whl |
|---|---|
| Size | 18.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d5a8a3dbd298f13fd198a54a2c01cde06236b74d34ee70a7c27a554e45adff19
|
|
BLAKE2b-256 checksum How to use checksums |
3b129c214e986f754a3db26af4c3189a51383e10dc539d19fabe2b24405c0f6f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Security for shabda 0.2.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.