File size: 459 Bytes
a72b927 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
import requests
import json
import time
import base64
import httpx
url = "http://127.0.0.1:8000/clone"
# Provide the audio file and speaker name
audio_file = ("rizwan.wav", open("/Users/saboor/Documents/TTS-RVC-API-1/rizwan.wav", "rb"))
data = {"audio_file": audio_file, "speaker_name": "speaker1"}
# Send the POST request
response = httpx.post(url, data=data)
# Check the response
print(response.status_code)
print(response.headers)
print(response.text)
|