TTS
TTS copied to clipboard
Fixes a race condition with multiple simultaneous get requests.
This fixes an issue where, if you make multiple requests at the same time, the results will sound corrupted or you will get an internal server error.
Thanks for β¨PRβ¨
I see there are style issues. If you fix, I can merge this PR
I'm not sure how i can fix this error. TTS/server/server.py:174:4: R1732: Consider using 'with' for resource-allocating operations (consider-using-with) i'm doing lock.acquire() in this line.
I'm not sure how i can fix this error. TTS/server/server.py:174:4: R1732: Consider using 'with' for resource-allocating operations (consider-using-with) i'm doing lock.acquire() in this line.
I think the formatter prefers the with notation:
lock = Lock()
@app.route("/api/tts", methods=["GET"])
def tts():
with lock:
text = request.args.get("text")
...
rather than that:
lock = Lock()
@app.route("/api/tts", methods=["GET"])
def tts():
lock.acquire()
text = request.args.get("text")
...
lock.release()
Reformatted the file i changed failed this time?
black tests TTS notebooks recipes --check
Skipping .ipynb files as Jupyter dependencies are not installed.
You can fix this by running ``pip install black[jupyter]``
would reformat TTS/server/server.py
Oh no! π₯ π π₯
1 file would be reformatted, 298 files would be left unchanged.
make: *** [Makefile:47: lint] Error 1
Error: Process completed with exit code 2.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You might also look our discussion channels.