Loading repository data…
Loading repository data…
hassaku / repository
Python library to converts a line graph to sound and return an object that can be played in Jupyter notebook or Google Colab. Values are represented by pitches, and the timeline is represented by left and right pans. It was created to make data science fun for the visually impaired.
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
This library is already unmaintained. Please check the following new library that is in development.
https://github.com/hassaku/audio-plot-lib
Converts a line graph to sound and returns an object that can be played in Jupyter notebook or Google Colab.
Values are represented by pitches, and the timeline is represented by left and right pans.
It was created to make data science fun for the visually impaired.
ffmpeg library is needed to provide a descriptive guide to the graph.
No additional installation is required.
$ sudo apt-get install libavformat-dev libavfilter-dev libavdevice-dev ffmpeg
It's under investigation. If you know of any, please make a pull request. Thanks.
$ pip install audio-plot # !pip install audio-plot for Colab or Notebook
See and run demo notebook also.
y = np.sin(np.arange(0, np.pi*2, 0.1))
yy = np.array([y, -y]).T
plot(yy) # audio control will be appeared on notebook.
[The audio is as follows for this example]
tts > minimum value is -1.0
(Low sinusoidal sound)
tts > maximum value is 1.0
(High sinusoidal sound)
tts > line 1
(Sound in response to changes in the line 1 graph)
tts > line 2
(Sound in response to changes in the line 2 graph)
If using Jupyter Notebook with a screen reader is inconvenient for you, you may want to consider using the following NVDA add-on.
https://github.com/mltony/nvda-browser-nav
from pydub.playback import play
# generate graph sound
audio = audio_plot.plot(two_inverted_sin)
# play
play(audio)
# save to audio file
audio.export("graph.wav", format="wav")
$ nosetests -vs
$ 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.egg-info dist # if necessary
$ python setup.py sdist
$ twine upload --repository pypi dist/*
$ pip --no-cache-dir install --upgrade audio-plot
MIT