Skip to content

Latest commit

 

History

13 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spectogram engine

Converts WAV files to spectograms (.png) and the other way. Inspired by the ARSS

Features

  • Has color and brightness to depict the amplitude. (ARSS has only brightness)
  • Can convert from spectogram to WAV with minimum loss in quality. (ARSS loses a lot of data)

Installation

Use the package manager pip to install the dependencies.

pip install Specto

Usage

WAV to Spectogrm

from Specto import Turtle
# Loading the worker
turtle = Turtle(minMagnitude=0.004416916563059203,     # Minimum frequency
		maxMagnitude=2026134.8514368106,       # Maximum Frequency
		minPhase=-math.pi,
		maxPhase=math.pi)
				
rate, audData  =  scipy.io.wavfile.read(WAV_FILE_NAME) # Reading the Audio file
audData  =  audData.sum(axis=1) /  2                   # combining 2 channels to one
img = turtle.genGramForWav(audData)                    # Generating the img
img.save(OUTPUT_FILE_NAME, "PNG")                      # saving the img

Spectogram to WAV

from Specto import Turtle
# Loading the worker
turtle = Turtle(minMagnitude=0.004416916563059203,     # Minimum frequency
		maxMagnitude=2026134.8514368106,       # Maximum Frequency
		minPhase=-math.pi,
		maxPhase=math.pi)
				
rec  =  turtle.genWavForGram(WAV_FILE_NAME)            # Generating the WAV
scipy.io.wavfile.write(OUTPUT_FILE_NAME, 44100, rec)   # Saving the WAV file 

Roadmap

  • A simple UI
  • Use Numba to make it faster
  • Auto conversion from other audio formats to WAV.

About

Converts WAV files to spectograms and back to WAVs

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages