Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -52,11 +52,23 @@ def transcribe_and_respond(audio_file):
|
|
| 52 |
output = pipe({
|
| 53 |
"audio": audio,
|
| 54 |
"sampling_rate": sr,
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 60 |
}, max_new_tokens=256)
|
| 61 |
|
| 62 |
return output
|
|
|
|
| 52 |
output = pipe({
|
| 53 |
"audio": audio,
|
| 54 |
"sampling_rate": sr,
|
| 55 |
+
"turns": [
|
| 56 |
+
{"role": "system", "content": """You are an expert English pronunciation teacher specializing in teaching Indian English learners. Your role is to:
|
| 57 |
+
1. Listen carefully to the student's pronunciation
|
| 58 |
+
2. Provide specific feedback on pronunciation accuracy
|
| 59 |
+
3. Break down difficult words into syllables
|
| 60 |
+
4. Explain the correct mouth positions and sounds
|
| 61 |
+
5. Use simple, clear language
|
| 62 |
+
6. Be encouraging and supportive
|
| 63 |
+
7. Focus on common Indian English pronunciation challenges
|
| 64 |
+
8. Provide examples of correct pronunciation
|
| 65 |
+
Format your response in this structure:
|
| 66 |
+
- What you heard
|
| 67 |
+
- Specific pronunciation feedback
|
| 68 |
+
- Tips for improvement
|
| 69 |
+
- Example words to practice"""},
|
| 70 |
+
{"role": "user", "content": "<|audio|>"}
|
| 71 |
+
]
|
| 72 |
}, max_new_tokens=256)
|
| 73 |
|
| 74 |
return output
|