not-lain commited on
Commit
3eb706b
1 Parent(s): c1f218b

some updates to the audio

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -11,6 +11,7 @@ import dotenv
11
  from scipy.io.wavfile import write
12
  import PIL
13
  from openai import OpenAI
 
14
  dotenv.load_dotenv()
15
 
16
  seamless_client = Client("facebook/seamless_m4t")
@@ -22,6 +23,7 @@ def process_speech(audio_input):
22
  """
23
  processing sound using seamless_m4t
24
  """
 
25
  print(f"audio : {audio_input}")
26
  print(f"audio type : {type(audio_input)}")
27
 
@@ -318,4 +320,4 @@ with gr.Blocks(theme='ParityError/Anime') as iface :
318
  audio_button.click(process_speech, inputs=audio_input, outputs=audio_output)
319
 
320
 
321
- iface.launch(show_error=True)
 
11
  from scipy.io.wavfile import write
12
  import PIL
13
  from openai import OpenAI
14
+ import time
15
  dotenv.load_dotenv()
16
 
17
  seamless_client = Client("facebook/seamless_m4t")
 
23
  """
24
  processing sound using seamless_m4t
25
  """
26
+ time.sleep(2) # wait for the audio to be saved
27
  print(f"audio : {audio_input}")
28
  print(f"audio type : {type(audio_input)}")
29
 
 
320
  audio_button.click(process_speech, inputs=audio_input, outputs=audio_output)
321
 
322
 
323
+ iface.queue().launch(show_error=True,debug=True)