fix generating speech file error