stardate69 commited on
Commit
b3e9b98
·
verified ·
1 Parent(s): aa17bad

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -29,7 +29,12 @@ os.makedirs(OUTPUT_PATH, exist_ok=True)
29
  def generate_audio(prompt: str):
30
  # Generate the audio using StableAudioPipeline
31
  generator = torch.Generator(device).manual_seed(42)
32
- audio_output = pipe(prompt=prompt, negative_prompt="Low Quality", num_inference_steps=10).audios
 
 
 
 
 
33
 
34
  # Convert to numpy and save to a WAV file
35
  output_audio = audio_output[0].T.float().cpu().numpy()
 
29
  def generate_audio(prompt: str):
30
  # Generate the audio using StableAudioPipeline
31
  generator = torch.Generator(device).manual_seed(42)
32
+ audio_output = pipe(prompt=prompt,
33
+ negative_prompt='Low Quality',
34
+ num_inference_steps=int(10), # Number of diffusion steps
35
+ audio_end_in_s=1,
36
+ num_waveforms_per_prompt=1,
37
+ generator=generator).audios
38
 
39
  # Convert to numpy and save to a WAV file
40
  output_audio = audio_output[0].T.float().cpu().numpy()