replace chat with speak and convert js to coffee