mirror of
https://github.com/fergalmoran/dss.git
synced 2025-12-30 05:28:20 +00:00
Various file system re-organisation
This commit is contained in:
15
spa/management/commands/create_waveforms.py
Normal file
15
spa/management/commands/create_waveforms.py
Normal file
@@ -0,0 +1,15 @@
|
||||
from django.core.management.base import NoArgsCommand
|
||||
import timeside
|
||||
|
||||
|
||||
class Command(NoArgsCommand):
|
||||
def handle_noargs(self, **options):
|
||||
try:
|
||||
audio_file = '/home/fergalm/Dropbox/Private/deepsouthsounds.com/working/sample.mp3'
|
||||
decoder = timeside.decoder.FileDecoder(audio_file)
|
||||
grapher = timeside.grapher.Spectrogram(width=1920, height=1080)
|
||||
(decoder | grapher).run()
|
||||
grapher.render('d:\spectrogram.png')
|
||||
|
||||
except Exception, ex:
|
||||
print "Debug exception: %s" % ex.message
|
||||
Reference in New Issue
Block a user