Weird converter
🔀 Strange combinations converter like from Audio to Image and Image to Audio
Installation
Install client via pip. Ideally, weird-converter is well supported for Python >= 3.7.
pip3 install weird-converter
Usage
Just run it like this:
weird_converter.audio_to_image('audio.wav') # It only supports wav files, for now.
weird_converter.image_to_audio('image.jpg')
Future development
- 🎶 Support other input audio types.
- 📹 Implement audio to video conversion (and the same other way around).
- ⭐️ Implement custom transformations for getting different results.
Motivation
I know this tool is kind of strange and probably not very useful. However, I wanted to play with numpy and try to understand in a deeper way the amount of stuff that this library can do. That's why I ended up doing this project where I see a lot of progression with different future tweakments (as it is specified above).
Results
Audio to image
Image generation comes from a normalization of the audio values. The image will have higher dimensions as more information the audio has, like audio length or channels available.
From this fanfare audio to this image:
Or from this empty audio, representing a silence, to this image:
Image to Audio
Audio generation comes from a normalization to a 44,100 samples per second audio. The output length will be higher depending on the dimensions of the input image. As you could check, the results look very similar to an helicopter sound but it differs depending on the given image.
To this audio, where it's clear when the audio is playing the black background and the building pixels.
To this near empty audio and very uniform.
Development
Recommendations
Usage of virtualenv is recommended for package library / runtime isolation.
Installation
-
Setup virtual environment
-
Install dependencies
pip3 install -r requirements.lock
- Install locally
pip3 install .
Contributing
Suggestions, improvements, and enhancements are always welcome! If you have any issues, please do raise one in the Issues section. If you have an improvement, do file an issue to discuss the suggestion before creating a PR.
All ideas – no matter how outrageous – welcome!
Authors
License
Apache-2.0 © weird-converter
Metadata
Release files for weird-converter 0.2
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 |
|---|---|---|---|---|
| weird-converter-0.2.tar.gz | 4.7 kB | Without provenance | Details for weird-converter-0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| weird_converter-0.2-py3-none-any.whl | Python 3 | none | any | Details for weird_converter-0.2-py3-none-any.whl |
Total release size: 12.7 kB
Release files / weird-converter-0.2.tar.gz
| Download URL | weird-converter-0.2.tar.gz |
|---|---|
| Size | 4.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8d0a71c324ac466a883cd9362df0f77ecd4c6019ee054093c019e64dbf0b0a46
|
|
BLAKE2b-256 checksum How to use checksums |
c4731c047c8d1687282dabbd3146939f814f7434554090b28cbddfb2a529fbf5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.3
|
Release files / weird_converter-0.2-py3-none-any.whl
| Download URL | weird_converter-0.2-py3-none-any.whl |
|---|---|
| Size | 8.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
209a987fcb7cebe6f1395e8e880b4e037151eb5414e10f6f4e94cc1980f3722f
|
|
BLAKE2b-256 checksum How to use checksums |
60e18debbefea6224dcc68b66efbf4a6984262bed875e91d93ae7e58a676d43b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.3
|
Security for weird-converter 0.2
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.