Spaces:
Runtime error
Runtime error
Commit
·
b8dbc3e
1
Parent(s):
e340491
fix if output_extension none
Browse files- src/rp_handler.py +7 -3
src/rp_handler.py
CHANGED
|
@@ -45,13 +45,17 @@ def run_voice_clone_job(job):
|
|
| 45 |
s3_url = job_input.get('s3_url')
|
| 46 |
passage = job_input.get('passage')
|
| 47 |
process_audio = job_input.get('process_audio')
|
| 48 |
-
output_extension = job_input.get('output_extension')
|
| 49 |
print(process_audio)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 50 |
if output_extension not in ["mp3","ogg"]:
|
| 51 |
return {"error" : "only supports mp3 and ogg as output_extension"}
|
| 52 |
print(output_extension)
|
| 53 |
-
|
| 54 |
-
process_audio = False
|
| 55 |
|
| 56 |
if method_type == 'voice_clone':
|
| 57 |
run_type = job_input.get('run_type')
|
|
|
|
| 45 |
s3_url = job_input.get('s3_url')
|
| 46 |
passage = job_input.get('passage')
|
| 47 |
process_audio = job_input.get('process_audio')
|
|
|
|
| 48 |
print(process_audio)
|
| 49 |
+
if process_audio is None:
|
| 50 |
+
process_audio = False
|
| 51 |
+
|
| 52 |
+
output_extension = job_input.get('output_extension')
|
| 53 |
+
if output_extension == None:
|
| 54 |
+
output_extension = "ogg"
|
| 55 |
if output_extension not in ["mp3","ogg"]:
|
| 56 |
return {"error" : "only supports mp3 and ogg as output_extension"}
|
| 57 |
print(output_extension)
|
| 58 |
+
|
|
|
|
| 59 |
|
| 60 |
if method_type == 'voice_clone':
|
| 61 |
run_type = job_input.get('run_type')
|