This paper proposes a reliable leak detection method for water pipelines under different operating conditions. This approach segments acoustic emission (AE) signals into short frames based on the Hanning window, with an overlap of 50%. After segmentation from each frame, an intermediate quantity, which contains the symptoms of a leak and keeps its characteristic adequately stable even when the environmental conditions change, is calculated. Finally, a k-nearest neighbor (KNN) classifier is trained using features extracted from the transformed signals to identify leaks in the pipeline. Experiments are conducted under different conditions to confirm the effectiveness of the proposed method. The results of the study indicate that this method offers better quality and more reliability than using features extracted directly from the AE signals to train the KNN classifier. Moreover, the proposed method requires less training data than existing techniques. The transformation method is highly accurate and works well even when only a small amount of data is used to train the classifier, whereas the direct AE-based method returns misclassifications in some cases. In addition, robustness is also tested by adding Gaussian noise to the AE signals. The proposed method is more resistant to noise than the direct AE-based method.