minmal example with a server client architecture

This commit is contained in:
2025-03-06 10:32:39 +01:00
parent d54de1d291
commit 35a58dd060
5 changed files with 101 additions and 9 deletions
@@ -5,6 +5,7 @@ import soundfile as sf
from voice_models.request_models import SynthesizeRequest
API_URL = "http://127.0.0.1:8099/synthesize/"
def request_synthesis(request_data: SynthesizeRequest):
response = requests.post(API_URL, json=request_data.model_dump())
@@ -27,7 +28,6 @@ def request_synthesis(request_data: SynthesizeRequest):
print(f"Error: {response.status_code}, {response.text}")
if __name__ == "__main__":
API_URL = "http://127.0.0.1:8099/synthesize/"
target_rate=16000