Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

audiogen_app.py #185

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Conversation

cocktailpeanut
Copy link

A Gradio web UI for the new AudioGen module.

Forked from musicgen_app.py and removed some parts that I think are not relevant for AudioGen.

Confirmed it works.

@facebook-github-bot
Copy link

Hi @cocktailpeanut!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at [email protected]. Thanks!

@cocktailpeanut
Copy link
Author

Just signed the contributor license agreement, looking forward to feedback!

Also, please let me know if I need to modify anything. One thing I wasn't sure about was whether AudioGen supports Multi Band Diffusion (Looking at the code I kind of assumed it doesn't but maybe I'm wrong), so just took that out of the UI. Let me know if this needs to be supported as well.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Aug 4, 2023
@cocktailpeanut
Copy link
Author

BTW here's what it looks like in action: https://twitter.com/cocktailpeanut/status/1687565351721005056

@mberman84
Copy link

Works for me also, you are amazing @cocktailpeanut

@JadeCopet
Copy link
Contributor

Thanks for your contribution!

The MBD model is not available for AudioGen for now and using the one trained on MusicGen may not be optimal. Can you remove the use of MBD from the app ?

Another nice addition could be to have text prompt examples to get started similarly to the MusicGen demo, e.g. adding:

gr.Examples(
  fn=predict_full,
  examples=[
      [
          "Typing on a typewriter",
      ],
      [
          "The siren of an emergency vehicle sounds",
      ],
      [
          "A duck quacking as birds chirp and a pigeon cooing",
      ],
      [
          "Thundering sounds while rain pours",
      ],
  ],
  inputs=[text],
  outputs=[output]
)

Copy link
Contributor

@JadeCopet JadeCopet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, see above comment and the review below, i'll be happy to merge once this is updated. Thanks!

MODEL = AudioGen.get_pretrained(version)


def load_diffusion():
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't have a MultiBandDiffusion model for AudioGen, let's remove this bit from the demo for the merge?

cfg_coef = gr.Number(label="Classifier Free Guidance", value=3.0, interactive=True)
with gr.Column():
output = gr.Video(label="Generated Audio")
audio_output = gr.Audio(label="Generated Audio (wav)", type='filepath')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be great to add some examples as well similarly to the MusicGen demo for users to get some ideas about possible prompts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants