Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -99,7 +99,7 @@ demo = gr.Interface(
|
|
| 99 |
fn=infer,
|
| 100 |
inputs=[
|
| 101 |
gr.Textbox(label="TCC (necessary)", value="a dog barks"),
|
| 102 |
-
gr.Textbox(label="TDC (optional, see format)", value="
|
| 103 |
gr.Textbox(label="Length (seconds, optional)", value="10.0"),
|
| 104 |
gr.Checkbox(label="Enable Time Control", value=False),
|
| 105 |
],
|
|
@@ -108,14 +108,37 @@ demo = gr.Interface(
|
|
| 108 |
gr.Textbox(label="Final TDC Used (input_onset)")
|
| 109 |
],
|
| 110 |
title="PicoAudio2 Online Inference",
|
| 111 |
-
description=
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 119 |
)
|
| 120 |
if __name__ == "__main__":
|
| 121 |
demo.launch()
|
|
|
|
| 99 |
fn=infer,
|
| 100 |
inputs=[
|
| 101 |
gr.Textbox(label="TCC (necessary)", value="a dog barks"),
|
| 102 |
+
gr.Textbox(label="TDC (optional, see format)", value="a dog barks(3.0-4.0, 6.0-7.0)"),
|
| 103 |
gr.Textbox(label="Length (seconds, optional)", value="10.0"),
|
| 104 |
gr.Checkbox(label="Enable Time Control", value=False),
|
| 105 |
],
|
|
|
|
| 108 |
gr.Textbox(label="Final TDC Used (input_onset)")
|
| 109 |
],
|
| 110 |
title="PicoAudio2 Online Inference",
|
| 111 |
+
description="""
|
| 112 |
+
## Definition
|
| 113 |
+
|
| 114 |
+
**TCC (Temporal Coarse Caption):**
|
| 115 |
+
A brief text description for the overall audio scene.
|
| 116 |
+
*Example*: `a dog barks`
|
| 117 |
+
|
| 118 |
+
**TDC (Temporal Detailed Caption):**
|
| 119 |
+
A **caption with timestamp information** for each event.
|
| 120 |
+
It allows precise temporal control over when events happen in the generated audio.
|
| 121 |
+
*Example*: `a dog barks(1.0-2.0, 3.0-4.0); a man speaks(5.0-6.0)`
|
| 122 |
+
|
| 123 |
+
---
|
| 124 |
+
|
| 125 |
+
## Input Requirements & Format
|
| 126 |
+
|
| 127 |
+
- **TCC** is **required** for audio generation.
|
| 128 |
+
- **TDC** is **optional**. If provided, it should follow the format: event1(start1-end1, start2-end2); event2(start1-end1, ...)
|
| 129 |
+
*Example*: a dog barks(1.0-2.0, 3.0-4.0); a man speaks(5.0-6.0)
|
| 130 |
+
- **Length** (in seconds) is optional, but recommended for temporal control.
|
| 131 |
+
- **Enable Time Control**: Tick to use TDC and length for precise event timing.
|
| 132 |
+
|
| 133 |
+
---
|
| 134 |
+
|
| 135 |
+
## Notes
|
| 136 |
+
|
| 137 |
+
- If TDC format is incorrect or length is missing, the model will generate audio **without precise temporal control**.
|
| 138 |
+
- For general audio generation, it is recommended to input '"random"' for TDC.
|
| 139 |
+
- You may leave TDC blank to let the LLM generate timestamps automatically (subject to API quota).
|
| 140 |
+
---
|
| 141 |
+
"""
|
| 142 |
)
|
| 143 |
if __name__ == "__main__":
|
| 144 |
demo.launch()
|