Skip to content

Commit

Permalink
Option to disable audio waveforms
Browse files Browse the repository at this point in the history
  • Loading branch information
gitmylo committed Jun 30, 2023
1 parent 91c7d61 commit c79c66a
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 20 deletions.
34 changes: 17 additions & 17 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,23 +66,23 @@ If there's an issue with running, please create an [issue](https://github.com/gi

## 💻 Command line flags

| Name | Args | Short | Usage | Description |
|--------------------|----------------------------------|------------|-----------------------|------------------------------------------------------------------------------------------------------------------------|
| --skip-install | [None] | -si | -si | Skip installing packages |
| --skip-venv | [None] | -sv | -sv | Skip creating/activating venv, also skips install. (for advanced users) |
| --no-data-cache | [None] | [None] | --no-data-cache | Don't change the default dir for huggingface_hub models. (This might fix some models not loading) |
| --bark-low-vram | [None] | [None] | --bark-low-vram | Use low vram for bark |
| --bark-cpu-offload | [None] | [None] | --bark-cpu-offload | Use cpu offloading to save vram while still running on gpu |
| --bark-use-cpu | [None] | [None] | --bark-use-cpu | Use cpu for bark |
| --bark-half | [None] | [None] | --bark-half | Use half precision for bark models. (This uses less VRAM) (Experimental) |
| --tts-use-gpu | [None] | [None] | --tts-use-gpu | Use your GPU for TTS with the TTS library |
| --share | [None] | -s | -s | Share the gradio instance publicly |
| --username | username (str) | -u, --user | -u username | Set the username for gradio |
| --password | password (str) | -p, --pass | -p password | Set the password for gradio |
| --theme | theme (str) | [None] | --theme "gradio/soft" | Set the theme for gradio |
| --listen | [None] | -l | -l | Listen a server, allowing other devices within your local network to access the server. (or outside if port forwarded) |
| --port | port (int) | [None] | --port 12345 | Set a custom port to listen on, by default a port is picked automatically |
| --wav-type | type any of: [gradio, showwaves] | [None] | --wav-type showwaves | Change the visualizers for creating a video from audio. |
| Name | Args | Short | Usage | Description |
|--------------------|----------------------------------------|------------|-----------------------|------------------------------------------------------------------------------------------------------------------------|
| --skip-install | [None] | -si | -si | Skip installing packages |
| --skip-venv | [None] | -sv | -sv | Skip creating/activating venv, also skips install. (for advanced users) |
| --no-data-cache | [None] | [None] | --no-data-cache | Don't change the default dir for huggingface_hub models. (This might fix some models not loading) |
| --bark-low-vram | [None] | [None] | --bark-low-vram | Use low vram for bark |
| --bark-cpu-offload | [None] | [None] | --bark-cpu-offload | Use cpu offloading to save vram while still running on gpu |
| --bark-use-cpu | [None] | [None] | --bark-use-cpu | Use cpu for bark |
| --bark-half | [None] | [None] | --bark-half | Use half precision for bark models. (This uses less VRAM) (Experimental) |
| --tts-use-gpu | [None] | [None] | --tts-use-gpu | Use your GPU for TTS with the TTS library |
| --share | [None] | -s | -s | Share the gradio instance publicly |
| --username | username (str) | -u, --user | -u username | Set the username for gradio |
| --password | password (str) | -p, --pass | -p password | Set the password for gradio |
| --theme | theme (str) | [None] | --theme "gradio/soft" | Set the theme for gradio |
| --listen | [None] | -l | -l | Listen a server, allowing other devices within your local network to access the server. (or outside if port forwarded) |
| --port | port (int) | [None] | --port 12345 | Set a custom port to listen on, by default a port is picked automatically |
| --wav-type | type any of: [none, gradio, showwaves] | [None] | --wav-type showwaves | Change the visualizers for creating a video from audio. Use "none" to disable previews. |


## ✨ Current goals and features ✨
Expand Down
2 changes: 1 addition & 1 deletion webui/args.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
parser.add_argument('--port', type=int, help='Use a different port, automatic when not set.', default=None)

# Visualizer
parser.add_argument('--wav-type', type=str, choices=['gradio', 'showwaves'], default='gradio', help='The type of waveform visualizer to use')
parser.add_argument('--wav-type', type=str, choices=['none', 'gradio', 'showwaves'], default='gradio', help='The type of waveform visualizer to use')

args = parser.parse_args()

Expand Down
5 changes: 3 additions & 2 deletions webui/modules/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ def make_waveform(
match wav_type:
case 'showwaves':
return showwaves(audio)
case 'gradio' | _:
case 'gradio':
return gradio.make_waveform(audio, bg_color=bg_color, bg_image=bg_image, fg_alpha=fg_alpha, bars_color=bars_color, bar_count=bar_count, bar_width=bar_width)

case 'none' | _:
return None

0 comments on commit c79c66a

Please sign in to comment.