Skip to main content

audio-plot-lib

Python package

This library provides graph sonification functions and has been developed for a project named "Data science and machine learning resources for screen reader users". Please refer to the project page for more details.

https://hassaku.github.io/DS-and-ML-with-screen-reader/

Use in Google Colab (recommended)

Try the following example.

Open In Colab

Use in script (option)

Interactive

Generate html with graphs that can be displayed interactively in a browser.

Dependency

$ pip install audio-plot-lib
$ pip install beautifulsoup4

Example

import audio_plot_lib as apl
# apl.interactive.set_language("ja")  # Option to change language. Default is "en"
apl.interactive.plot([0, 1, 2, 3, 2, 1, 0], script_name=__file__)

Open the html file with the same name as the script name in your browser, and if you find a button that reads 'push here to unmute graph', try moving the mouse cursor appropriately after pressing the button. If not, try reloading the page.

Playable

Generate an audio file with sonified graphs.

Dependency

$ sudo apt-get install libavformat-dev libavfilter-dev libavdevice-dev ffmpeg
$ pip install audio-plot-lib

Example

import audio_plot_lib as apl
from pydub.playback import play

# generate graph sound
audio = apl.playable.plot([0, 1, 2, 3, 2, 1, 0], duration=300, autoplay=False)

# play
play(audio)

# save to audio file
audio.export("graph.wav", format="wav")

For contributer

Update PyPI

$ python -m unittest discover tests
$ pip install twine # if necessary
$ cat ~/.pypirc  # if necessary
[distutils]
index-servers = pypi

[pypi]
repository: https://upload.pypi.org/legacy/
username: YOUR_USERNAME
password: YOUR_PASSWORD
$ rm -rf audio-plot-lib.egg-info dist # if necessary
$ python setup.py sdist
$ twine upload --repository pypi dist/*
$ pip --no-cache-dir install --upgrade audio-plot-lib

https://pypi.org/project/audio-plot-lib/

Contributing

  • Fork the repository on Github
  • Create a named feature branch (like add_component_x)
  • Write your change
  • Write tests for your change (if applicable)
  • Run the tests, ensuring they all pass
  • Submit a Pull Request using Github

License

MIT

Metadata

Release files for audio-plot-lib 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for audio-plot-lib 0.1.2
File Size Uploaded
audio-plot-lib-0.1.2.tar.gz 10.3 kB Details

Release files / audio-plot-lib-0.1.2.tar.gz

Download URL audio-plot-lib-0.1.2.tar.gz
Size 10.3 kB
Tags Source
SHA-256 checksum
How to use checksums
0cafbfcda78fa1662d4e9548b9f1fbae189c971d78600054af079532157811e6
BLAKE2b-256 checksum
How to use checksums
b134fd096657bd35dcf13a27daeb40367253e9ae9e632e37ac6eb883bd3b153a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.5

Release history Release notifications | RSS feed

This release

0.1.2 This release

1 release file

0.1.1

1 release file

0.1.0

1 release file

0.0.11

1 release file

0.0.10

1 release file

0.0.9

1 release file

0.0.8

1 release file

0.0.7

1 release file

0.0.6

1 release file

0.0.5

1 release file

0.0.4

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page