tbdavid2019 commited on
Commit
ef74762
·
1 Parent(s): 5896c14

ui fix 更改 gr.audio

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -48,14 +48,15 @@ with gr.Blocks() as app:
48
 
49
  with gr.Column():
50
  output_message = gr.Textbox(label="📢 處理狀態", interactive=False)
51
- audio_output = gr.Audio(label="🎧 預覽混音結果", interactive=True)
52
  download_output = gr.File(label="⬇️ 下載混音 MP3")
53
 
54
  process_button.click(
55
  fn=mix_audio,
56
  inputs=[podcast_input, bgm_input, bgm_volume, loop_option, fade_option, fade_duration],
57
- outputs=[output_message, download_output]
58
  )
59
 
 
60
  # 執行 Gradio 應用
61
  app.launch()
 
48
 
49
  with gr.Column():
50
  output_message = gr.Textbox(label="📢 處理狀態", interactive=False)
51
+ audio_output = gr.Audio(label="🎧 預覽混音結果", format="mp3", interactive=False, autoplay=False)
52
  download_output = gr.File(label="⬇️ 下載混音 MP3")
53
 
54
  process_button.click(
55
  fn=mix_audio,
56
  inputs=[podcast_input, bgm_input, bgm_volume, loop_option, fade_option, fade_duration],
57
+ outputs=[output_message, audio_output, download_output] # 確保 Audio 正確顯示
58
  )
59
 
60
+
61
  # 執行 Gradio 應用
62
  app.launch()