Scientists created an AI tool that detects a fruit fly’s courtship song as it begins and instantly switches off specific brain cells.