Vadym Myroshnyk commited on
Commit
b37c77d
·
1 Parent(s): e36359e
app.py CHANGED
@@ -5,7 +5,7 @@ import gradio as gr
5
  from custom_theme import CustomMinimalTheme
6
  from service.oral.oral_service import oral_exercise
7
  from service.written.written_service import written_exercise
8
- from utils.instructions import ORAL_QUIZ, TRANSCRIPTION_EXERCISE, QA_DRILL
9
 
10
  if os.getenv("HF_SPACE_ID") is None:
11
  from dotenv import load_dotenv
@@ -30,6 +30,10 @@ with gr.Blocks(theme=CustomMinimalTheme()) as demo:
30
  written_exercise("data/transcription_exercise/audio",
31
  "data/transcription_exercise/expected_result", TRANSCRIPTION_EXERCISE)
32
 
 
 
 
 
33
  # with gr.TabItem("🗣️ Oral Gap-fill Exercise"):
34
  # oral_exercise("data/oral_gap_fill_exercise/audio",
35
  # "data/oral_gap_fill_exercise/expected_result")
 
5
  from custom_theme import CustomMinimalTheme
6
  from service.oral.oral_service import oral_exercise
7
  from service.written.written_service import written_exercise
8
+ from utils.instructions import ORAL_QUIZ, TRANSCRIPTION_EXERCISE, QA_DRILL, PRONUNCIATION_PRACTICE
9
 
10
  if os.getenv("HF_SPACE_ID") is None:
11
  from dotenv import load_dotenv
 
30
  written_exercise("data/transcription_exercise/audio",
31
  "data/transcription_exercise/expected_result", TRANSCRIPTION_EXERCISE)
32
 
33
+ with gr.TabItem("🗣️ Pronunciation Practice"):
34
+ oral_exercise("data/pronunciation_practice/audio",
35
+ "data/pronunciation_practice/expected_result", PRONUNCIATION_PRACTICE)
36
+
37
  # with gr.TabItem("🗣️ Oral Gap-fill Exercise"):
38
  # oral_exercise("data/oral_gap_fill_exercise/audio",
39
  # "data/oral_gap_fill_exercise/expected_result")
data/pronunciation_practice/expected_result/week1.txt ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Richard: Good afternoon, Jenny. I got a message that you wanted to see me. How can I help?
2
+ Jenny: Good afternoon, Richard. Could we please talk somewhere more private?
3
+ Richard: Sure. We could go into the meeting room, or we could get a cup of coffee in the canteen.
4
+ Jenny: It's lunchtime. The cafeteria may be too busy. We might not get much privacy there.
5
+ Richard: O.K. Let's use the meeting room, although it may not be available at the moment.
6
+ Jenny: One moment. I can check. You're right. The sales team have booked it out for the whole day.
7
+ Richard: So, it's the canteen then. We might be able to find a quiet corner.
8
+ Jenny: We could try. Otherwise, could we pop out to the corner coffee shop?
9
+ Richard: Jenny, may I ask what this is about? I'm beginning to feel a little concerned.
10
+ Jenny: It's about Linda. I might need to give her a warning.
11
+ Richard: Did you say ‘a warning'? Surely, she can't have done anything that warrants a warning!
12
+ Jenny: I'm afraid she has. I couldn't believe it, but I actually heard her being rude to a client on the phone.
13
+ Richard: That's very unlike Linda. She can be direct at times, but never rude.
14
+ Jenny: Then, I may have formed the wrong impression of her.
15
+ Richard: Yes, she might have just been tired that day. I think we need to discuss this in more detail.
16
+ Jenny: Yes, I agree. If you're available, we could meet first thing tomorrow morning, say at 9.
17
+ Richard: Yes, I can manage 9 o'clock. Could you please book the meeting room for us now?
18
+ Jenny: Sure, let me open the programme. Oh! This can't be right! It says the room is booked the
19
+ whole day tomorrow as well.
20
+ Richard: Oh, yes, I remember now. This is a three-day sales conference. Let's meet in the canteen. It
21
+ couldn't be that busy at 9 in the morning.
22
+ Jenny: I suppose not. O.K. I'll see you there at 9 tomorrow.
23
+ Richard: Great! See you first thing in the morning, Jenny.
utils/instructions.py CHANGED
@@ -58,3 +58,14 @@ QA_DRILL = """
58
  🟩 **Correct words**
59
  🟥 **Missing / incorrect words**
60
  """
 
 
 
 
 
 
 
 
 
 
 
 
58
  🟩 **Correct words**
59
  🟥 **Missing / incorrect words**
60
  """
61
+
62
+ PRONUNCIATION_PRACTICE = """
63
+ **1.** ▶️ Start the recording and listen to the **first line** of the conversation.
64
+ **2.** ⏸️ Stop the recording.
65
+ **3.** 🎤 Click the **RECORD** button and repeat this line out loud.
66
+ **4.** 🛑 Click **STOP**.
67
+ **5.** 🧠 Click **TRANSCRIBE** to see what the system heard.
68
+ **6.** 🔁 Repeat steps 1 to 5 until you are satisfied with your recording of the line.
69
+ **7.** ✅ Click **CHECK** to compare what you said with the actual sentence.
70
+ **8.** ⏭️ Click **NEXT** and repeat the above steps for all the lines in the conversation.
71
+ """