bugfixes in speech recognition script