rohan13 commited on
Commit
da7457b
β€’
1 Parent(s): 5150eb8

adding ffmpeg in packages.txt

Browse files
Files changed (2) hide show
  1. app.py +3 -2
  2. packages.txt +1 -0
app.py CHANGED
@@ -29,6 +29,7 @@ def run_model(text):
29
  def get_output(history, audio):
30
 
31
  txt = p(audio)["text"]
 
32
  audio_path = 'response.wav'
33
  response = run_model(txt)
34
  # Remove all text from SOURCES: to the end of the string
@@ -38,7 +39,7 @@ def get_output(history, audio):
38
  # split audio by / and keep the last element
39
  # audio = audio.split("/")[-1]
40
  # audio = audio + ".wav"
41
- history.append(( txt , (audio_path, )))
42
  print(history)
43
  return history
44
 
@@ -57,7 +58,7 @@ with gr.Blocks() as demo:
57
  ).style(container=False)
58
 
59
  with gr.Column(scale=0.15):
60
- audio = gr.Audio(source="microphone", type="filepath", suffix=".wav").style(container=False)
61
 
62
  txt.submit(add_text, [chatbot, txt], [chatbot, txt], postprocess=False).then(
63
  bot, chatbot, chatbot
 
29
  def get_output(history, audio):
30
 
31
  txt = p(audio)["text"]
32
+ # history.append(( (audio, ) , txt))
33
  audio_path = 'response.wav'
34
  response = run_model(txt)
35
  # Remove all text from SOURCES: to the end of the string
 
39
  # split audio by / and keep the last element
40
  # audio = audio.split("/")[-1]
41
  # audio = audio + ".wav"
42
+ history.append(( (audio, ) , (audio_path, )))
43
  print(history)
44
  return history
45
 
 
58
  ).style(container=False)
59
 
60
  with gr.Column(scale=0.15):
61
+ audio = gr.Audio(source="microphone", type="filepath").style(container=False)
62
 
63
  txt.submit(add_text, [chatbot, txt], [chatbot, txt], postprocess=False).then(
64
  bot, chatbot, chatbot
packages.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ ffmpeg