Closed chanis2 closed 7 months ago
The recent update enhances the text-to-speech API server by introducing asynchronous task handling for improved performance and adding logic to manage cache efficiently based on configuration settings.
File Path | Change Summary |
---|---|
.../xtts_api_server/server.py |
- Added asynchronous task handling with BackgroundTasks .- Integrated uuid4 for unique identification.- Updated tts_to_audio function to support new background_tasks parameter.- Implemented conditional output file deletion based on cache settings. |
🐇✨
In the realm of code and byte,
Where servers hum through day and night,
A rabbit hopped, with changes bright,
To make the text-to-speech take flight.
With tasks that run out of sight,
And cache that clears if just it might.
🎉🐰
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Thanks for PR
There's currently a bug #59 where when the cache is disabled and you do multiple requests to
/tts_to_audio
in quick succession you'll get the same wav file in the response for all requests. Atleast this is what happened to me when using the api.This fixes the issue by giving each file generated a unique name. I also made it so that when the cache is disabled the generated file gets automatically deleted afterwards.
Summary by CodeRabbit