A North Carolina man used artificial intelligence to create hundreds of thousands of fake songs by fake bands, then put them on streaming services where they were enjoyed by an audience of fake listeners, prosecutors said.

Penny by penny, he collected a very real $10 million, they said when they charged him with fraud.

The man, Michael Smith, 52, was accused in a federal indictment unsealed on Wednesday of stealing royalty payments from digital streaming platforms for seven years. Mr. Smith, a flesh-and-blood musician, produced A.I.-generated music and played it billions of times using bots he had programmed, according to the indictment.

The supposed artists had names like “Callous Post,” “Calorie Screams” and “Calvinistic Dust” and produced tunes like “Zygotic Washstands,” “Zymotechnical” and “Zygophyllum” that were top performers on Amazon Music, Apple Music and Spotify, according to the charges.

“Smith stole millions in royalties that should have been paid to musicians, songwriters, and other rights holders whose songs were legitimately streamed,” Damian Williams, the U.S. attorney for the Southern District of New York, said in a statement on Wednesday.

Mr. Smith was arrested on Wednesday and faces charges including wire fraud and money laundering conspiracy. If convicted, he faces a maximum of 20 years in prison for each charge.

Mr. Smith’s lawyer could not immediately be identified on Wednesday. Mr. Smith could not immediately be reached at a number listed under his name in Cornelius, N.C., near Charlotte.