cjayic commited on
Commit
e1657ee
·
1 Parent(s): d9ca6f9

speculative mic fix

Browse files
Files changed (1) hide show
  1. app.py +8 -1
app.py CHANGED
@@ -35,7 +35,14 @@ def infer(md, mic_audio, audio, speaker_id, pitch_shift, length_scale, noise_sca
35
 
36
  if mic_audio:
37
  sr, source = mic_audio
38
- source = torch.Tensor(source).T
 
 
 
 
 
 
 
39
  print(source.shape)
40
 
41
  if audio:
 
35
 
36
  if mic_audio:
37
  sr, source = mic_audio
38
+
39
+ source = torch.Tensor(source)
40
+
41
+ if source.dim() == 1:
42
+ source.unsqueeze(1)
43
+
44
+ source = source.T
45
+
46
  print(source.shape)
47
 
48
  if audio: