Custom Components GalleryNEW
ExploreCustom Components GalleryNEW
ExploreNew to Gradio? Start here: Getting Started
See the Release History
To install Gradio from main, run the following command:
pip install https://gradio-builds.s3.amazonaws.com/e2bc281c5c95060e3f11f6b7277ab50422561d09/gradio-4.22.0-py3-none-any.whl*Note: Setting share=True in
						launch() will not work.
gradio.make_waveform(audio, ···)Generates a waveform video from an audio file. Useful for creating an easy to share audio visualization. The output should be passed into a gr.Video component.
| Parameter | Description | 
|---|---|
| audiostr | tuple[int, np.ndarray] required | Audio file path or tuple of (sample_rate, audio_data) | 
| bg_colorstr default: "#f3f4f6" | Background color of waveform (ignored if bg_image is provided) | 
| bg_imagestr | None default: None | Background image of waveform | 
| fg_alphafloat default: 0.75 | Opacity of foreground waveform | 
| bars_colorstr | tuple[str, str] default: ('#fbbf24', '#ea580c') | Color of waveform bars. Can be a single color or a tuple of (start_color, end_color) of gradient | 
| bar_countint default: 50 | Number of bars in waveform | 
| bar_widthfloat default: 0.6 | Width of bars in waveform. 1 represents full width, 0.5 represents half width, etc. | 
| animatebool default: False | If true, the audio waveform overlay will be animated, if false, it will be static. |