daswer123 / xtts-api-server

A simple FastAPI Server to run XTTSv2
MIT License
372 stars 85 forks source link

Unable to accept concurrent api calls for /tts_to_audio since out.wav will be shared #59

Open IguteChung opened 7 months ago

IguteChung commented 7 months ago

In /tts_to_audio api, if USE_CACHE=False, it will use default file_name_or_path="out.wav" for XTTS.process_tts_to_file.

However it get error if concurrent api calls happen.

torchaudio.save(output_file, torch.tensor(out["wav"]).unsqueeze(0), 24000)

jdola commented 7 months ago

I also get an error when processing 2 or more requests at the same time, I'm trying to fix it.

mercuryyy commented 4 months ago

Is there a fix for this?