CarDiag: the open-source AI that diagnoses car faults just by listening to the engine

CarDiag: the open-source AI that diagnoses car faults just by listening to the engine
"CarDiag" is an open-source project that diagnoses car faults based on the sound of the engine. It is installed as a command-line tool, it also runs as a web application and its trained model weighs around 100 kilobytes. The interesting thing is not that it always gets it right – it doesn't – but that it honestly publishes how much it gets right, when it fails and why.
The flow is easy to use and much more complicated on the inside. The user records the engine with the phone and passes the audio through the cardiag diagnose command. The system responds three things: if something sounds wrong, in which area of the car to look for the problem – among six: engine, accessories, exhaust, transmission, suspension-steering and brakes-wheels – and a short list of probable parts. When the evidence is not enough, it returns "uncertain" instead of inventing an answer.
You may also likeLas televisiones chinas apuestan por las series creadas con IA
How it works
The first stage is not a model, but a cleaning cascade. Internet audios come with voice, music, wind and street noise, so the system applies voice activity detection, energy filters and spectral flatness, a CLAP-based musical gate and separation of sources with Demucs. The goal is to isolate a short stretch where mechanical sound dominates. Fragments longer than ten seconds are divided into windows so that the encoder does not silently truncate them.
The second stage uses CLAP, Microsoft's audio and language model, in a frozen version: it is never trained. Each clean section becomes a vector of 512 dimensions. Linear classifiers are trained on these vectors – logistic regression with class balancing and temperature calibration – one to detect faults, another to locate the area, another to order the parts and another to distinguish between internal engine and undercarriage problems.
That design is deliberately crude. There's no fine-tuning, there's no deep networking, there's no millions of parameters. If the system works, it works because the information is actually present in the CLAP representations, not because a large model has memorized the training set. The author describes the project as a "recipe" transferable to any other audio classification problem with dirty data.
You may also likeBYD decidirá en 18-24 meses si construye su tercera fábrica en Europa, con España en la short list
The numbers, without make-up
The evaluation was done with cross-validation grouped by video on 1,031 groups, to prevent fragments of the same video from appearing in training and testing. The result to distinguish healthy motor from motor failure is an AUROC of 0.794, with a confidence interval of 0.762 to 0.825, and a balanced accuracy of 0.726. The permutation test gives p = 0.0005.
It is worth clarifying a point that is often confused: 0.79 is AUROC, not 79% of correct answers. The AUROC measures the ability to order cases; with unbalanced classes, balanced accuracy is the most demanding metric, and there the system is around 73%. To locate the correct area between the first three options, it is close to 75% correct, and for the specific piece, between 45% and 65%, three to four times above chance.
There are two pieces of information that raise the credibility of the project. The first is that the model is calibrated—expected calibration error of 0.04—so when it says "uncertain" it is usually right to be suspicious. The second is a control experiment: the same recipe, trained and tested on a clean set of 216 engine recordings, achieves an AUROC of 0.93. The difference between 0.79 and 0.93 is not a defect in the method, but in the phone audio captured on the street.
You may also likeBYD decidirá en 18-24 meses si construye su tercera fábrica en Europa, con España en la short list
The author also publishes the failure: the "knock" detector works with 0.99 inside the distribution, but collapses to 0.56 – a random level – when tested with real engine knocks. The reason is that "knock" is an acoustic label used by about 24 different parts and the training was loaded with chassis knocks.
What is it for?
It does not replace a mechanic. A professional has a stethoscope, hands, an OBD-II port and a trained ear next to the engine; the model has a compressed clip, often with wind and music on top. What it offers is cheap guidance before paying for a tow truck or an overhaul: if the noise comes from the exhaust or suspension, if it is convenient to stop now or if you can get to the workshop.
The project joins other open tools for assisted diagnostics, such as Open Mechanic, which uses Claude's API on OBD-II data, and SonicFix, with Gemini's multimodal analysis. None of them replaces the physical check, but they all aim at the same thing: turning the phone into the first filter of automotive diagnostics.
You may also likeBYD decidirá en 18-24 meses si construye su tercera fábrica en Europa, con España en la short list
Image credit: adam-s/car-diagnosis