dawood HF staff commited on
Commit
ce632d0
1 Parent(s): 48e4267

Upload folder using huggingface_hub

Browse files
Dockerfile CHANGED
@@ -13,4 +13,4 @@ RUN pip install --no-cache-dir -r requirements.txt
13
 
14
  ENV PYTHONUNBUFFERED=1 GRADIO_ALLOW_FLAGGING=never GRADIO_NUM_PORTS=1 GRADIO_SERVER_NAME=0.0.0.0 GRADIO_SERVER_PORT=7860 SYSTEM=spaces
15
 
16
- CMD ["python", "space.py"]
 
13
 
14
  ENV PYTHONUNBUFFERED=1 GRADIO_ALLOW_FLAGGING=never GRADIO_NUM_PORTS=1 GRADIO_SERVER_NAME=0.0.0.0 GRADIO_SERVER_PORT=7860 SYSTEM=spaces
15
 
16
+ CMD ["python", "app.py"]
README.md CHANGED
@@ -2,8 +2,8 @@
2
  ---
3
  tags: [gradio-custom-component,machine learning,reproducibility,visualization,gradio,gradio-template-Audio]
4
  title: gradio_unifiedaudio V0.0.2
5
- colorFrom: green
6
- colorTo: yellow
7
  sdk: docker
8
  pinned: false
9
  license: apache-2.0
 
2
  ---
3
  tags: [gradio-custom-component,machine learning,reproducibility,visualization,gradio,gradio-template-Audio]
4
  title: gradio_unifiedaudio V0.0.2
5
+ colorFrom: indigo
6
+ colorTo: red
7
  sdk: docker
8
  pinned: false
9
  license: apache-2.0
app.py CHANGED
@@ -8,16 +8,15 @@ example = UnifiedAudio().example_inputs()
8
  dir_ = Path(__file__).parent
9
 
10
  def test_mic(audio):
11
- return UnifiedAudio(value=audio)
 
 
 
12
 
13
  with gr.Blocks() as demo:
14
- gr.Markdown("## Example without Image")
15
  mic = UnifiedAudio(sources="microphone")
16
  mic.change(test_mic, mic, mic)
17
-
18
- gr.Markdown("## Example with Image")
19
- mic_image = UnifiedAudio(sources="microphone", image="freeman.jpg")
20
- mic_image.change(test_mic, mic_image, mic_image)
21
 
22
  if __name__ == '__main__':
23
  demo.launch()
 
8
  dir_ = Path(__file__).parent
9
 
10
  def test_mic(audio):
11
+ return UnifiedAudio(value=audio, image="demo/freeman.jpg")
12
+
13
+ def clear(audio):
14
+ return UnifiedAudio(value=None)
15
 
16
  with gr.Blocks() as demo:
 
17
  mic = UnifiedAudio(sources="microphone")
18
  mic.change(test_mic, mic, mic)
19
+ mic.end(clear, mic, mic)
 
 
 
20
 
21
  if __name__ == '__main__':
22
  demo.launch()
requirements.txt CHANGED
@@ -1 +1 @@
1
- gradio_unifiedaudio==0.0.2
 
1
+ gradio_unifiedaudio-0.0.2-py3-none-any.whl
src/.DS_Store CHANGED
Binary files a/src/.DS_Store and b/src/.DS_Store differ
 
src/backend/.DS_Store ADDED
Binary file (6.15 kB). View file
 
src/backend/gradio_unifiedaudio/templates/component/index-fdcab7e8.js ADDED
The diff for this file is too large to render. See raw diff
 
src/backend/gradio_unifiedaudio/templates/component/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { E as s, a as t, A as i, S as o, I as r } from "./index-c48f56d2.js";
2
  export {
3
  s as BaseExample,
4
  t as BaseInteractiveAudio,
 
1
+ import { E as s, a as t, A as i, S as o, I as r } from "./index-fdcab7e8.js";
2
  export {
3
  s as BaseExample,
4
  t as BaseInteractiveAudio,
src/backend/gradio_unifiedaudio/templates/component/module-d647edd9.js ADDED
The diff for this file is too large to render. See raw diff
 
src/backend/gradio_unifiedaudio/templates/component/style.css CHANGED
@@ -1 +1 @@
1
- .block.svelte-1t38q2d{position:relative;margin:0;box-shadow:var(--block-shadow);border-width:var(--block-border-width);border-color:var(--block-border-color);border-radius:var(--block-radius);background:var(--block-background-fill);width:100%;line-height:var(--line-sm)}.block.border_focus.svelte-1t38q2d{border-color:var(--color-accent)}.padded.svelte-1t38q2d{padding:var(--block-padding)}.hidden.svelte-1t38q2d{display:none}.hide-container.svelte-1t38q2d{margin:0;box-shadow:none;--block-border-width:0;background:transparent;padding:0;overflow:visible}div.svelte-1hnfib2{margin-bottom:var(--spacing-lg);color:var(--block-info-text-color);font-weight:var(--block-info-text-weight);font-size:var(--block-info-text-size);line-height:var(--line-sm)}span.has-info.svelte-22c38v{margin-bottom:var(--spacing-xs)}span.svelte-22c38v:not(.has-info){margin-bottom:var(--spacing-lg)}span.svelte-22c38v{display:inline-block;position:relative;z-index:var(--layer-4);border:solid var(--block-title-border-width) var(--block-title-border-color);border-radius:var(--block-title-radius);background:var(--block-title-background-fill);padding:var(--block-title-padding);color:var(--block-title-text-color);font-weight:var(--block-title-text-weight);font-size:var(--block-title-text-size);line-height:var(--line-sm)}.hide.svelte-22c38v{margin:0;height:0}label.svelte-9gxdi0{display:inline-flex;align-items:center;z-index:var(--layer-2);box-shadow:var(--block-label-shadow);border:var(--block-label-border-width) solid var(--border-color-primary);border-top:none;border-left:none;border-radius:var(--block-label-radius);background:var(--block-label-background-fill);padding:var(--block-label-padding);pointer-events:none;color:var(--block-label-text-color);font-weight:var(--block-label-text-weight);font-size:var(--block-label-text-size);line-height:var(--line-sm)}.gr-group label.svelte-9gxdi0{border-top-left-radius:0}label.float.svelte-9gxdi0{position:absolute;top:var(--block-label-margin);left:var(--block-label-margin)}label.svelte-9gxdi0:not(.float){position:static;margin-top:var(--block-label-margin);margin-left:var(--block-label-margin)}.hide.svelte-9gxdi0{height:0}span.svelte-9gxdi0{opacity:.8;margin-right:var(--size-2);width:calc(var(--block-label-text-size) - 1px);height:calc(var(--block-label-text-size) - 1px)}.hide-label.svelte-9gxdi0{box-shadow:none;border-width:0;background:transparent;overflow:visible}button.svelte-xtz2g8{display:flex;justify-content:center;align-items:center;gap:1px;z-index:var(--layer-2);border-radius:var(--radius-sm);color:var(--block-label-text-color);border:1px solid transparent}.padded.svelte-xtz2g8{padding:2px;background:var(--background-fill-primary);box-shadow:var(--shadow-drop);border:1px solid var(--button-secondary-border-color)}button.svelte-xtz2g8:hover{cursor:pointer;color:var(--color-accent)}.padded.svelte-xtz2g8:hover{border:2px solid var(--button-secondary-border-color-hover);padding:1px;color:var(--block-label-text-color)}span.svelte-xtz2g8{padding:0 1px;font-size:10px}div.svelte-xtz2g8{padding:2px;display:flex;align-items:flex-end}.small.svelte-xtz2g8{width:14px;height:14px}.large.svelte-xtz2g8{width:22px;height:22px}.pending.svelte-xtz2g8{animation:svelte-xtz2g8-flash .5s infinite}@keyframes svelte-xtz2g8-flash{0%{opacity:.5}50%{opacity:1}to{opacity:.5}}.empty.svelte-3w3rth{display:flex;justify-content:center;align-items:center;margin-top:calc(0px - var(--size-6));height:var(--size-full)}.icon.svelte-3w3rth{opacity:.5;height:var(--size-5);color:var(--body-text-color)}.small.svelte-3w3rth{min-height:calc(var(--size-32) - 20px)}.large.svelte-3w3rth{min-height:calc(var(--size-64) - 20px)}.unpadded_box.svelte-3w3rth{margin-top:0}.small_parent.svelte-3w3rth{min-height:100%!important}.dropdown-arrow.svelte-145leq6{fill:currentColor}.wrap.svelte-kzcjhc{display:flex;flex-direction:column;justify-content:center;align-items:center;min-height:var(--size-60);color:var(--block-label-text-color);line-height:var(--line-md);height:100%;padding-top:var(--size-3)}.or.svelte-kzcjhc{color:var(--body-text-color-subdued);display:flex}.icon-wrap.svelte-kzcjhc{width:30px;margin-bottom:var(--spacing-lg)}@media (--screen-md){.wrap.svelte-kzcjhc{font-size:var(--text-lg)}}.hovered.svelte-kzcjhc{color:var(--color-accent)}div.svelte-1nba87b{border-top:1px solid transparent;display:flex;max-height:100%;justify-content:center;gap:var(--spacing-sm);height:auto;align-items:flex-end;box-shadow:var(--shadow-drop);padding:var(--spacing-xl) 0;color:var(--block-label-text-color);flex-shrink:0;width:95%}.show_border.svelte-1nba87b{border-top:1px solid var(--block-border-color);margin-top:var(--spacing-xxl)}.source-selection.svelte-lde7lt{display:flex;align-items:center;justify-content:center;border-top:1px solid var(--border-color-primary);width:95%;bottom:0;left:0;right:0;margin-left:auto;margin-right:auto;align-self:flex-end}.icon.svelte-lde7lt{width:22px;height:22px;margin:var(--spacing-lg) var(--spacing-xs);padding:var(--spacing-xs);color:var(--neutral-400);border-radius:var(--radius-md)}.selected.svelte-lde7lt{color:var(--color-accent)}.icon.svelte-lde7lt:hover,.icon.svelte-lde7lt:focus{color:var(--color-accent)}.settings-wrapper.svelte-1duohn5.svelte-1duohn5{display:flex;justify-self:self-end}.text-button.svelte-1duohn5.svelte-1duohn5{border:1px solid var(--neutral-400);border-radius:var(--radius-sm);font-weight:300;font-size:var(--size-3);text-align:center;color:var(--neutral-400);height:var(--size-5);font-weight:700;padding:0 5px;margin-left:5px}.text-button.svelte-1duohn5.svelte-1duohn5:hover,.text-button.svelte-1duohn5.svelte-1duohn5:focus{color:var(--color-accent);border-color:var(--color-accent)}.controls.svelte-1duohn5.svelte-1duohn5{display:grid;grid-template-columns:1fr 1fr 1fr;margin-top:5px;overflow:hidden;align-items:center}@media (max-width: 320px){.controls.svelte-1duohn5.svelte-1duohn5{display:flex;flex-wrap:wrap}.controls.svelte-1duohn5 .svelte-1duohn5{margin:var(--spacing-sm)}.controls.svelte-1duohn5 .text-button.svelte-1duohn5{margin-left:0}}.action.svelte-1duohn5.svelte-1duohn5{width:var(--size-5);color:var(--neutral-400);margin-left:var(--spacing-md)}.icon.svelte-1duohn5.svelte-1duohn5:hover,.icon.svelte-1duohn5.svelte-1duohn5:focus{color:var(--color-accent)}.play-pause-wrapper.svelte-1duohn5.svelte-1duohn5{display:flex;justify-self:center}.playback.svelte-1duohn5.svelte-1duohn5{border:1px solid var(--neutral-400);border-radius:var(--radius-sm);width:5.5ch;font-weight:300;font-size:var(--size-3);text-align:center;color:var(--neutral-400);height:var(--size-5);font-weight:700}.playback.svelte-1duohn5.svelte-1duohn5:hover{color:var(--color-accent);border-color:var(--color-accent)}.rewind.svelte-1duohn5.svelte-1duohn5,.skip.svelte-1duohn5.svelte-1duohn5{margin:0 10px;color:var(--neutral-400)}.play-pause-button.svelte-1duohn5.svelte-1duohn5{width:var(--size-8);display:flex;align-items:center;justify-content:center;color:var(--neutral-400);fill:var(--neutral-400)}.component-wrapper.svelte-1iry1ax{padding:var(--size-3)}.timestamps.svelte-1iry1ax{display:flex;justify-content:space-between;align-items:center;width:100%;padding:var(--size-1) 0}#time.svelte-1iry1ax,#duration.svelte-1iry1ax{color:var(--neutral-400)}#trim-duration.svelte-1iry1ax{color:var(--color-accent);margin-right:var(--spacing-sm)}.waveform-container.svelte-1iry1ax{display:flex;align-items:center;justify-content:center;width:var(--size-full)}#waveform.svelte-1iry1ax{width:100%;height:100%;position:relative}audio.svelte-34w466.svelte-34w466{display:none}.image-container.svelte-34w466.svelte-34w466{position:relative;width:350px;height:350px;margin:auto}.image-player.svelte-34w466.svelte-34w466{position:absolute;top:0;left:0;width:100%;height:100%;border-radius:50%;object-fit:cover}.play-icon.svelte-34w466.svelte-34w466,.pause-icon.svelte-34w466.svelte-34w466{position:absolute;top:50%;left:50%;width:75px;height:75px;transform:translate(-50%,-50%)}.pause-icon.svelte-34w466.svelte-34w466{opacity:0;transition:opacity .3s}.image-container.svelte-34w466:hover .pause-icon.svelte-34w466,.circle-container.svelte-34w466:hover .pause-icon.svelte-34w466{opacity:1}.circle-container.svelte-34w466:hover .waveform-bar.svelte-34w466{opacity:.5}.circle-container.svelte-34w466.svelte-34w466{width:350px;height:350px;margin:auto;border-radius:50%;border:3px solid white;position:relative;overflow:hidden;display:flex;align-items:center;justify-content:center}.waveform-bar.svelte-34w466.svelte-34w466{background-color:#fff;width:2%;height:20%;margin:0 1%;border-radius:5px;opacity:.5;transform-origin:bottom}.waveform-animation-0.svelte-34w466.svelte-34w466{animation:svelte-34w466-waveAnimation0 1s infinite ease-in-out;opacity:1}.waveform-animation-1.svelte-34w466.svelte-34w466{animation:svelte-34w466-waveAnimation1 1.5s infinite ease-in-out;opacity:1}.waveform-animation-2.svelte-34w466.svelte-34w466{animation:svelte-34w466-waveAnimation2 3s infinite ease-in-out;opacity:1}.waveform-animation-3.svelte-34w466.svelte-34w466{animation:svelte-34w466-waveAnimation3 2s infinite ease-in-out;opacity:1}.waveform-animation-4.svelte-34w466.svelte-34w466{animation:svelte-34w466-waveAnimation4 2.5s infinite ease-in-out;opacity:1}.waveform-animation-5.svelte-34w466.svelte-34w466{animation:svelte-34w466-waveAnimation5 3.5s infinite ease-in-out;opacity:1}@keyframes svelte-34w466-waveAnimation0{0%,to{height:50%}50%{height:15%}}@keyframes svelte-34w466-waveAnimation1{0%,to{height:45%}50%{height:25%}}@keyframes svelte-34w466-waveAnimation2{0%,to{height:40%}50%{height:60%}}@keyframes svelte-34w466-waveAnimation3{0%,to{height:70%}50%{height:25%}}@keyframes svelte-34w466-waveAnimation4{0%,to{height:25%}50%{height:70%}}@keyframes svelte-34w466-waveAnimation5{0%,to{height:60%}50%{height:15%}}button.svelte-a356bc{cursor:pointer;width:var(--size-full)}.hidden.svelte-a356bc{display:none;height:0;position:absolute}.center.svelte-a356bc{display:flex;justify-content:center}.flex.svelte-a356bc{display:flex;justify-content:center;align-items:center}input.svelte-a356bc{display:none}div.svelte-1wj0ocy{display:flex;top:var(--size-2);right:var(--size-2);justify-content:flex-end;gap:var(--spacing-sm);z-index:var(--layer-1)}.not-absolute.svelte-1wj0ocy{margin:var(--size-1)}.wrapper.svelte-g0zaxm{display:flex;justify-content:center;align-items:center;border-radius:50px}.microphone-icon.svelte-g0zaxm,.stop-icon.svelte-g0zaxm{display:flex;align-items:center;justify-content:center;height:100%}.record-button.svelte-g0zaxm{height:350px;width:350px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:white;border:6px solid rgb(0,140,255)}.stop-button.svelte-g0zaxm{height:350px;width:350px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:white;border:6px solid red}@keyframes svelte-g0zaxm-pulsate{0%{transform:scale(1)}50%{transform:scale(1.1)}to{transform:scale(1)}}.pulsate.svelte-g0zaxm{animation:svelte-g0zaxm-pulsate 1s infinite}.record-button.svelte-g0zaxm:disabled{cursor:not-allowed;opacity:.5}@keyframes svelte-g0zaxm-scaling{0%{background-color:var(--primary-600);scale:1}50%{background-color:var(--primary-600);scale:1.2}to{background-color:var(--primary-600);scale:1}}#microphone.svelte-1smaui2{width:100%;display:none}.component-wrapper.svelte-1smaui2{padding:var(--size-3)}.mic-wrap.svelte-1ho79kd{display:block;align-items:center;margin:var(--spacing-xl)}.stop-button-paused.svelte-1ho79kd{display:none;height:var(--size-8);width:var(--size-20);background-color:var(--block-background-fill);border-radius:var(--radius-3xl);align-items:center;border:1px solid var(--neutral-400);margin-right:5px}.stop-button-paused.svelte-1ho79kd:before{content:"";height:var(--size-4);width:var(--size-4);border-radius:var(--radius-full);background:var(--primary-600);margin:0 var(--spacing-xl)}.stop-button.svelte-1ho79kd:before{content:"";height:var(--size-4);width:var(--size-4);border-radius:var(--radius-full);background:var(--primary-600);margin:0 var(--spacing-xl);animation:scaling 1.8s infinite}.stop-button.svelte-1ho79kd{height:var(--size-8);width:var(--size-20);background-color:var(--block-background-fill);border-radius:var(--radius-3xl);align-items:center;border:1px solid var(--primary-600);margin-right:5px;display:flex}.record-button.svelte-1ho79kd:before{content:"";height:var(--size-4);width:var(--size-4);border-radius:var(--radius-full);background:var(--primary-600);margin:0 var(--spacing-xl)}.record-button.svelte-1ho79kd{height:var(--size-8);width:var(--size-24);background-color:var(--block-background-fill);border-radius:var(--radius-3xl);display:flex;align-items:center;border:1px solid var(--neutral-400)}svg.svelte-43sxxs.svelte-43sxxs{width:var(--size-20);height:var(--size-20)}svg.svelte-43sxxs path.svelte-43sxxs{fill:var(--loader-color)}div.svelte-43sxxs.svelte-43sxxs{z-index:var(--layer-2)}.margin.svelte-43sxxs.svelte-43sxxs{margin:var(--size-4)}.wrap.svelte-14miwb5.svelte-14miwb5{display:flex;flex-direction:column;justify-content:center;align-items:center;z-index:var(--layer-5);transition:opacity .1s ease-in-out;border-radius:var(--block-radius);background:var(--block-background-fill);padding:0 var(--size-6);max-height:var(--size-screen-h);overflow:hidden;pointer-events:none}.wrap.center.svelte-14miwb5.svelte-14miwb5{top:0;right:0;left:0}.wrap.default.svelte-14miwb5.svelte-14miwb5{top:0;right:0;bottom:0;left:0}.hide.svelte-14miwb5.svelte-14miwb5{opacity:0;pointer-events:none}.generating.svelte-14miwb5.svelte-14miwb5{animation:svelte-14miwb5-pulse 2s cubic-bezier(.4,0,.6,1) infinite;border:2px solid var(--color-accent);background:transparent}.translucent.svelte-14miwb5.svelte-14miwb5{background:none}@keyframes svelte-14miwb5-pulse{0%,to{opacity:1}50%{opacity:.5}}.loading.svelte-14miwb5.svelte-14miwb5{z-index:var(--layer-2);color:var(--body-text-color)}.eta-bar.svelte-14miwb5.svelte-14miwb5{position:absolute;top:0;right:0;bottom:0;left:0;transform-origin:left;opacity:.8;z-index:var(--layer-1);transition:10ms;background:var(--background-fill-secondary)}.progress-bar-wrap.svelte-14miwb5.svelte-14miwb5{border:1px solid var(--border-color-primary);background:var(--background-fill-primary);width:55.5%;height:var(--size-4)}.progress-bar.svelte-14miwb5.svelte-14miwb5{transform-origin:left;background-color:var(--loader-color);width:var(--size-full);height:var(--size-full)}.progress-level.svelte-14miwb5.svelte-14miwb5{display:flex;flex-direction:column;align-items:center;gap:1;z-index:var(--layer-2);width:var(--size-full)}.progress-level-inner.svelte-14miwb5.svelte-14miwb5{margin:var(--size-2) auto;color:var(--body-text-color);font-size:var(--text-sm);font-family:var(--font-mono)}.meta-text.svelte-14miwb5.svelte-14miwb5{position:absolute;top:0;right:0;z-index:var(--layer-2);padding:var(--size-1) var(--size-2);font-size:var(--text-sm);font-family:var(--font-mono)}.meta-text-center.svelte-14miwb5.svelte-14miwb5{display:flex;position:absolute;top:0;right:0;justify-content:center;align-items:center;transform:translateY(var(--size-6));z-index:var(--layer-2);padding:var(--size-1) var(--size-2);font-size:var(--text-sm);font-family:var(--font-mono);text-align:center}.error.svelte-14miwb5.svelte-14miwb5{box-shadow:var(--shadow-drop);border:solid 1px var(--error-border-color);border-radius:var(--radius-full);background:var(--error-background-fill);padding-right:var(--size-4);padding-left:var(--size-4);color:var(--error-text-color);font-weight:var(--weight-semibold);font-size:var(--text-lg);line-height:var(--line-lg);font-family:var(--font)}.minimal.svelte-14miwb5 .progress-text.svelte-14miwb5{background:var(--block-background-fill)}.border.svelte-14miwb5.svelte-14miwb5{border:1px solid var(--border-color-primary)}.toast-body.svelte-solcu7{display:flex;position:relative;right:0;left:0;align-items:center;margin:var(--size-6) var(--size-4);margin:auto;border-radius:var(--container-radius);overflow:hidden;pointer-events:auto}.toast-body.error.svelte-solcu7{border:1px solid var(--color-red-700);background:var(--color-red-50)}.dark .toast-body.error.svelte-solcu7{border:1px solid var(--color-red-500);background-color:var(--color-grey-950)}.toast-body.warning.svelte-solcu7{border:1px solid var(--color-yellow-700);background:var(--color-yellow-50)}.dark .toast-body.warning.svelte-solcu7{border:1px solid var(--color-yellow-500);background-color:var(--color-grey-950)}.toast-body.info.svelte-solcu7{border:1px solid var(--color-grey-700);background:var(--color-grey-50)}.dark .toast-body.info.svelte-solcu7{border:1px solid var(--color-grey-500);background-color:var(--color-grey-950)}.toast-title.svelte-solcu7{display:flex;align-items:center;font-weight:var(--weight-bold);font-size:var(--text-lg);line-height:var(--line-sm);text-transform:capitalize}.toast-title.error.svelte-solcu7{color:var(--color-red-700)}.dark .toast-title.error.svelte-solcu7{color:var(--color-red-50)}.toast-title.warning.svelte-solcu7{color:var(--color-yellow-700)}.dark .toast-title.warning.svelte-solcu7{color:var(--color-yellow-50)}.toast-title.info.svelte-solcu7{color:var(--color-grey-700)}.dark .toast-title.info.svelte-solcu7{color:var(--color-grey-50)}.toast-close.svelte-solcu7{margin:0 var(--size-3);border-radius:var(--size-3);padding:0px var(--size-1-5);font-size:var(--size-5);line-height:var(--size-5)}.toast-close.error.svelte-solcu7{color:var(--color-red-700)}.dark .toast-close.error.svelte-solcu7{color:var(--color-red-500)}.toast-close.warning.svelte-solcu7{color:var(--color-yellow-700)}.dark .toast-close.warning.svelte-solcu7{color:var(--color-yellow-500)}.toast-close.info.svelte-solcu7{color:var(--color-grey-700)}.dark .toast-close.info.svelte-solcu7{color:var(--color-grey-500)}.toast-text.svelte-solcu7{font-size:var(--text-lg)}.toast-text.error.svelte-solcu7{color:var(--color-red-700)}.dark .toast-text.error.svelte-solcu7{color:var(--color-red-50)}.toast-text.warning.svelte-solcu7{color:var(--color-yellow-700)}.dark .toast-text.warning.svelte-solcu7{color:var(--color-yellow-50)}.toast-text.info.svelte-solcu7{color:var(--color-grey-700)}.dark .toast-text.info.svelte-solcu7{color:var(--color-grey-50)}.toast-details.svelte-solcu7{margin:var(--size-3) var(--size-3) var(--size-3) 0;width:100%}.toast-icon.svelte-solcu7{display:flex;position:absolute;position:relative;flex-shrink:0;justify-content:center;align-items:center;margin:var(--size-2);border-radius:var(--radius-full);padding:var(--size-1);padding-left:calc(var(--size-1) - 1px);width:35px;height:35px}.toast-icon.error.svelte-solcu7{color:var(--color-red-700)}.dark .toast-icon.error.svelte-solcu7{color:var(--color-red-500)}.toast-icon.warning.svelte-solcu7{color:var(--color-yellow-700)}.dark .toast-icon.warning.svelte-solcu7{color:var(--color-yellow-500)}.toast-icon.info.svelte-solcu7{color:var(--color-grey-700)}.dark .toast-icon.info.svelte-solcu7{color:var(--color-grey-500)}@keyframes svelte-solcu7-countdown{0%{transform:scaleX(1)}to{transform:scaleX(0)}}.timer.svelte-solcu7{position:absolute;bottom:0;left:0;transform-origin:0 0;animation:svelte-solcu7-countdown 10s linear forwards;width:100%;height:var(--size-1)}.timer.error.svelte-solcu7{background:var(--color-red-700)}.dark .timer.error.svelte-solcu7{background:var(--color-red-500)}.timer.warning.svelte-solcu7{background:var(--color-yellow-700)}.dark .timer.warning.svelte-solcu7{background:var(--color-yellow-500)}.timer.info.svelte-solcu7{background:var(--color-grey-700)}.dark .timer.info.svelte-solcu7{background:var(--color-grey-500)}.toast-wrap.svelte-gatr8h{display:flex;position:fixed;top:var(--size-4);right:var(--size-4);flex-direction:column;align-items:end;gap:var(--size-2);z-index:var(--layer-top);width:calc(100% - var(--size-8))}@media (--screen-sm){.toast-wrap.svelte-gatr8h{width:calc(var(--size-96) + var(--size-10))}}.gallery.svelte-1gecy8w{padding:var(--size-1) var(--size-2)}
 
1
+ .block.svelte-1t38q2d{position:relative;margin:0;box-shadow:var(--block-shadow);border-width:var(--block-border-width);border-color:var(--block-border-color);border-radius:var(--block-radius);background:var(--block-background-fill);width:100%;line-height:var(--line-sm)}.block.border_focus.svelte-1t38q2d{border-color:var(--color-accent)}.padded.svelte-1t38q2d{padding:var(--block-padding)}.hidden.svelte-1t38q2d{display:none}.hide-container.svelte-1t38q2d{margin:0;box-shadow:none;--block-border-width:0;background:transparent;padding:0;overflow:visible}div.svelte-1hnfib2{margin-bottom:var(--spacing-lg);color:var(--block-info-text-color);font-weight:var(--block-info-text-weight);font-size:var(--block-info-text-size);line-height:var(--line-sm)}span.has-info.svelte-22c38v{margin-bottom:var(--spacing-xs)}span.svelte-22c38v:not(.has-info){margin-bottom:var(--spacing-lg)}span.svelte-22c38v{display:inline-block;position:relative;z-index:var(--layer-4);border:solid var(--block-title-border-width) var(--block-title-border-color);border-radius:var(--block-title-radius);background:var(--block-title-background-fill);padding:var(--block-title-padding);color:var(--block-title-text-color);font-weight:var(--block-title-text-weight);font-size:var(--block-title-text-size);line-height:var(--line-sm)}.hide.svelte-22c38v{margin:0;height:0}label.svelte-9gxdi0{display:inline-flex;align-items:center;z-index:var(--layer-2);box-shadow:var(--block-label-shadow);border:var(--block-label-border-width) solid var(--border-color-primary);border-top:none;border-left:none;border-radius:var(--block-label-radius);background:var(--block-label-background-fill);padding:var(--block-label-padding);pointer-events:none;color:var(--block-label-text-color);font-weight:var(--block-label-text-weight);font-size:var(--block-label-text-size);line-height:var(--line-sm)}.gr-group label.svelte-9gxdi0{border-top-left-radius:0}label.float.svelte-9gxdi0{position:absolute;top:var(--block-label-margin);left:var(--block-label-margin)}label.svelte-9gxdi0:not(.float){position:static;margin-top:var(--block-label-margin);margin-left:var(--block-label-margin)}.hide.svelte-9gxdi0{height:0}span.svelte-9gxdi0{opacity:.8;margin-right:var(--size-2);width:calc(var(--block-label-text-size) - 1px);height:calc(var(--block-label-text-size) - 1px)}.hide-label.svelte-9gxdi0{box-shadow:none;border-width:0;background:transparent;overflow:visible}button.svelte-xtz2g8{display:flex;justify-content:center;align-items:center;gap:1px;z-index:var(--layer-2);border-radius:var(--radius-sm);color:var(--block-label-text-color);border:1px solid transparent}.padded.svelte-xtz2g8{padding:2px;background:var(--background-fill-primary);box-shadow:var(--shadow-drop);border:1px solid var(--button-secondary-border-color)}button.svelte-xtz2g8:hover{cursor:pointer;color:var(--color-accent)}.padded.svelte-xtz2g8:hover{border:2px solid var(--button-secondary-border-color-hover);padding:1px;color:var(--block-label-text-color)}span.svelte-xtz2g8{padding:0 1px;font-size:10px}div.svelte-xtz2g8{padding:2px;display:flex;align-items:flex-end}.small.svelte-xtz2g8{width:14px;height:14px}.large.svelte-xtz2g8{width:22px;height:22px}.pending.svelte-xtz2g8{animation:svelte-xtz2g8-flash .5s infinite}@keyframes svelte-xtz2g8-flash{0%{opacity:.5}50%{opacity:1}to{opacity:.5}}.empty.svelte-3w3rth{display:flex;justify-content:center;align-items:center;margin-top:calc(0px - var(--size-6));height:var(--size-full)}.icon.svelte-3w3rth{opacity:.5;height:var(--size-5);color:var(--body-text-color)}.small.svelte-3w3rth{min-height:calc(var(--size-32) - 20px)}.large.svelte-3w3rth{min-height:calc(var(--size-64) - 20px)}.unpadded_box.svelte-3w3rth{margin-top:0}.small_parent.svelte-3w3rth{min-height:100%!important}.dropdown-arrow.svelte-145leq6{fill:currentColor}.wrap.svelte-kzcjhc{display:flex;flex-direction:column;justify-content:center;align-items:center;min-height:var(--size-60);color:var(--block-label-text-color);line-height:var(--line-md);height:100%;padding-top:var(--size-3)}.or.svelte-kzcjhc{color:var(--body-text-color-subdued);display:flex}.icon-wrap.svelte-kzcjhc{width:30px;margin-bottom:var(--spacing-lg)}@media (--screen-md){.wrap.svelte-kzcjhc{font-size:var(--text-lg)}}.hovered.svelte-kzcjhc{color:var(--color-accent)}div.svelte-1nba87b{border-top:1px solid transparent;display:flex;max-height:100%;justify-content:center;gap:var(--spacing-sm);height:auto;align-items:flex-end;box-shadow:var(--shadow-drop);padding:var(--spacing-xl) 0;color:var(--block-label-text-color);flex-shrink:0;width:95%}.show_border.svelte-1nba87b{border-top:1px solid var(--block-border-color);margin-top:var(--spacing-xxl)}.source-selection.svelte-lde7lt{display:flex;align-items:center;justify-content:center;border-top:1px solid var(--border-color-primary);width:95%;bottom:0;left:0;right:0;margin-left:auto;margin-right:auto;align-self:flex-end}.icon.svelte-lde7lt{width:22px;height:22px;margin:var(--spacing-lg) var(--spacing-xs);padding:var(--spacing-xs);color:var(--neutral-400);border-radius:var(--radius-md)}.selected.svelte-lde7lt{color:var(--color-accent)}.icon.svelte-lde7lt:hover,.icon.svelte-lde7lt:focus{color:var(--color-accent)}.settings-wrapper.svelte-1duohn5.svelte-1duohn5{display:flex;justify-self:self-end}.text-button.svelte-1duohn5.svelte-1duohn5{border:1px solid var(--neutral-400);border-radius:var(--radius-sm);font-weight:300;font-size:var(--size-3);text-align:center;color:var(--neutral-400);height:var(--size-5);font-weight:700;padding:0 5px;margin-left:5px}.text-button.svelte-1duohn5.svelte-1duohn5:hover,.text-button.svelte-1duohn5.svelte-1duohn5:focus{color:var(--color-accent);border-color:var(--color-accent)}.controls.svelte-1duohn5.svelte-1duohn5{display:grid;grid-template-columns:1fr 1fr 1fr;margin-top:5px;overflow:hidden;align-items:center}@media (max-width: 320px){.controls.svelte-1duohn5.svelte-1duohn5{display:flex;flex-wrap:wrap}.controls.svelte-1duohn5 .svelte-1duohn5{margin:var(--spacing-sm)}.controls.svelte-1duohn5 .text-button.svelte-1duohn5{margin-left:0}}.action.svelte-1duohn5.svelte-1duohn5{width:var(--size-5);color:var(--neutral-400);margin-left:var(--spacing-md)}.icon.svelte-1duohn5.svelte-1duohn5:hover,.icon.svelte-1duohn5.svelte-1duohn5:focus{color:var(--color-accent)}.play-pause-wrapper.svelte-1duohn5.svelte-1duohn5{display:flex;justify-self:center}.playback.svelte-1duohn5.svelte-1duohn5{border:1px solid var(--neutral-400);border-radius:var(--radius-sm);width:5.5ch;font-weight:300;font-size:var(--size-3);text-align:center;color:var(--neutral-400);height:var(--size-5);font-weight:700}.playback.svelte-1duohn5.svelte-1duohn5:hover{color:var(--color-accent);border-color:var(--color-accent)}.rewind.svelte-1duohn5.svelte-1duohn5,.skip.svelte-1duohn5.svelte-1duohn5{margin:0 10px;color:var(--neutral-400)}.play-pause-button.svelte-1duohn5.svelte-1duohn5{width:var(--size-8);display:flex;align-items:center;justify-content:center;color:var(--neutral-400);fill:var(--neutral-400)}.component-wrapper.svelte-1iry1ax{padding:var(--size-3)}.timestamps.svelte-1iry1ax{display:flex;justify-content:space-between;align-items:center;width:100%;padding:var(--size-1) 0}#time.svelte-1iry1ax,#duration.svelte-1iry1ax{color:var(--neutral-400)}#trim-duration.svelte-1iry1ax{color:var(--color-accent);margin-right:var(--spacing-sm)}.waveform-container.svelte-1iry1ax{display:flex;align-items:center;justify-content:center;width:var(--size-full)}#waveform.svelte-1iry1ax{width:100%;height:100%;position:relative}audio.svelte-1cxvpx.svelte-1cxvpx{display:none}.image-container.svelte-1cxvpx.svelte-1cxvpx{position:relative;width:350px;height:350px;margin:auto}.image-player.svelte-1cxvpx.svelte-1cxvpx{position:absolute;top:0;left:0;width:100%;height:100%;border-radius:50%;object-fit:cover}.play-icon.svelte-1cxvpx.svelte-1cxvpx,.pause-icon.svelte-1cxvpx.svelte-1cxvpx{position:absolute;top:50%;left:50%;width:75px;height:75px;transform:translate(-50%,-50%)}.pause-icon.svelte-1cxvpx.svelte-1cxvpx{opacity:0;transition:opacity .3s}.image-container.svelte-1cxvpx:hover .pause-icon.svelte-1cxvpx,.circle-container.svelte-1cxvpx:hover .pause-icon.svelte-1cxvpx{opacity:1}.circle-container.svelte-1cxvpx:hover .waveform-bar.svelte-1cxvpx{opacity:.5}.circle-container.svelte-1cxvpx.svelte-1cxvpx{width:350px;height:350px;margin:auto;border-radius:50%;border:3px solid white;position:relative;overflow:hidden;display:flex;align-items:center;justify-content:center}.waveform-image.svelte-1cxvpx.svelte-1cxvpx{opacity:.5}.waveform-bar.svelte-1cxvpx.svelte-1cxvpx{background-color:#fff;width:2%;height:20%;margin:0 1%;border-radius:5px;opacity:.5;transform-origin:bottom}.waveform-animation-0.svelte-1cxvpx.svelte-1cxvpx{animation:svelte-1cxvpx-waveAnimation0 1s infinite ease-in-out;opacity:1}.waveform-animation-1.svelte-1cxvpx.svelte-1cxvpx{animation:svelte-1cxvpx-waveAnimation1 1.5s infinite ease-in-out;opacity:1}.waveform-animation-2.svelte-1cxvpx.svelte-1cxvpx{animation:svelte-1cxvpx-waveAnimation2 3s infinite ease-in-out;opacity:1}.waveform-animation-3.svelte-1cxvpx.svelte-1cxvpx{animation:svelte-1cxvpx-waveAnimation3 2s infinite ease-in-out;opacity:1}.waveform-animation-4.svelte-1cxvpx.svelte-1cxvpx{animation:svelte-1cxvpx-waveAnimation4 2.5s infinite ease-in-out;opacity:1}.waveform-animation-5.svelte-1cxvpx.svelte-1cxvpx{animation:svelte-1cxvpx-waveAnimation5 3.5s infinite ease-in-out;opacity:1}@keyframes svelte-1cxvpx-waveAnimation0{0%,to{height:50%}50%{height:15%}}@keyframes svelte-1cxvpx-waveAnimation1{0%,to{height:45%}50%{height:25%}}@keyframes svelte-1cxvpx-waveAnimation2{0%,to{height:40%}50%{height:60%}}@keyframes svelte-1cxvpx-waveAnimation3{0%,to{height:70%}50%{height:25%}}@keyframes svelte-1cxvpx-waveAnimation4{0%,to{height:25%}50%{height:70%}}@keyframes svelte-1cxvpx-waveAnimation5{0%,to{height:60%}50%{height:15%}}button.svelte-a356bc{cursor:pointer;width:var(--size-full)}.hidden.svelte-a356bc{display:none;height:0;position:absolute}.center.svelte-a356bc{display:flex;justify-content:center}.flex.svelte-a356bc{display:flex;justify-content:center;align-items:center}input.svelte-a356bc{display:none}div.svelte-1wj0ocy{display:flex;top:var(--size-2);right:var(--size-2);justify-content:flex-end;gap:var(--spacing-sm);z-index:var(--layer-1)}.not-absolute.svelte-1wj0ocy{margin:var(--size-1)}.wrapper.svelte-g0zaxm{display:flex;justify-content:center;align-items:center;border-radius:50px}.microphone-icon.svelte-g0zaxm,.stop-icon.svelte-g0zaxm{display:flex;align-items:center;justify-content:center;height:100%}.record-button.svelte-g0zaxm{height:350px;width:350px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:white;border:6px solid rgb(0,140,255)}.stop-button.svelte-g0zaxm{height:350px;width:350px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:white;border:6px solid red}@keyframes svelte-g0zaxm-pulsate{0%{transform:scale(1)}50%{transform:scale(1.1)}to{transform:scale(1)}}.pulsate.svelte-g0zaxm{animation:svelte-g0zaxm-pulsate 1s infinite}.record-button.svelte-g0zaxm:disabled{cursor:not-allowed;opacity:.5}@keyframes svelte-g0zaxm-scaling{0%{background-color:var(--primary-600);scale:1}50%{background-color:var(--primary-600);scale:1.2}to{background-color:var(--primary-600);scale:1}}#microphone.svelte-1smaui2{width:100%;display:none}.component-wrapper.svelte-1smaui2{padding:var(--size-3)}.mic-wrap.svelte-1ho79kd{display:block;align-items:center;margin:var(--spacing-xl)}.stop-button-paused.svelte-1ho79kd{display:none;height:var(--size-8);width:var(--size-20);background-color:var(--block-background-fill);border-radius:var(--radius-3xl);align-items:center;border:1px solid var(--neutral-400);margin-right:5px}.stop-button-paused.svelte-1ho79kd:before{content:"";height:var(--size-4);width:var(--size-4);border-radius:var(--radius-full);background:var(--primary-600);margin:0 var(--spacing-xl)}.stop-button.svelte-1ho79kd:before{content:"";height:var(--size-4);width:var(--size-4);border-radius:var(--radius-full);background:var(--primary-600);margin:0 var(--spacing-xl);animation:scaling 1.8s infinite}.stop-button.svelte-1ho79kd{height:var(--size-8);width:var(--size-20);background-color:var(--block-background-fill);border-radius:var(--radius-3xl);align-items:center;border:1px solid var(--primary-600);margin-right:5px;display:flex}.record-button.svelte-1ho79kd:before{content:"";height:var(--size-4);width:var(--size-4);border-radius:var(--radius-full);background:var(--primary-600);margin:0 var(--spacing-xl)}.record-button.svelte-1ho79kd{height:var(--size-8);width:var(--size-24);background-color:var(--block-background-fill);border-radius:var(--radius-3xl);display:flex;align-items:center;border:1px solid var(--neutral-400)}svg.svelte-43sxxs.svelte-43sxxs{width:var(--size-20);height:var(--size-20)}svg.svelte-43sxxs path.svelte-43sxxs{fill:var(--loader-color)}div.svelte-43sxxs.svelte-43sxxs{z-index:var(--layer-2)}.margin.svelte-43sxxs.svelte-43sxxs{margin:var(--size-4)}.wrap.svelte-14miwb5.svelte-14miwb5{display:flex;flex-direction:column;justify-content:center;align-items:center;z-index:var(--layer-5);transition:opacity .1s ease-in-out;border-radius:var(--block-radius);background:var(--block-background-fill);padding:0 var(--size-6);max-height:var(--size-screen-h);overflow:hidden;pointer-events:none}.wrap.center.svelte-14miwb5.svelte-14miwb5{top:0;right:0;left:0}.wrap.default.svelte-14miwb5.svelte-14miwb5{top:0;right:0;bottom:0;left:0}.hide.svelte-14miwb5.svelte-14miwb5{opacity:0;pointer-events:none}.generating.svelte-14miwb5.svelte-14miwb5{animation:svelte-14miwb5-pulse 2s cubic-bezier(.4,0,.6,1) infinite;border:2px solid var(--color-accent);background:transparent}.translucent.svelte-14miwb5.svelte-14miwb5{background:none}@keyframes svelte-14miwb5-pulse{0%,to{opacity:1}50%{opacity:.5}}.loading.svelte-14miwb5.svelte-14miwb5{z-index:var(--layer-2);color:var(--body-text-color)}.eta-bar.svelte-14miwb5.svelte-14miwb5{position:absolute;top:0;right:0;bottom:0;left:0;transform-origin:left;opacity:.8;z-index:var(--layer-1);transition:10ms;background:var(--background-fill-secondary)}.progress-bar-wrap.svelte-14miwb5.svelte-14miwb5{border:1px solid var(--border-color-primary);background:var(--background-fill-primary);width:55.5%;height:var(--size-4)}.progress-bar.svelte-14miwb5.svelte-14miwb5{transform-origin:left;background-color:var(--loader-color);width:var(--size-full);height:var(--size-full)}.progress-level.svelte-14miwb5.svelte-14miwb5{display:flex;flex-direction:column;align-items:center;gap:1;z-index:var(--layer-2);width:var(--size-full)}.progress-level-inner.svelte-14miwb5.svelte-14miwb5{margin:var(--size-2) auto;color:var(--body-text-color);font-size:var(--text-sm);font-family:var(--font-mono)}.meta-text.svelte-14miwb5.svelte-14miwb5{position:absolute;top:0;right:0;z-index:var(--layer-2);padding:var(--size-1) var(--size-2);font-size:var(--text-sm);font-family:var(--font-mono)}.meta-text-center.svelte-14miwb5.svelte-14miwb5{display:flex;position:absolute;top:0;right:0;justify-content:center;align-items:center;transform:translateY(var(--size-6));z-index:var(--layer-2);padding:var(--size-1) var(--size-2);font-size:var(--text-sm);font-family:var(--font-mono);text-align:center}.error.svelte-14miwb5.svelte-14miwb5{box-shadow:var(--shadow-drop);border:solid 1px var(--error-border-color);border-radius:var(--radius-full);background:var(--error-background-fill);padding-right:var(--size-4);padding-left:var(--size-4);color:var(--error-text-color);font-weight:var(--weight-semibold);font-size:var(--text-lg);line-height:var(--line-lg);font-family:var(--font)}.minimal.svelte-14miwb5 .progress-text.svelte-14miwb5{background:var(--block-background-fill)}.border.svelte-14miwb5.svelte-14miwb5{border:1px solid var(--border-color-primary)}.toast-body.svelte-solcu7{display:flex;position:relative;right:0;left:0;align-items:center;margin:var(--size-6) var(--size-4);margin:auto;border-radius:var(--container-radius);overflow:hidden;pointer-events:auto}.toast-body.error.svelte-solcu7{border:1px solid var(--color-red-700);background:var(--color-red-50)}.dark .toast-body.error.svelte-solcu7{border:1px solid var(--color-red-500);background-color:var(--color-grey-950)}.toast-body.warning.svelte-solcu7{border:1px solid var(--color-yellow-700);background:var(--color-yellow-50)}.dark .toast-body.warning.svelte-solcu7{border:1px solid var(--color-yellow-500);background-color:var(--color-grey-950)}.toast-body.info.svelte-solcu7{border:1px solid var(--color-grey-700);background:var(--color-grey-50)}.dark .toast-body.info.svelte-solcu7{border:1px solid var(--color-grey-500);background-color:var(--color-grey-950)}.toast-title.svelte-solcu7{display:flex;align-items:center;font-weight:var(--weight-bold);font-size:var(--text-lg);line-height:var(--line-sm);text-transform:capitalize}.toast-title.error.svelte-solcu7{color:var(--color-red-700)}.dark .toast-title.error.svelte-solcu7{color:var(--color-red-50)}.toast-title.warning.svelte-solcu7{color:var(--color-yellow-700)}.dark .toast-title.warning.svelte-solcu7{color:var(--color-yellow-50)}.toast-title.info.svelte-solcu7{color:var(--color-grey-700)}.dark .toast-title.info.svelte-solcu7{color:var(--color-grey-50)}.toast-close.svelte-solcu7{margin:0 var(--size-3);border-radius:var(--size-3);padding:0px var(--size-1-5);font-size:var(--size-5);line-height:var(--size-5)}.toast-close.error.svelte-solcu7{color:var(--color-red-700)}.dark .toast-close.error.svelte-solcu7{color:var(--color-red-500)}.toast-close.warning.svelte-solcu7{color:var(--color-yellow-700)}.dark .toast-close.warning.svelte-solcu7{color:var(--color-yellow-500)}.toast-close.info.svelte-solcu7{color:var(--color-grey-700)}.dark .toast-close.info.svelte-solcu7{color:var(--color-grey-500)}.toast-text.svelte-solcu7{font-size:var(--text-lg)}.toast-text.error.svelte-solcu7{color:var(--color-red-700)}.dark .toast-text.error.svelte-solcu7{color:var(--color-red-50)}.toast-text.warning.svelte-solcu7{color:var(--color-yellow-700)}.dark .toast-text.warning.svelte-solcu7{color:var(--color-yellow-50)}.toast-text.info.svelte-solcu7{color:var(--color-grey-700)}.dark .toast-text.info.svelte-solcu7{color:var(--color-grey-50)}.toast-details.svelte-solcu7{margin:var(--size-3) var(--size-3) var(--size-3) 0;width:100%}.toast-icon.svelte-solcu7{display:flex;position:absolute;position:relative;flex-shrink:0;justify-content:center;align-items:center;margin:var(--size-2);border-radius:var(--radius-full);padding:var(--size-1);padding-left:calc(var(--size-1) - 1px);width:35px;height:35px}.toast-icon.error.svelte-solcu7{color:var(--color-red-700)}.dark .toast-icon.error.svelte-solcu7{color:var(--color-red-500)}.toast-icon.warning.svelte-solcu7{color:var(--color-yellow-700)}.dark .toast-icon.warning.svelte-solcu7{color:var(--color-yellow-500)}.toast-icon.info.svelte-solcu7{color:var(--color-grey-700)}.dark .toast-icon.info.svelte-solcu7{color:var(--color-grey-500)}@keyframes svelte-solcu7-countdown{0%{transform:scaleX(1)}to{transform:scaleX(0)}}.timer.svelte-solcu7{position:absolute;bottom:0;left:0;transform-origin:0 0;animation:svelte-solcu7-countdown 10s linear forwards;width:100%;height:var(--size-1)}.timer.error.svelte-solcu7{background:var(--color-red-700)}.dark .timer.error.svelte-solcu7{background:var(--color-red-500)}.timer.warning.svelte-solcu7{background:var(--color-yellow-700)}.dark .timer.warning.svelte-solcu7{background:var(--color-yellow-500)}.timer.info.svelte-solcu7{background:var(--color-grey-700)}.dark .timer.info.svelte-solcu7{background:var(--color-grey-500)}.toast-wrap.svelte-gatr8h{display:flex;position:fixed;top:var(--size-4);right:var(--size-4);flex-direction:column;align-items:end;gap:var(--size-2);z-index:var(--layer-top);width:calc(100% - var(--size-8))}@media (--screen-sm){.toast-wrap.svelte-gatr8h{width:calc(var(--size-96) + var(--size-10))}}.gallery.svelte-1gecy8w{padding:var(--size-1) var(--size-2)}
src/backend/gradio_unifiedaudio/unifiedaudio.py CHANGED
@@ -54,6 +54,7 @@ class UnifiedAudio(
54
  Events.pause_recording,
55
  Events.stop_recording,
56
  Events.upload,
 
57
  ]
58
 
59
  data_model = FileData
 
54
  Events.pause_recording,
55
  Events.stop_recording,
56
  Events.upload,
57
+ Events.end,
58
  ]
59
 
60
  data_model = FileData
src/backend/gradio_unifiedaudio/unifiedaudio.pyi CHANGED
@@ -53,6 +53,7 @@ class UnifiedAudio(
53
  Events.pause_recording,
54
  Events.stop_recording,
55
  Events.upload,
 
56
  ]
57
 
58
  data_model = FileData
@@ -708,6 +709,48 @@ class UnifiedAudio(
708
  ...
709
 
710
  def upload(self,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
711
  fn: Callable | None,
712
  inputs: Component | Sequence[Component] | set[Component] | None = None,
713
  outputs: Component | Sequence[Component] | None = None,
 
53
  Events.pause_recording,
54
  Events.stop_recording,
55
  Events.upload,
56
+ Events.end,
57
  ]
58
 
59
  data_model = FileData
 
709
  ...
710
 
711
  def upload(self,
712
+ fn: Callable | None,
713
+ inputs: Component | Sequence[Component] | set[Component] | None = None,
714
+ outputs: Component | Sequence[Component] | None = None,
715
+ api_name: str | None | Literal[False] = None,
716
+ scroll_to_output: bool = False,
717
+ show_progress: Literal["full", "minimal", "hidden"] = "full",
718
+ queue: bool | None = None,
719
+ batch: bool = False,
720
+ max_batch_size: int = 4,
721
+ preprocess: bool = True,
722
+ postprocess: bool = True,
723
+ cancels: dict[str, Any] | list[dict[str, Any]] | None = None,
724
+ every: float | None = None,
725
+ trigger_mode: Literal["once", "multiple", "always_last"] | None = None,
726
+ js: str | None = None,
727
+ concurrency_limit: int | None | Literal["default"] = "default",
728
+ concurrency_id: str | None = None,
729
+ show_api: bool = True) -> Dependency:
730
+ """
731
+ Parameters:
732
+ fn: the function to call when this event is triggered. Often a machine learning model's prediction function. Each parameter of the function corresponds to one input component, and the function should return a single value or a tuple of values, with each element in the tuple corresponding to one output component.
733
+ inputs: List of gradio.components to use as inputs. If the function takes no inputs, this should be an empty list.
734
+ outputs: List of gradio.components to use as outputs. If the function returns no outputs, this should be an empty list.
735
+ api_name: Defines how the endpoint appears in the API docs. Can be a string, None, or False. If False, the endpoint will not be exposed in the api docs. If set to None, the endpoint will be exposed in the api docs as an unnamed endpoint, although this behavior will be changed in Gradio 4.0. If set to a string, the endpoint will be exposed in the api docs with the given name.
736
+ scroll_to_output: If True, will scroll to output component on completion
737
+ show_progress: If True, will show progress animation while pending
738
+ queue: If True, will place the request on the queue, if the queue has been enabled. If False, will not put this event on the queue, even if the queue has been enabled. If None, will use the queue setting of the gradio app.
739
+ batch: If True, then the function should process a batch of inputs, meaning that it should accept a list of input values for each parameter. The lists should be of equal length (and be up to length `max_batch_size`). The function is then *required* to return a tuple of lists (even if there is only 1 output component), with each list in the tuple corresponding to one output component.
740
+ max_batch_size: Maximum number of inputs to batch together if this is called from the queue (only relevant if batch=True)
741
+ preprocess: If False, will not run preprocessing of component data before running 'fn' (e.g. leaving it as a base64 string if this method is called with the `Image` component).
742
+ postprocess: If False, will not run postprocessing of component data before returning 'fn' output to the browser.
743
+ cancels: A list of other events to cancel when this listener is triggered. For example, setting cancels=[click_event] will cancel the click_event, where click_event is the return value of another components .click method. Functions that have not yet run (or generators that are iterating) will be cancelled, but functions that are currently running will be allowed to finish.
744
+ every: Run this event 'every' number of seconds while the client connection is open. Interpreted in seconds. Queue must be enabled.
745
+ trigger_mode: If "once" (default for all events except `.change()`) would not allow any submissions while an event is pending. If set to "multiple", unlimited submissions are allowed while pending, and "always_last" (default for `.change()` event) would allow a second submission after the pending event is complete.
746
+ js: Optional frontend js method to run before running 'fn'. Input arguments for js method are values of 'inputs' and 'outputs', return should be a list of values for output components.
747
+ concurrency_limit: If set, this is the maximum number of this event that can be running simultaneously. Can be set to None to mean no concurrency_limit (any number of this event can be running simultaneously). Set to "default" to use the default concurrency limit (defined by the `default_concurrency_limit` parameter in `Blocks.queue()`, which itself is 1 by default).
748
+ concurrency_id: If set, this is the id of the concurrency group. Events with the same concurrency_id will be limited by the lowest set concurrency_limit.
749
+ show_api: whether to show this event in the "view API" page of the Gradio app, or in the ".view_api()" method of the Gradio clients. Unlike setting api_name to False, setting show_api to False will still allow downstream apps to use this event. If fn is None, show_api will automatically be set to False.
750
+ """
751
+ ...
752
+
753
+ def end(self,
754
  fn: Callable | None,
755
  inputs: Component | Sequence[Component] | set[Component] | None = None,
756
  outputs: Component | Sequence[Component] | None = None,
src/demo/app.py CHANGED
@@ -8,11 +8,15 @@ example = UnifiedAudio().example_inputs()
8
  dir_ = Path(__file__).parent
9
 
10
  def test_mic(audio):
11
- return UnifiedAudio(value=audio)
 
 
 
12
 
13
  with gr.Blocks() as demo:
14
  mic = UnifiedAudio(sources="microphone")
15
  mic.change(test_mic, mic, mic)
 
16
 
17
  if __name__ == '__main__':
18
  demo.launch()
 
8
  dir_ = Path(__file__).parent
9
 
10
  def test_mic(audio):
11
+ return UnifiedAudio(value=audio, image="demo/freeman.jpg")
12
+
13
+ def clear(audio):
14
+ return UnifiedAudio(value=None)
15
 
16
  with gr.Blocks() as demo:
17
  mic = UnifiedAudio(sources="microphone")
18
  mic.change(test_mic, mic, mic)
19
+ mic.end(clear, mic, mic)
20
 
21
  if __name__ == '__main__':
22
  demo.launch()
src/frontend/Index.svelte CHANGED
@@ -129,6 +129,7 @@
129
  {waveform_settings}
130
  on:share={(e) => gradio.dispatch("share", e.detail)}
131
  on:error={(e) => gradio.dispatch("error", e.detail)}
 
132
  />
133
  {:else}
134
  <InteractiveAudio
 
129
  {waveform_settings}
130
  on:share={(e) => gradio.dispatch("share", e.detail)}
131
  on:error={(e) => gradio.dispatch("error", e.detail)}
132
+ on:end={() => gradio.dispatch("end")}
133
  />
134
  {:else}
135
  <InteractiveAudio
src/frontend/interactive/InteractiveAudio.svelte CHANGED
@@ -83,7 +83,6 @@
83
  let _audio_blob = new File(blobs, "audio.wav");
84
  const val = await prepare_files([_audio_blob], event === "stream");
85
  value = ((await upload(val, root))?.filter(Boolean) as FileData[])[0];
86
- console.log("dispatch blobbbb: ", value);
87
  dispatch(event, value);
88
  };
89
 
 
83
  let _audio_blob = new File(blobs, "audio.wav");
84
  const val = await prepare_files([_audio_blob], event === "stream");
85
  value = ((await upload(val, root))?.filter(Boolean) as FileData[])[0];
 
86
  dispatch(event, value);
87
  };
88
 
src/frontend/static/StaticAudio.svelte CHANGED
@@ -2,7 +2,7 @@
2
  import { uploadToHuggingFace } from "@gradio/utils";
3
  import { Empty } from "@gradio/atoms";
4
  import { ShareButton, IconButton, BlockLabel } from "@gradio/atoms";
5
- import { Download, Music } from "@gradio/icons";
6
  import type { I18nFormatter } from "@gradio/utils";
7
  import AudioPlayer from "../player/AudioPlayer.svelte";
8
  import { get_fetchable_url_or_file } from "@gradio/client";
@@ -34,6 +34,7 @@
34
  pause: undefined;
35
  end: undefined;
36
  stop: undefined;
 
37
  }>();
38
  $: value && dispatch("change", value);
39
 
@@ -50,6 +51,10 @@
50
  isPlaying = true;
51
  }
52
  }
 
 
 
 
53
  </script>
54
 
55
  {#if value !== null}
@@ -68,10 +73,11 @@
68
  />
69
  {/if}
70
  </div>
71
- <audio src={value.url} controls bind:this={audioElement}/>
72
  {#if image}
73
  <div class="image-container" on:click={play_audio} role="button" tabindex="0" aria-hidden="true">
74
  <img class="image-player" src={image_path} alt="test" />
 
75
  {#if !isPlaying}
76
  <!-- Play button -->
77
  <svg class="play-icon" viewBox="0 0 24 24" style="pointer-events: none;">
@@ -84,6 +90,11 @@
84
  <rect x="14" y="4" width="4" height="16" fill="#fff" />
85
  </svg>
86
  {/if}
 
 
 
 
 
87
  </div>
88
  {:else}
89
  <div class="circle-container" on:click={play_audio} role="button" tabindex="0" aria-hidden="true">
@@ -167,7 +178,12 @@
167
  display: flex;
168
  align-items: center;
169
  justify-content: center;
170
- }
 
 
 
 
 
171
  .waveform-bar {
172
  background-color: white;
173
  width: 2%;
@@ -178,65 +194,64 @@
178
  transform-origin: bottom;
179
  }
180
 
181
- .waveform-animation-0 {
182
- animation: waveAnimation0 1s infinite ease-in-out;
183
- opacity: 1;
184
- }
185
-
186
- .waveform-animation-1 {
187
- animation: waveAnimation1 1.5s infinite ease-in-out;
188
- opacity: 1;
189
- }
190
 
191
- .waveform-animation-2 {
192
- animation: waveAnimation2 3s infinite ease-in-out;
193
- opacity: 1;
194
- }
195
 
 
 
 
 
196
 
197
- .waveform-animation-3 {
198
- animation: waveAnimation3 2s infinite ease-in-out;
199
- opacity: 1;
200
- }
201
 
202
- .waveform-animation-4 {
203
- animation: waveAnimation4 2.5s infinite ease-in-out;
204
- opacity: 1;
205
- }
206
 
207
- .waveform-animation-5 {
208
- animation: waveAnimation5 3.5s infinite ease-in-out;
209
- opacity: 1;
210
- }
211
 
 
 
 
 
212
 
213
- @keyframes waveAnimation0 {
214
- 0%, 100% { height: 50%; }
215
- 50% { height: 15%; }
216
- }
217
 
218
- @keyframes waveAnimation1 {
219
- 0%, 100% { height: 45%; }
220
- 50% { height: 25%; }
221
- }
222
 
223
- @keyframes waveAnimation2 {
224
- 0%, 100% { height: 40%; }
225
- 50% { height: 60%; }
226
- }
227
 
228
- @keyframes waveAnimation3 {
229
- 0%, 100% { height: 70%; }
230
- 50% { height: 25%; }
231
- }
232
 
233
- @keyframes waveAnimation4 {
234
- 0%, 100% { height: 25%; }
235
- 50% { height: 70%; }
236
- }
237
 
238
- @keyframes waveAnimation5 {
239
- 0%, 100% { height: 60%; }
240
- 50% { height: 15%; }
241
- }
242
  </style>
 
2
  import { uploadToHuggingFace } from "@gradio/utils";
3
  import { Empty } from "@gradio/atoms";
4
  import { ShareButton, IconButton, BlockLabel } from "@gradio/atoms";
5
+ import { Music } from "@gradio/icons";
6
  import type { I18nFormatter } from "@gradio/utils";
7
  import AudioPlayer from "../player/AudioPlayer.svelte";
8
  import { get_fetchable_url_or_file } from "@gradio/client";
 
34
  pause: undefined;
35
  end: undefined;
36
  stop: undefined;
37
+ clear: undefined;
38
  }>();
39
  $: value && dispatch("change", value);
40
 
 
51
  isPlaying = true;
52
  }
53
  }
54
+
55
+ function handle_audio_end(): void {
56
+ dispatch("end");
57
+ }
58
  </script>
59
 
60
  {#if value !== null}
 
73
  />
74
  {/if}
75
  </div>
76
+ <audio src={value.url} controls bind:this={audioElement} on:ended={handle_audio_end}/>
77
  {#if image}
78
  <div class="image-container" on:click={play_audio} role="button" tabindex="0" aria-hidden="true">
79
  <img class="image-player" src={image_path} alt="test" />
80
+
81
  {#if !isPlaying}
82
  <!-- Play button -->
83
  <svg class="play-icon" viewBox="0 0 24 24" style="pointer-events: none;">
 
90
  <rect x="14" y="4" width="4" height="16" fill="#fff" />
91
  </svg>
92
  {/if}
93
+ <div class="circle-container waveform-image" style="pointer-events: none;">
94
+ {#each Array(15) as _, i (i)}
95
+ <div class={`waveform-bar ${isPlaying ? `waveform-animation-${i % 5}` : ''}`} style={`height: ${20 + (i % 5) * 10}%`}></div>
96
+ {/each}
97
+ </div>
98
  </div>
99
  {:else}
100
  <div class="circle-container" on:click={play_audio} role="button" tabindex="0" aria-hidden="true">
 
178
  display: flex;
179
  align-items: center;
180
  justify-content: center;
181
+ }
182
+
183
+ .waveform-image {
184
+ opacity: 0.5;
185
+ }
186
+
187
  .waveform-bar {
188
  background-color: white;
189
  width: 2%;
 
194
  transform-origin: bottom;
195
  }
196
 
197
+ .waveform-animation-0 {
198
+ animation: waveAnimation0 1s infinite ease-in-out;
199
+ opacity: 1;
200
+ }
 
 
 
 
 
201
 
202
+ .waveform-animation-1 {
203
+ animation: waveAnimation1 1.5s infinite ease-in-out;
204
+ opacity: 1;
205
+ }
206
 
207
+ .waveform-animation-2 {
208
+ animation: waveAnimation2 3s infinite ease-in-out;
209
+ opacity: 1;
210
+ }
211
 
 
 
 
 
212
 
213
+ .waveform-animation-3 {
214
+ animation: waveAnimation3 2s infinite ease-in-out;
215
+ opacity: 1;
216
+ }
217
 
218
+ .waveform-animation-4 {
219
+ animation: waveAnimation4 2.5s infinite ease-in-out;
220
+ opacity: 1;
221
+ }
222
 
223
+ .waveform-animation-5 {
224
+ animation: waveAnimation5 3.5s infinite ease-in-out;
225
+ opacity: 1;
226
+ }
227
 
228
+ @keyframes waveAnimation0 {
229
+ 0%, 100% { height: 50%; }
230
+ 50% { height: 15%; }
231
+ }
232
 
233
+ @keyframes waveAnimation1 {
234
+ 0%, 100% { height: 45%; }
235
+ 50% { height: 25%; }
236
+ }
237
 
238
+ @keyframes waveAnimation2 {
239
+ 0%, 100% { height: 40%; }
240
+ 50% { height: 60%; }
241
+ }
242
 
243
+ @keyframes waveAnimation3 {
244
+ 0%, 100% { height: 70%; }
245
+ 50% { height: 25%; }
246
+ }
247
 
248
+ @keyframes waveAnimation4 {
249
+ 0%, 100% { height: 25%; }
250
+ 50% { height: 70%; }
251
+ }
252
 
253
+ @keyframes waveAnimation5 {
254
+ 0%, 100% { height: 60%; }
255
+ 50% { height: 15%; }
256
+ }
257
  </style>
src/pyproject.toml CHANGED
@@ -43,7 +43,7 @@ classifiers = [
43
  dev = ["build", "twine"]
44
 
45
  [tool.hatch.build]
46
- artifacts = ["/backend/gradio_unifiedaudio/templates", "*.pyi", "backend/gradio_unifiedaudio/templates", "backend/gradio_unifiedaudio/templates", "backend/gradio_unifiedaudio/templates", "backend/gradio_unifiedaudio/templates", "backend/gradio_unifiedaudio/templates", "backend/gradio_unifiedaudio/templates", "backend/gradio_unifiedaudio/templates", "backend/gradio_unifiedaudio/templates", "backend/gradio_unifiedaudio/templates", "backend/gradio_unifiedaudio/templates", "backend/gradio_unifiedaudio/templates", "backend/gradio_unifiedaudio/templates", "backend/gradio_unifiedaudio/templates", "backend/gradio_unifiedaudio/templates", "backend/gradio_unifiedaudio/templates"]
47
 
48
  [tool.hatch.build.targets.wheel]
49
  packages = ["/backend/gradio_unifiedaudio"]
 
43
  dev = ["build", "twine"]
44
 
45
  [tool.hatch.build]
46
+ artifacts = ["/backend/gradio_unifiedaudio/templates", "*.pyi", "backend/gradio_unifiedaudio/templates", "backend/gradio_unifiedaudio/templates", "backend/gradio_unifiedaudio/templates", "backend/gradio_unifiedaudio/templates", "backend/gradio_unifiedaudio/templates", "backend/gradio_unifiedaudio/templates", "backend/gradio_unifiedaudio/templates", "backend/gradio_unifiedaudio/templates", "backend/gradio_unifiedaudio/templates", "backend/gradio_unifiedaudio/templates", "backend/gradio_unifiedaudio/templates", "backend/gradio_unifiedaudio/templates", "backend/gradio_unifiedaudio/templates", "backend/gradio_unifiedaudio/templates", "backend/gradio_unifiedaudio/templates", "backend/gradio_unifiedaudio/templates"]
47
 
48
  [tool.hatch.build.targets.wheel]
49
  packages = ["/backend/gradio_unifiedaudio"]