Spaces:
Build error
Build error
debug shenenigans
Browse files
app.py
CHANGED
|
@@ -35,8 +35,8 @@ 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)
|
| 39 |
-
source
|
| 40 |
|
| 41 |
if audio:
|
| 42 |
source, sr = torchaudio.load(audio)
|
|
@@ -72,8 +72,8 @@ demo = gradio.Interface(
|
|
| 72 |
|
| 73 |
( * up to Kiriko and without Bastion. Please forgive. )
|
| 74 |
"""),
|
| 75 |
-
gradio.Audio(
|
| 76 |
-
gradio.Audio(label="Input Audio", type="filepath"),
|
| 77 |
gradio.Dropdown(label="Target Voice", choices=["Ana", "Ashe", "Baptiste", "Brigitte", "Cassidy", "Doomfist", "D.Va", "Echo", "Genji", "Hanzo", "Junker Queen", "Junkrat", "Kiriko", "Lúcio", "Mei", "Mercy", "Moira", "Orisa", "Pharah", "Reaper", "Reinhardt", "Roadhog", "Sigma", "Sojourn", "Soldier_ 76", "Sombra", "Symmetra", "Torbjörn", "Tracer", "Widowmaker", "Winston", "Zarya", "Zenyatta"], type="index", value="Ana"),
|
| 78 |
gradio.Slider(label="Pitch Shift Input (+12 = up one octave, ⚠️ broken AF ⚠️)", minimum=-12.0, maximum=12.0, value=0, step=1),
|
| 79 |
gradio.Slider(label="Length Factor (higher = slower speech)", minimum=0.1, maximum=2.0, value=1.0),
|
|
|
|
| 35 |
|
| 36 |
if mic_audio:
|
| 37 |
sr, source = mic_audio
|
| 38 |
+
source = torch.Tensor(source).T
|
| 39 |
+
print(source.shape)
|
| 40 |
|
| 41 |
if audio:
|
| 42 |
source, sr = torchaudio.load(audio)
|
|
|
|
| 72 |
|
| 73 |
( * up to Kiriko and without Bastion. Please forgive. )
|
| 74 |
"""),
|
| 75 |
+
gradio.Audio(label="Record Input Audio", source="microphone"),
|
| 76 |
+
gradio.Audio(label="Upload Input Audio", type="filepath"),
|
| 77 |
gradio.Dropdown(label="Target Voice", choices=["Ana", "Ashe", "Baptiste", "Brigitte", "Cassidy", "Doomfist", "D.Va", "Echo", "Genji", "Hanzo", "Junker Queen", "Junkrat", "Kiriko", "Lúcio", "Mei", "Mercy", "Moira", "Orisa", "Pharah", "Reaper", "Reinhardt", "Roadhog", "Sigma", "Sojourn", "Soldier_ 76", "Sombra", "Symmetra", "Torbjörn", "Tracer", "Widowmaker", "Winston", "Zarya", "Zenyatta"], type="index", value="Ana"),
|
| 78 |
gradio.Slider(label="Pitch Shift Input (+12 = up one octave, ⚠️ broken AF ⚠️)", minimum=-12.0, maximum=12.0, value=0, step=1),
|
| 79 |
gradio.Slider(label="Length Factor (higher = slower speech)", minimum=0.1, maximum=2.0, value=1.0),
|