Update __init__.py

This commit is contained in:
David Marx
2024-01-01 15:19:25 -08:00
committed by GitHub
parent d4094d33e2
commit c56f080ac2
+23
View File
@@ -1 +1,24 @@
from .audio_operator_nodes import NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS
import librosa
CATEGORY="AudioReactive"
def read_audio_file(signal_fpath) -> dict:
y, sr = librosa.load(signal_fpath)
return {"y":y, "sr":sr} # i.e. a `SIGNAL`
class ARReadAudio:
CATEGORY=CATEGORY
RETURN_TYPES = ("SIGNAL",)
FUNCTION = "main"
@classmethod
def INPUT_TYPES(cls):
outv = {
"required": {
"fpath": ("STRING",{"default":"audio.wav"}),
}
}
return outv