mirror of
https://github.com/fergalmoran/dss.api.git
synced 2025-12-22 09:18:13 +00:00
15 lines
555 B
Python
15 lines
555 B
Python
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 as ex:
|
|
print("Debug exception: %s" % ex) |