Detecting gait phases unobtrusively and reliably in real-time for long-term unsupervised walking is important for clinical gait rehabilitation and early diagnosis of neurological diseases. Due to hardware limitations in wearable devices, real-time gait phase detection remains a challenge for unsupervised mobility assessment. In this work, a hybrid algorithm combining a reduced support vector machine (RSVM) and a finite state machine (FSM) is developed to address this. The RSVM is developed by reducing the SVM model size for real-time applications through a novel technique based on K-means clustering, and the FSM validates predictions and corrects misclassifications of RSVM. With the proposed algorithm, the model size is reduced by 88%, and the computation time is reduced by a factor of 36, with only a minor degradation in performance. The real-time classification performance of the algorithm is evaluated by twenty healthy subjects walking outdoors with unsupervised gait. The proposed algorithm demonstrated promising real-time performance, with the accuracy, sensitivity, and specificity of 91.51%, 91.70%, 95.77% across all test subjects.