On macOS 10.15, the script crashes with FileNotFoundError: [Errno 2] if a voice memo is registered in the database but the .m4a file is not currently localized (stored in iCloud). Currently, the script stops execution entirely when it encounters a missing file.
I have developed a fix that wraps the export logic in a try-except block to allow the script to complete the full batch while logging failures to a failed_exports.txt file for manual review.