are there any tools or methods for recognize/detect codec

for example, I have .raw file, which is a audio file encoded with a certain codec
I want to know the codec details, for example, if the codec is iLBC, I want to know whether its frame size is 20 ms or 30ms;if the codec is G729, I want to know whether it is G729A,G729B or G729E…

thank you!

Not sure either of these will give you the info, but they are free

If the coder left behind metadata inside the file, then you win. Sometimes you can read those with a data ripper or viewer. Most don’t and the inspection software tries to derive the information from what’s there. That’s only a guess.

oh, they cant
thank you though

Most file formats identify themselves by data in a “header” section of the file. RAW data is what it says, it is just the data and there is no header, so all it appears as to an application is a long string of numbers. Unless the application already knows (because you tell it, or because the application is specifically designed to work that that type of data) how to decode the string of numbers it has no way of knowing what the numbers mean or how to decode them.

The two ways of determining the format of RAW files are: 1) read the specification of the program that created the file, 2) trial and error - keep trying different formats until you find one that works.

Audacity 1.3.12 supports several of the most common RAW file data types through “Import RAW”, but you still need to select which decoding options Audacity should use, and there are many other possible RAW formats that are not supported by Audacity.