gradio/js/audio
Hannah f816136a03
Add volume control to Audio (#6254)
* fix autoplay and add trim_region_color setting

* add changeset

* add changeset

* add changeset

* remove unused param

* add changeset

* add volume control functionality

* add changeset

* corrent change event to stop_recording

* controls tweak

* add tests

* add changeset

* hide volume when blurred

* change bar height

* normalise -> normalize

* style tweaks

* clean up volume control

* add more tests

* formatting

* fix dispatch event

* amend refs to source

* add audio e2e

* add changeset

* fix test

* clean up ids + refs

* style tweak

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-11-15 13:19:02 +01:00
..
interactive Add volume control to Audio (#6254) 2023-11-15 13:19:02 +01:00
player Add volume control to Audio (#6254) 2023-11-15 13:19:02 +01:00
recorder Add volume control to Audio (#6254) 2023-11-15 13:19:02 +01:00
shared Add volume control to Audio (#6254) 2023-11-15 13:19:02 +01:00
static Add volume control to Audio (#6254) 2023-11-15 13:19:02 +01:00
streaming Add volume control to Audio (#6254) 2023-11-15 13:19:02 +01:00
Audio.stories.svelte Add autoplay to waveform_settings (#6317) 2023-11-07 11:23:43 -08:00
audio.test.ts Add volume control to Audio (#6254) 2023-11-15 13:19:02 +01:00
CHANGELOG.md chore: update versions (#6381) 2023-11-13 19:19:34 -08:00
Example.svelte Version 4 development branch (#5498) 2023-10-31 04:46:02 +00:00
Index.svelte Add volume control to Audio (#6254) 2023-11-15 13:19:02 +01:00
index.ts Version 4 development branch (#5498) 2023-10-31 04:46:02 +00:00
package.json chore: update versions (#6381) 2023-11-13 19:19:34 -08:00
README.md Version 4 development branch (#5498) 2023-10-31 04:46:02 +00:00

@gradio/audio

<script>
	import { BaseStaticAudio, BaseInteractiveAudio, BasePlayer, BaseExample } from "@gradio/audio";
</script>

BaseExample:

	export let value: string;
	export let type: "gallery" | "table";
	export let selected = false;

BaseStaticAudio:

	export let value: null | { name: string; data: string } = null;
	export let label: string;
	export let name: string;
	export let show_label = true;
	export let autoplay: boolean;
	export let show_download_button = true;
	export let show_share_button = false;
	export let i18n: I18nFormatter;
	export let waveform_settings = {};

BaseInteractiveAudio:

	export let value: null | { name: string; data: string } = null;
	export let label: string;
	export let root: string;
	export let show_label = true;
	export let sources:
		| ["microphone"]
		| ["upload"]
		| ["microphone", "upload"]
		| ["upload", "microphone"] = ["microphone", "upload"];
	export let pending = false;
	export let streaming = false;
	export let autoplay = false;
	export let i18n: I18nFormatter;
	export let waveform_settings = {};
	export let dragging: boolean;
	export let active_source: "microphone" | "upload";
	export let handle_reset_value: () => void = () => {};

BasePlayer:

	export let value: null | { name: string; data: string } = null;
	export let label: string;
	export let autoplay: boolean;
	export let i18n: I18nFormatter;
	export let dispatch: (event: any, detail?: any) => void;
	export let dispatch_blob: (
		blobs: Uint8Array[] | Blob[],
		event: "stream" | "change" | "stop_recording"
	) => Promise<void> = () => Promise.resolve();
	export let interactive = false;
	export let waveform_settings = {};
	export let mode = "";
	export let handle_reset_value: () => void = () => {};