DOI: 10.3390/agriengineering8090395 ISSN: 2624-7402

Non-Destructive Coconut Maturity Classification from Tapping Sounds Using Frozen CLAP Embeddings and Multi-Event Aggregation

Ignacio Sánchez-Gendriz, Victor N. Gomes, Luiz Affonso Guedes

Acoustic sensing is a valuable approach for non-destructive fruit-quality evaluation. For coconut maturity determination, acoustic responses elicited by tapping may convey relevant information; however, recording-level analyses may not fully exploit individual tapping observations or the repeated measurements available for each fruit. This study developed a hierarchical framework for classification at the candidate tapping-event and fruit levels. A publicly available dataset comprising immature, mature, and overmature coconuts recorded at three ridge positions was analyzed. Candidate tapping-event segments were selected using a band-limited energy criterion and represented using conventional Mel-spectral representations or frozen embeddings extracted from a pretrained Contrastive Language–Audio Pretraining (CLAP) model. Within this representation framework, multiple conventional machine-learning and deep-learning configurations were evaluated. Fruit-disjoint partitioning prevented observations from the same coconut from occurring in different model-development and evaluation subsets. Event-level predictions were aggregated across tapping events and ridge positions by majority voting. The configuration combining CLAP embeddings with a regularized multilayer perceptron (MLP) achieved the highest balanced accuracies among the evaluated configurations, reaching 64.72% at the event level and 93.06% at the fruit level. With the downstream MLP held constant, CLAP exceeded the Mel-spectral controls by 8.89–10.18 percentage points at the event level and by 34.73–38.89 percentage points at the fruit level. For the CLAP–MLP configuration, fruit-level balanced accuracy was 28.34 percentage points higher than event-level balanced accuracy (93.06% versus 64.72%). These results suggest that general-purpose pretrained audio embeddings retain information relevant to coconut maturity discrimination and that combining repeated observations can substantially improve fruit-level decisions when event-level predictions are sufficiently informative.