Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server Error #1

Open
rahulkarda opened this issue Sep 11, 2023 · 10 comments
Open

Server Error #1

rahulkarda opened this issue Sep 11, 2023 · 10 comments

Comments

@rahulkarda
Copy link

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 :)

@userMak
Copy link

userMak commented Oct 5, 2023

are you trying to play it locally? if not have you found a solution?

@rahulkarda
Copy link
Author

are you trying to play it locally? if not have you found a solution?

Yes running it locally. No solution found yet.

@userMak
Copy link

userMak commented Oct 5, 2023

that's a same. We are so close and so far at the same time

@pratapyash
Copy link

pratapyash commented May 26, 2024

@Thiagohgl, Is there any solution to this? I've been attempting to run it locally, but I consistently encounter server error 500.

@nguyenchiminhhieu
Copy link

@Thiagohgl I also encountered the same problem. Please give me a solution. Thank you

@Alehandreus
Copy link

@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.

@nguyenchiminhhieu
Copy link

@Alehandreus
Ảnh chụp màn hình 2024-06-04 213017
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 ...

@Alehandreus
Copy link

Alehandreus commented Jun 4, 2024

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.

@nguyenchiminhhieu
Copy link

@Alehandreus It's awesome. Can you give me a reference to this project of yours

@Alehandreus
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants