From 75cb175ff507cc31dbc471998262ad5336d9bd9f Mon Sep 17 00:00:00 2001 From: iflamed Date: Wed, 10 Jul 2024 23:25:32 +0800 Subject: [PATCH] add http client demo for python --- README.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e690c7e..5c40373 100644 --- a/README.md +++ b/README.md @@ -125,10 +125,14 @@ The `runtime/python/fastapi_server.py` file contains the http API build with `Fa cd runtime/python # Set inference model export MODEL_DIR=pretrained_models/CosyVoice-300M-Instruct + # For development -fastapi dev --port 6006 fastapi_server.py +fastapi dev --port 6006 fastapi_server.py # For production -fastapi run --port 6006 fastapi_server.py +fastapi run --port 6006 fastapi_server.py + +# Call the API with python client +python fastapi_client.py --api_base http://127.0.0.1:6006 --mode cross_lingual --tts_wav ./demo.wav ``` **Build for deployment**