mirror of
https://github.com/remsky/Kokoro-FastAPI.git
synced 2025-08-05 16:48:53 +00:00
922 B
922 B
Introduction
This is a simple PSR test written in locust. It simulates users that execute the following scenario:
- call API to convert text to speech using streaming API
- play the generated audio file
- repeat
Get Started
Install the packages required by the PSR test:
uv pip install -e ".[psr]"
Run the test
Start Kokoro-FastAPI first, then start Locust:
set HOST=http://localhost:8880
locust -f ./api/psr/openai_load_test.py -H %HOST% --users 1 --spawn-rate 0.1 --run-time 5m KokoroOpenAPiClient
- Use the Locust UI on http://localhost:8089 to start the test.
- Set the number of users to a value supported by your machine (e.g.: Intel i9 + nvidia 3050 could support 10 users).
- Set the user ramp up to a desired value (e.g.: 0.1 means one user every 10 seconds)
- Click Advanced and set the desired test duration (Locust will run user simulations for that duration).
- Click Start.