FranklinWillemen commited on
Commit
29caaa0
1 Parent(s): f41a51e

naming adjustments

Browse files
Files changed (2) hide show
  1. discourse.py +2 -2
  2. gradio-ui.py +2 -2
discourse.py CHANGED
@@ -34,11 +34,11 @@ def respond(audio:str):
34
  response = gen_response("gpt-3.5-turbo", context)
35
  context.append(response)
36
 
37
- gen_voice(response, "voice.wav")
38
 
39
  # chat_transcript = ""
40
  # for message in context:
41
  # if message['role'] != 'system':
42
  # chat_transcript += message['role'] + ": " + message['content'] + "\n\n"
43
 
44
- return "voice.wav"
 
34
  response = gen_response("gpt-3.5-turbo", context)
35
  context.append(response)
36
 
37
+ gen_voice(response, "audio_response.wav")
38
 
39
  # chat_transcript = ""
40
  # for message in context:
41
  # if message['role'] != 'system':
42
  # chat_transcript += message['role'] + ": " + message['content'] + "\n\n"
43
 
44
+ return "audio_response.wav"
gradio-ui.py CHANGED
@@ -10,12 +10,12 @@ with gr.Blocks(theme=theme) as ui:
10
  # advisor image input and microphone input
11
  # advisor = gr.Image(value=config.TARS_LOGO).style(width=config.LOGO_IMAGE_WIDTH, height=config.LOGO_IMAGE_HEIGHT)
12
  message = gr.Audio(source="microphone", type="filepath")
13
- response = gr.Audio()
14
 
15
  # text transcript output and audio
16
  # text_output = gr.Textbox(label="Transcript")
17
 
18
  btn = gr.Button("Run")
19
- btn.click(fn=d.respond, inputs=message, outputs=[response])
20
 
21
  ui.launch()
 
10
  # advisor image input and microphone input
11
  # advisor = gr.Image(value=config.TARS_LOGO).style(width=config.LOGO_IMAGE_WIDTH, height=config.LOGO_IMAGE_HEIGHT)
12
  message = gr.Audio(source="microphone", type="filepath")
13
+ audio_response = gr.Audio()
14
 
15
  # text transcript output and audio
16
  # text_output = gr.Textbox(label="Transcript")
17
 
18
  btn = gr.Button("Run")
19
+ btn.click(fn=d.respond, inputs=message, outputs=[audio_response])
20
 
21
  ui.launch()