tidelganesh commited on
Commit
0ce379e
·
verified ·
1 Parent(s): 481b088

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -5
app.py CHANGED
@@ -52,11 +52,23 @@ def transcribe_and_respond(audio_file):
52
  output = pipe({
53
  "audio": audio,
54
  "sampling_rate": sr,
55
- "turns" :
56
- [
57
- {'role': 'system', 'content': 'You are an exact echo assistant. Output the previous text exactly as given, without any modifications.'},
58
- {'role': 'user', 'content': '<|audio|>'}
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