Spaces:
Runtime error
Runtime error
hamxahbhattii
commited on
Commit
•
42028bc
1
Parent(s):
82b24ba
Added Return statement for covert audio File
Browse files- helperfunctions.py +2 -1
- main.py +2 -2
helperfunctions.py
CHANGED
@@ -142,4 +142,5 @@ def convert_audio(input_file, audio_format, audio_quality):
|
|
142 |
subprocess.run(command)
|
143 |
|
144 |
except Exception as e:
|
145 |
-
print(f"Error in convert_audio: {e}")
|
|
|
|
142 |
subprocess.run(command)
|
143 |
|
144 |
except Exception as e:
|
145 |
+
print(f"Error in convert_audio: {e}")
|
146 |
+
return output_file
|
main.py
CHANGED
@@ -398,14 +398,14 @@ async def get_audiobook(user_id: str, narration_style: str, speaker: str = "male
|
|
398 |
narrator = AudioBookNarration(text_input=text_input)
|
399 |
output = narrator.define_chain(narration_style=narration_style)
|
400 |
print("=============="*50)
|
401 |
-
print("####### Generation Audio########"
|
402 |
print("=============="*50)
|
403 |
# Generating Audiobook
|
404 |
audiobook = AudioBook(output_folder=output_folder)
|
405 |
audio_path = audiobook.generate_audio_from_text(output, speaker=speaker, filename="output_audio")
|
406 |
|
407 |
print("=============="*50)
|
408 |
-
print(f"####### Audio Path :{audio_path} ########"
|
409 |
print("=============="*50)
|
410 |
|
411 |
# Converting the Audio to Required Audio Parameters
|
|
|
398 |
narrator = AudioBookNarration(text_input=text_input)
|
399 |
output = narrator.define_chain(narration_style=narration_style)
|
400 |
print("=============="*50)
|
401 |
+
print("####### Generation Audio########")
|
402 |
print("=============="*50)
|
403 |
# Generating Audiobook
|
404 |
audiobook = AudioBook(output_folder=output_folder)
|
405 |
audio_path = audiobook.generate_audio_from_text(output, speaker=speaker, filename="output_audio")
|
406 |
|
407 |
print("=============="*50)
|
408 |
+
print(f"####### Audio Path :{audio_path} ########")
|
409 |
print("=============="*50)
|
410 |
|
411 |
# Converting the Audio to Required Audio Parameters
|