FranklinWillemen commited on
Commit
6fb9753
1 Parent(s): ef2d627

rename app.py

Browse files
TARS-discourse.py → app.py RENAMED
@@ -6,7 +6,7 @@ import azure.cognitiveservices.speech as speechsdk
6
 
7
  openai.api_key = config.OPENAI_API_KEY
8
 
9
- speech_config = speechsdk.SpeechConfig(subscription=config.AZURE_VOICE_KEY, region=config.AZURE_VOICE_LOCATION)
10
  speech_config.speech_synthesis_voice_name = "en-US-AriaNeural"
11
  speech_synthesizer = speechsdk.SpeechSynthesizer(speech_config=speech_config)
12
 
@@ -59,14 +59,14 @@ theme = gr.themes.Default().set(
59
 
60
  with gr.Blocks(theme=theme) as ui:
61
  # advisor image input and microphone input
62
- advisor = gr.Image(value=config.ADVISOR_IMAGE).style(width=config.ADVISOR_IMAGE_WIDTH, height=config.ADVISOR_IMAGE_HEIGHT)
63
  audio_input = gr.Audio(source="microphone", type="filepath")
64
 
65
  # text transcript output and audio
66
  text_output = gr.Textbox(label="Conversation Transcript")
67
- audio_output = gr.Audio()
68
 
69
  btn = gr.Button("Run")
70
- btn.click(fn=transcribe, inputs=audio_input, outputs=[text_output, audio_output])
71
 
72
  ui.launch(debug=True, share=True)
 
6
 
7
  openai.api_key = config.OPENAI_API_KEY
8
 
9
+ speech_config = speechsdk.SpeechConfig(subscription=config.AZURE_SPEECH_KEY, region=config.AZURE_LOCATION)
10
  speech_config.speech_synthesis_voice_name = "en-US-AriaNeural"
11
  speech_synthesizer = speechsdk.SpeechSynthesizer(speech_config=speech_config)
12
 
 
59
 
60
  with gr.Blocks(theme=theme) as ui:
61
  # advisor image input and microphone input
62
+ advisor = gr.Image(value=config.TARS_LOGO).style(width=config.LOGO_IMAGE_WIDTH, height=config.LOGO_IMAGE_HEIGHT)
63
  audio_input = gr.Audio(source="microphone", type="filepath")
64
 
65
  # text transcript output and audio
66
  text_output = gr.Textbox(label="Conversation Transcript")
67
+ #audio_output = gr.Audio()
68
 
69
  btn = gr.Button("Run")
70
+ btn.click(fn=transcribe, inputs=audio_input, outputs=[text_output])
71
 
72
  ui.launch(debug=True, share=True)
images/TARS-Logo.png ADDED