I am encountering an error when running a Lambda function that merges audio chunks into a single audio file using Python 3.10.
The error message is:
No such file or directory: 'ffmpeg'
`def create_combined_audio_from_chunks(sorted_objects_key_list: List) -> AudioSegment:
“””
Create a merged audio from audio chunks
“””
# Create an empty AudioSegment object to hold the combined audio
combined_audio = AudioSegment.empty()
for key in sorted_objects_key_list:
try:
file_content = get_s3_object_content(object_key=key)
with tempfile.NamedTemporaryFile(delete=True) as temp_file:
temp_file.write(file_content)
temp_file.seek(0)
sound = AudioSegment.from_file_using_temporary_files(temp_file)
combined_audio += sound
except Exception as e:
print(e)
return combined_audio`
I am encountering an error when running a Lambda function that merges audio chunks into a single audio file using Python 3.10.
Vipul Kavar is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.