Kartikeyssj2 commited on
Commit
2f6faa5
1 Parent(s): 9cc016d

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +8 -1
main.py CHANGED
@@ -88,8 +88,15 @@ async def get_rnc():
88
  return random.randint(0 , 10)
89
 
90
 
 
 
 
 
 
 
 
91
  @app.post('/pronunciation_score')
92
- async def upload_audio(file: UploadFile = File(...)):
93
  print("loading the file")
94
  url = "https://speech-processing-6.onrender.com/process_audio"
95
  files = {'file': await file.read()}
 
88
  return random.randint(0 , 10)
89
 
90
 
91
+ @app.post('/fluency_score')
92
+ async def fluency_scoring(file: UploadFile = File(...)):
93
+ audio_array, sample_rate = librosa.load(file.file, sr=16000)
94
+ print(audio_array)
95
+ return audio_array[:5]
96
+
97
+
98
  @app.post('/pronunciation_score')
99
+ async def pronunciation_scoring(file: UploadFile = File(...)):
100
  print("loading the file")
101
  url = "https://speech-processing-6.onrender.com/process_audio"
102
  files = {'file': await file.read()}