Spaces:
Paused
Paused
FranklinWillemen
commited on
Commit
•
6fb9753
1
Parent(s):
ef2d627
rename app.py
Browse files- TARS-discourse.py → app.py +4 -4
- images/TARS-Logo.png +0 -0
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.
|
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.
|
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)
|
|
|
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