Changes in the freshness of pork due to microbial action during complex transportation and storage indicate an urgent need for in-situ, real-time monitoring techniques for chemical spoilage of meat. This study reported the use of a portable detection device based on a miniaturized visible/near-infrared spectrometer, combined with data noise reduction and machine learning methods, to predict the total viable count (TVC) in pork samples. A rapid detection device for pork TVC was designed based on the miniaturized spectrometer; a spectral preprocessing method based on the resolution of the spectrometer was proposed; the effects of different preprocessing methods on the full-wavelength modeling effect were compared; and four different feature wavelength extraction algorithms were utilized for the feature wavelengths of pork TVC. The modeling effects of different simplified models were compared. The results showed that resolution interval correction combined with standard normal variation was the most effective in full-wavelength modeling, with correlation coefficients of prediction set (RP), root mean square errors in prediction set (RMSEP), and relative percent deviation (RPD) of 0.918, 0.464 (lg CFU/g), and 2.508, respectively; interval random frog − partial least squares regression (iRF-PLSR) had the best predictive ability among all simplified models, the number of wavelengths used in the simplified model was reduced by 85.45% compared with the full-wavelength model. In contrast, the model performance was improved with RP, RMSEP, and RPD of 0.948, 0.392 (lg CFU/g) and 2.970, respectively. The combination of a rational spectral acquisition setup and a data processing methodology, the miniaturized spectrometer showed competitive results with the complex detection system in predicting meat TVC.