Spaces:
Running
Running
File size: 956 Bytes
0d425b8 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
import torch
import os
import traceback
import sys
import warnings
import shutil
import numpy as np
import infer_new
def main():
try:
print("Inside main function ********")
# Setup your parameters here
spk_id = "modi.pth"
voice_transform = 0
input_audio_path = "test.mp3"
# Call the api_convert_voice function from infer_new.py
# Ensure that infer_new.py is correctly implemented to handle this function call
output_path = infer_new.api_convert_voice(spk_id, voice_transform, input_audio_path)
print(f"Processed audio file is located at: {output_path}")
# Depending on your needs, you can return or print any results here
print(f"Hello, ! The processed audio file is located at: {output_path}")
except Exception as e:
print("An error occurred:", e)
traceback.print_exc()
if __name__ == "__main__":
main()
|