AP Photo/Eric Risberg
The patent, named "Management, Replacement and Removal of Explicit Lyrics during Audio Playback" was filed by Apple in September 2014 and outlines a system for detecting and marking explicit sections of tracks and then editing them to make them family-friendly.
Apple says in the patent that the system could replace swear words with a beeping noise, or it could use non-explicit lyrics instead.
The system patented by Apple also describes technology that could detect the music behind the lyrics and simply remove the swear words, generating background music so that the track continues seamlessly.
Apple
Apple's patent isn't limited to music. It specifically mentions audio books as well. Apple could, in theory, edit out swear words or sex scenes in books to make them suitable for children. When analysing songs or audio books, the system described in the patent would compare the lyrics to a library of explicit terms in order to identify swear words.
There's no indication that Apple is actually going to start censoring music on iTunes or its new streaming service Apple Music any time soon. Beats 1, its free, online radio station, is already restricted to non-explicit edits of songs. Apple also patents lots of different kinds of technology that rarely make it to production.
However, Apple is known to have strict rules around the kind of content it allows on the App Store and iTunes. Steve Jobs sent an email in 2010 that made it clear he wouldn't allow porn on the App Store. "Folks who want porn can buy an Android phone," he said. Apple also banned a dictionary app from the App Store after it included definitions for swear words.