Irpan
commited on
Commit
·
8556a23
1
Parent(s):
0bb57fd
app
Browse files
app.py
CHANGED
@@ -7,12 +7,13 @@ def generate_example_pronunciation(input_text, script):
|
|
7 |
|
8 |
def check_pronunciation(input_text, script, user_audio):
|
9 |
# Placeholder logic for pronunciation checking
|
10 |
-
|
|
|
11 |
correct_pronunciation = "Correct pronunciation in IPA"
|
12 |
user_pronunciation = "User pronunciation in IPA"
|
13 |
pronunciation_match = "Matching segments in green, mismatched in red"
|
14 |
pronunciation_score = 85.7 # Replace with actual score calculation
|
15 |
-
return
|
16 |
|
17 |
with gr.Blocks() as app:
|
18 |
with gr.Row():
|
@@ -84,7 +85,7 @@ with gr.Blocks() as app:
|
|
84 |
check_btn.click(
|
85 |
check_pronunciation,
|
86 |
inputs=[input_text, script_choice, user_audio],
|
87 |
-
outputs=[
|
88 |
)
|
89 |
|
90 |
if __name__ == "__main__":
|
|
|
7 |
|
8 |
def check_pronunciation(input_text, script, user_audio):
|
9 |
# Placeholder logic for pronunciation checking
|
10 |
+
transcript_ugArab_box = "Automatic transcription of your audio..."
|
11 |
+
transcript_ugLatn_box = "Automatic transcription of your audio..."
|
12 |
correct_pronunciation = "Correct pronunciation in IPA"
|
13 |
user_pronunciation = "User pronunciation in IPA"
|
14 |
pronunciation_match = "Matching segments in green, mismatched in red"
|
15 |
pronunciation_score = 85.7 # Replace with actual score calculation
|
16 |
+
return transcript_ugArab_box, transcript_ugLatn_box, correct_pronunciation, user_pronunciation, pronunciation_match, pronunciation_score
|
17 |
|
18 |
with gr.Blocks() as app:
|
19 |
with gr.Row():
|
|
|
85 |
check_btn.click(
|
86 |
check_pronunciation,
|
87 |
inputs=[input_text, script_choice, user_audio],
|
88 |
+
outputs=[transcript_ugArab_box, transcript_ugLatn_box, correct_pronunciation_box, user_pronunciation_box, match_box, score_box]
|
89 |
)
|
90 |
|
91 |
if __name__ == "__main__":
|