Pendrokar commited on
Commit
bd8f4e0
β€’
1 Parent(s): 7045bfd

ndarray serialization fix

Browse files
resources/app/python/xvapitch/model.py CHANGED
@@ -753,6 +753,13 @@ class xVAPitch(object):
753
  em_sad_pred.squeeze().cpu().detach().numpy() if em_sad_pred is not None else [],
754
  em_surprise_pred.squeeze().cpu().detach().numpy() if em_surprise_pred is not None else [],
755
  ]
 
 
 
 
 
 
 
756
 
757
  del pitch_pred, dur_pred, energy_pred, text, sequence
758
  return {
 
753
  em_sad_pred.squeeze().cpu().detach().numpy() if em_sad_pred is not None else [],
754
  em_surprise_pred.squeeze().cpu().detach().numpy() if em_surprise_pred is not None else [],
755
  ]
756
+ pitch = [float(v) for v in pitch]
757
+ durations = [float(v) for v in durations]
758
+ energy = [float(v) for v in energy]
759
+ em_angry = [float(v) for v in em_angry]
760
+ em_happy = [float(v) for v in em_happy]
761
+ em_sad = [float(v) for v in em_sad]
762
+ em_surprise = [float(v) for v in em_surprise]
763
 
764
  del pitch_pred, dur_pred, energy_pred, text, sequence
765
  return {