[ApiDemo] Fix InvalidCastException in VoiceRecognition