AI can ‘hear’ when lithium battery is about to catch fire