Spaces:
Build error
Build error
speculative mic fix
Browse files
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 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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:
|