Open rahulkarda opened 1 year ago
are you trying to play it locally? if not have you found a solution?
are you trying to play it locally? if not have you found a solution?
Yes running it locally. No solution found yet.
that's a same. We are so close and so far at the same time
@Thiagohgl, Is there any solution to this? I've been attempting to run it locally, but I consistently encounter server error 500.
@Thiagohgl I also encountered the same problem. Please give me a solution. Thank you
@Thiagohgl I also encountered the same problem. Please give me a solution. Thank you
I did some digging, added try
- except
and located the error.
It occurs at nn_output = self.model(audio)
line in AIModels.py
file:
RuntimeError: stft requires the return_complex parameter be given for real inputs, and will further require that return_complex=True in a future PyTorch release.
Looks like silero models do have problems with newer PyTorch versions.
I got it working on torch 1.13.1
.
@Alehandreus Thank you for your enthusiasm. I have downgraded the version of pytorch to 1.13.1. Run on localhost after recording is finished, it displays as a picture ...
There is a function GetAccuracyFromRecordedAudio
in webApp.py
that is responsible for sending the audio.
You can add try-except here and see what it prints (just like I did):
@app.route(rootPath+'/GetAccuracyFromRecordedAudio', methods=['POST'])
def GetAccuracyFromRecordedAudio():
try:
event = {'body': json.dumps(request.get_json(force=True))}
lambda_correct_output = lambdaSpeechToScore.lambda_handler(event, [])
except Exception as e:
import traceback
print(e)
print(traceback.format_exc())
return lambda_correct_output
Chances are this time it's about np.int
which is deprecated. You need to replace two occurrences of np.int
with int
in WordMatching.py
.
@Alehandreus It's awesome. Can you give me a reference to this project of yours
Somebody have already fixed np.int
issue: fork, pull request
If you need the exact place to insert try-except
, you can find it in my fork or in commit changes
@Alehandreus @nguyenchiminhhieu did it run locally for you? i am still getting the server error.
Server error. Either the daily quota of the server is over or there was some internal error. You can try to generate a new sample in a few seconds. If the error persist, try comming back tomorrow or download the local version from Github :)