import requests | |
import json | |
URL = 'https://serverless-region-v1.inferless.com/api/v1/parler-tts-streaming-1_ae4e81bb5d604799b573df3f0b3c9518/infer' | |
headers = {"Content-Type": "application/json", "Authorization": "Bearer 1e01145781a0639d830555d5e4e4e5e1752726750db75e995e0e246f32c4b7c9f442bd6f8caec8acc6b9684ec78e5b633db04370815ca1748bf5a7db80245411"} | |
data = json.loads('''{ | |
"parameters": { | |
"prompt_value": "A male speaker with a low-pitched voice delivering his words at a fast pace in a small, confined space with a very clear audio and an animated tone.", | |
"input_value": "Remember - this is only the first iteration of the model! To improve the prosody and naturalness of the speech further, we're scaling up the amount of training data by a factor of five times." | |
} | |
}''') | |
response = requests.post(URL, headers=headers, data=json.dumps(data)) | |
print(response.json()) |