Integrated smpl metadata reading

Now reads from command line and WavInfoReader interface.
This commit is contained in:
Jamie Hardt
2024-11-24 13:24:00 -08:00
parent d8f57c8607
commit 83a44de492
4 changed files with 63 additions and 15 deletions

View File

@@ -6,12 +6,14 @@ from optparse import OptionParser
import sys
import json
from enum import Enum
from base64 import b64encode
class MyJSONEncoder(json.JSONEncoder):
def default(self, o):
if isinstance(o, Enum):
return o._name_
elif isinstance(o, bytes):
return b64encode(o).decode('ascii')
else:
return super().default(o)