Skip to content
/ palette Public

Miscellaneous scripts for generating and manipulating digital images, audio, and other content.

Notifications You must be signed in to change notification settings

ah-cog/palette

Repository files navigation

Factory

I use these scripts to generate automatic scratchers of the emergent itch.

Projects

Listed in order from most to least recent.

Dependencies

Colorspace_Discrete.py and Swimming_In_Colorspace.py depend on scikit-image. I got up and running quickly with the help of Emmanuelle Gouillart's image processing tutorial on Scipy Lecture Notes.

Pitch_Classifier.py detects the pitch and pitch duration, stores the start time of detected pitch, and records the confidence of each detection. It depends on Aubio for pitch level and duration extraction and MIDO for synthesizing MIDI files.

Pitch_To_MIDI.py generates a MIDI file (.mid) for the text file of pitches, etc. produced by Pitch_Classifier.py.

Usage example:

python Pitch_To_MIDI.py ./Content/minsky/clips/44.wav

MIDI_to_Sheet_Music.py generates the printable sheet music from a given MIDI file (.mid). The script depends on the Abjad Python library to generate the music notation and the LilyPond LaTeX package to generate the sheet music documents (.pdf).

Generate_Speech.py depends on pyttsx.

Monitor_Speech.py depends on: SpeechRecognition (GitHub).

It also depends on pyaudio. I used a workaround to install it described on StackExchange. As suggested by the post, I used the following command:

pip install --global-option='build_ext' --global-option='-I/usr/local/include' --global-option='-L/usr/local/lib' pyaudio
```

pyaudio depends on [PortAudio](http://portaudio.com/). Instructions for installing
it are [here](http://portaudio.com/docs/v19-doxydocs/compile_mac_coreaudio.html).

I configured multiple speech recognition services. These are PocketSphinx,
[Wit.ai](https://wit.ai/), [IBM Speech to Text](http://www.ibm.com/smarterplanet/us/en/ibmwatson/developercloud/speech-to-text.html).
Access tokens are required to use these services, with the exceptions of
PocketSphinx and Google. To obtain access tokens, sign up for the corresponding
service on its website.

Google can be used without access tokens because it offers a public service for
testing the functionality. Access tokens can be obtained to access more
functionality offered with the service.

Install PocketSphinx on macOS with `brew install cmu-pocketsphinx`.
PocketSphinx depends on [swig](http://macappstore.org/swig/).

# References

- [Marvin Minsky Stories](https://www.youtube.com/watch?v=xiUuQSCR4h8)

# Cool Tools

This is a curated list of the Factory's favorite tools.

- [Awesome Python](https://github.com/vinta/awesome-python): Curated list of Python frameworks, libraries, software, and resources.

About

Miscellaneous scripts for generating and manipulating digital images, audio, and other content.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published