You could try loose crankarm or dodgy pedal maybe?
Mine did the same. Had to remove the mounting screws, clean the contact points on the motor and the frame, grease them and then retighten everything. Silence once again.
The World's largest electric mountain bike community.