On the face of it, you wonder why any record company would ever release a comedy album. For one thing, the essence of good comedy is spontaneity, the unexpected; and once you've heard a record a few times, you know the jokes. For another, comedy is not like background music. In order to appreciate humor, you've got to listen to it.

Besides, comedians rely as much on body language as witty repartee. Chevy Chase falls all over a stage, Lily Tomlin scrunches her face into character, Buddy Hackett and Jonathan Winters get that manic gleam in their eyes. You've got to see comics to laugh at them, right?

Wrong. The reason for the success of Steve Martin generally, and of the record "A Wild and Crazy Guy" in particular, is the rise of a television mentality: Steve Martin is the funniest boob on the tube, so many folks think that his albums must naturally be a riot. But video is not audio and the difference is obvious here.

Another possibility for Martin's success is television's ability to offer instant identification. Martin's act is now our act and we think we're funny. He has so successfully imbedded himself in the national consciousness that everybody does a Steve Martin routine. Including Steve Martin, who on this album exploits his audience's familiarity with his work at the expense of artistic progress.

Martin practices what could be termed a comedy of anticipation. His best bits no longer need to be spoken at all since we know they're coming. We're laughing at just the thought of his punchlines.

There is no question that Martin's classic bits are funny. But after you know the lyrics to "King Tut," after you've heard "Excuuuuuse me!" for the 800th time, after you've listened to him describe himself as a "wild and crazy guy" for a week straight on the Johnny Carson show, the lines lose their spark.

We laugh all right, but we also laugh when Uncle Harry says he is "looking for the foxes" or when someone at the office party screams "Well, excuse me!" That laughter should not be confused with the yuks that come from true ability. Martin has talent, but it's not in evidence on "A Wild and Crazy Guy."

Recorded live at The Boarding House in San Francisco and Denver's Red Rocks (Martin's home turf), the album is poorly edited ("King Tut"was obviously tacked on to the end) and contains no surprises. All the Martin "biggies" are here, but the disc format strips him of his props and rubber-like facial expressions. Forced to rely solely on the strength of his material, he comes across as just another shouter trying to make us think that lunacy is hysterical.

Where Martin's album is a perfect example of the comedy of anticipation, Richard Pryor represents the comedy of confrontation. Pryor is not easy. He berates just about everyone. His material is often more inflammatory than funny.

On his new album, "Wanted" (Warner Bros., 2 BSK 3364), Pryor talks about sex and drugs, blacks and whites, Jim Brown and Leon Spinks, children and adults. It is a two-record set recorded live in New York, Chicago and Washington (probably during Pryor's four-night engagement at the Kennedy Center though the jacket does not list the exact locations) and his audiences are enthusiastic, but on their guard. And rightly so.

Pryor's recent Capitol Centre benefit appearance was part of his penance for waving a loaded pistol at his wife and some friends. He once infuriated a star-studded California crowd by launching into a self-serving tirade. He always seems to be one step from losing control.

Yet it's this unpredictability, this high-wire act on the edge of sanity, that makes Pryor so vital. He's like an updated Lenny Bruce. His antics are designed to say something meaningful in a funny way, and if one of those elements must go, it's usually the humor.

Obviously, not all of "Wanted" is a treatise on the state of the planet. "Kids" is pretty tame, sounding like something Bill Cosby might do, and "Leon Spinks" is fairly obvious. Even there, though, Pryor goes further than other comics who have razzed the former champ. It's also significant that on a set of records that runs nearly an hour and a half, only six minutes are considered by Warner Bros. to be suitable for radio airplay. Part of the reason is that Pryor has trouble constructing a sentence without an obscenity.

Bad taste does not necessarily make good comedy. But it usually shows a willingness to take chances, to experiment with people's fears and foibles. Pryor takes those chances. He will probably never breathe the rarefied atmosphere of an album sales chart's Top 10. But his observations on "Wanted" make far more important comedy than anything on "A Wild and Crazy Guy." It's Pryor that's truly wild. You can hear the difference.