real-time-voice-cloning / test copy.py
Yeserumo's picture
update
e57f790
raw
history blame contribute delete
658 Bytes
from gradio_client import Client
from pathlib import Path
import subprocess
client = Client("https://balacoon-voice-conversion-service.hf.space/")
result = client.predict(
"/home/sjx/Common/vits/Real-Time-Voice-Cloning-master/demo_output_01.wav",
"/home/sjx/Common/vits/Real-Time-Voice-Cloning-master/demo_output_01.wav",
"/home/sjx/Common/vits/Real-Time-Voice-Cloning-master/1.wav",
fn_index=1
)
source_path = Path(result)
target_path = Path("./output/")
mv_command = ['mv', source_path, target_path]
try:
subprocess.run(mv_command, check=True)
print('Finishing!!!!')
except subprocess.CalledProcessError as e:
print('Error!!!!')