|
import functions_framework |
|
import os |
|
import logging |
|
|
|
|
|
@functions_framework.http |
|
def hello_http(request): |
|
|
|
request_args = request.args |
|
|
|
|
|
audio_file = request_args.get('audio_file') |
|
model_name = request_args.get('model_name') |
|
transform = request_args.get('transform') |
|
song = request_args.get('song') |
|
|
|
|
|
if any(param is None for param in [audio_file, model_name, transform, song]): |
|
return "Please provide all the required arguments: audio_file, model_name, transform, song." |
|
else: |
|
is_song = song.lower() == "true" |
|
transform = int(transform) |
|
import RVC_class |
|
|
|
|
|
is_song = song.lower() == "true" |
|
|
|
|
|
converter = RVC_class.VoiceConverter() |
|
|
|
|
|
result = converter.single_run(audio_file, model_name, transform, is_song) |
|
|
|
return result |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|