Skip to content

A Python wrapper for the Analysis & Resynthesis Sound Spectrograph (ARSS)

License

Notifications You must be signed in to change notification settings

TheoCoombes/pyARSS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pyARSS

A Python wrapper for the Analysis & Resynthesis Sound Spectrograph (ARSS)

  • You can learn more about ARSS here.

Requirements

pip install -r requirements.txt

If you are using MacOS, you will need to install ARSS manually - Download link.

  • If you initally encounter issues, try restarting your mac. If this persists, submit an issue on GitHub.

Usage

import pyARSS

# Encode 'inp.wav' into the image 'out.bmp'.
pyARSS.Encode("inp.wav", "out.bmp")

# You can then use this image for many different use cases, such as machine learning.

# Decode 'out.bmp' back into an audio file.
pyARSS.Decode("out.bmp", "new.wav")

pyARSS also supports custom audio file types, such as MP3:

pyARSS.Encode("inp.mp3", "out.bmp")

Reference

pyARSS.Encode(
    "/path/to/input.wav",
    "/path/to/output.bmp",
    min_frequency = 25, # 25 Hz; the minimum frequency until the data is discarded
    max_frequency = 20000, # 20,000 Hz; the maximum frequency until the data is discarded
    pps = 100, # Time resolution; pixels per second (PPS)
    bpo = 48   # Frequency resolution; bands per octave (BPO)
)

pyARSS.Decode(
    "/path/to/input.bmp",
    "/path/to/output.wav",
    min_frequency = 25, # 25 Hz; the minimum frequency until the data is discarded
    max_frequency = 20000, # 20,000 Hz; the maximum frequency until the data is discarded ***
    sample_rate = 44100, # The sample rate for the output audio file
    sine = True, # The synthesis method; sine is much faster whereas noise (sine=False) is more detailed, however, takes much longer to compute.
    pps = 100, # Time resolution; pixels per second (PPS)
    bpo = 48   # Frequency resolution; bands per octave (BPO)
)

# *** pyARSS.Decode.max_frequency is discarded as there is a parameter limit on ARSS's executable.

Licence

This repository is licenced under the MIT licence.

About

A Python wrapper for the Analysis & Resynthesis Sound Spectrograph (ARSS)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages