Giter VIP home page Giter VIP logo

fraugdib / audio-plot-lib Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hassaku/audio-plot-lib

0.0 0.0 0.0 10.88 MB

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.

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

License: MIT License

Python 70.62% Jupyter Notebook 29.38%

audio-plot-lib's Introduction

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

audio-plot-lib's People

Contributors

hassaku avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.