Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -105,6 +105,16 @@ def process_fn(inp_audio, option_text):
|
|
| 105 |
if option_text == "Generate Watermark":
|
| 106 |
with torch.no_grad():
|
| 107 |
wm_sig = embed(sig.clone(), generator).normalize(orig_loud).ensure_max_of_audio()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 108 |
return save_audio(wm_sig), output_labels
|
| 109 |
else:
|
| 110 |
with torch.no_grad():
|
|
|
|
| 105 |
if option_text == "Generate Watermark":
|
| 106 |
with torch.no_grad():
|
| 107 |
wm_sig = embed(sig.clone(), generator).normalize(orig_loud).ensure_max_of_audio()
|
| 108 |
+
output_labels.labels.append(
|
| 109 |
+
AudioLabel(
|
| 110 |
+
t = 0,
|
| 111 |
+
label = "watermark: 1.0",
|
| 112 |
+
duration = wm_sig.duration,
|
| 113 |
+
description = f"watermark confidence: 1.0, start: 0.0s, end: {wm_sig.duration:.2f}s",
|
| 114 |
+
color = OutputLabel.rgb_color_to_int(255, 0, 0),
|
| 115 |
+
amplitude = 1.0
|
| 116 |
+
)
|
| 117 |
+
)
|
| 118 |
return save_audio(wm_sig), output_labels
|
| 119 |
else:
|
| 120 |
with torch.no_grad():
|