Two-phase flows are present in several chemical processes and their monitoring is essential for industrial operations. One of the hydrodynamic variables used for their characterization and monitoring is the gas void fraction. This study aimed to develop machine learning models to predict the gas void fraction in vertical and upward oil-air two-phase flows, using features extracted from ultrasonic echo signals as input variables. The dataset used for this task included 420 void fraction values, ranging from 8.0% to 70.0%, that were acquired simultaneously with non-intrusive ultrasonic measurements from vertical and upward oil-air two-phase flows. The acquired ultrasonic echo signals were processed to extract the echo energy signals, which are sensitive to the concentration and distribution of bubbles in the flow. This step was followed by the extraction of the following features from the echo energy signals: mean, standard deviation, median, coefficient of variation, kurtosis, and Shannon entropy. In addition, a study was conducted to compare the influence of the solid-flow interface caused by the tube wall. Some features demonstrated an increasing or decreasing correlation with the void fraction and were thus selected as input variables for the machine learning models. These included the mean of the echo energy signal derived from the entire ultrasonic echo signal, as well as the median, coefficient of variation, and Shannon entropy derived solely from the reflections at the liquid-gas interface. The investigated machine learning models were the following: Linear/Polynomial Regression, Decision Tree, Random Forest, Support Vector Machines, and Neural Networks, which were developed in Python programming language. The methodology included the use of the holdout technique, splitting the dataset into an 80% training set and a 20% testing set. Hyperparameter tuning was carried out using the grid search combined with cross validation method and had the mean squared error as performance metric. This process indicated the optimal set of hyperparameters for each model, which were subsequently evaluated on the test set. The models with the best performance were Random Forest (RMSE = 2.89%, MAPE = 7.21%, R² = 0.975) and Support Vector Machine (RMSE = 2.82 MAPE = 7.35, R² = 0.976). These results indicate that the developed models are promising for predicting the gas void fraction in oil-air two-phase flows using ultrasonic measurements.