add setRule in speech class