Kabatubare
commited on
Commit
•
7e842a3
1
Parent(s):
bf69504
Update app.py
Browse files
app.py
CHANGED
@@ -77,6 +77,17 @@ style = style_path.read_text()
|
|
77 |
with gr.Blocks(css=style) as demo:
|
78 |
with gr.Tab("Watermark Audio"):
|
79 |
with gr.Column(scale=6):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
80 |
audio_input_watermark = gr.Audio(label="Upload Audio File for Watermarking", type="filepath")
|
81 |
generate_message_button = gr.Button("Generate Unique Message")
|
82 |
unique_message_output = gr.Textbox(label="Unique Message", value="Press Generate")
|
@@ -88,6 +99,17 @@ with gr.Blocks(css=style) as demo:
|
|
88 |
|
89 |
with gr.Tab("Detect Watermark"):
|
90 |
with gr.Column(scale=6):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
91 |
audio_input_detect_watermark = gr.Audio(label="Upload Audio File for Watermark Detection", type="filepath")
|
92 |
original_hex_input = gr.Textbox(label="Original Hex Message for Comparison", placeholder="Enter the original hex message here")
|
93 |
detect_watermark_button = gr.Button("Detect Watermark")
|
|
|
77 |
with gr.Blocks(css=style) as demo:
|
78 |
with gr.Tab("Watermark Audio"):
|
79 |
with gr.Column(scale=6):
|
80 |
+
gr.Markdown("### How to Watermark Your Audio")
|
81 |
+
gr.Markdown("""
|
82 |
+
This tool allows you to embed a unique, invisible watermark into your audio files. Here's how it works:
|
83 |
+
|
84 |
+
- **Upload Audio File**: Select the audio file you want to protect.
|
85 |
+
- **Generate Unique Message**: Click this button to create a unique code that identifies the audio as yours.
|
86 |
+
- **Unique Message**: This is the unique code generated for your audio. It's used to create the watermark.
|
87 |
+
- **Apply Watermark**: Embed the unique code into your audio file. This step converts the code into a format (hexadecimal) that's embedded into the audio without altering its quality.
|
88 |
+
- **Watermarked Audio**: After the watermark is applied, you can download and listen to your watermarked audio here. It will sound just like the original, but now it has your unique watermark.
|
89 |
+
- **Message Used for Watermarking**: Shows the code that was embedded into your audio. The actual embedded code is a hexadecimal version of this message, which is a more secure representation.
|
90 |
+
""")
|
91 |
audio_input_watermark = gr.Audio(label="Upload Audio File for Watermarking", type="filepath")
|
92 |
generate_message_button = gr.Button("Generate Unique Message")
|
93 |
unique_message_output = gr.Textbox(label="Unique Message", value="Press Generate")
|
|
|
99 |
|
100 |
with gr.Tab("Detect Watermark"):
|
101 |
with gr.Column(scale=6):
|
102 |
+
gr.Markdown("### How to Detect a Watermark in Your Audio")
|
103 |
+
gr.Markdown("""
|
104 |
+
Use this tool to check if an audio file contains a specific watermark. Here's the process:
|
105 |
+
|
106 |
+
- **Upload Audio File**: Choose the audio file you suspect contains a watermark.
|
107 |
+
- **Original Hex Message for Comparison**: If you know the hexadecimal code of the watermark you're looking for, enter it here. This helps verify the specific watermark.
|
108 |
+
- **Detect Watermark**: Analyzes the audio to find any embedded watermarks.
|
109 |
+
- **Watermark Detection Result**: Indicates whether a watermark was found and its confidence level.
|
110 |
+
- **Detected Hex Message**: If a watermark is detected, this shows the found code in hexadecimal format.
|
111 |
+
- **Match Result**: Compares the detected hex code to the one you entered, indicating if they match or not. This confirms whether the detected watermark is the one you're looking for.
|
112 |
+
""")
|
113 |
audio_input_detect_watermark = gr.Audio(label="Upload Audio File for Watermark Detection", type="filepath")
|
114 |
original_hex_input = gr.Textbox(label="Original Hex Message for Comparison", placeholder="Enter the original hex message here")
|
115 |
detect_watermark_button = gr.Button("Detect Watermark")
|