Important: This notebook is not guaranteed to work without modification. It’s a while since I wrote this and haven’t tested it since. For a summary of this project see Engine knock detection AI part 5/5

Background

The inspiration for this project comes from the presentation of fast.ai course alumni projects by Jeremy Howard in some of the first lessons of the third installment of Practical Deep Learning for Coders where training an image classifier using spectrograms to identify sounds is mentioned.

What this means in simpler terms is that an image classifying algorithm is presented with a series of pictures labeled with which class or case they represent. Each picture represents what that sound looks like if one were to plot the sound intensities at different frequencies as a function of time.

Method

A set of recordings of both knocking and healthy sounding engines has first to be aquired in order to create a training set of spectrograms. I've chosen to create two playlists on youtube of videos specifically depicting car engines, one for each case. I made sure to just include petrol engines since my suspicion was that the sound of a diesel engine might throw things off.

As a non car mechanic I made that assumption based on the idea that if I could distinguish a well running engine from a knocking one then the resulting model could do it too. I found that I had some trouble making the distinction with some of the cold started diesels I listened to.

Downloading audio files

After creating the playlists Google Drive is mounted to store the intermediary sound files.

from google.colab import drive
drive.mount('/content/drive')

Go to this URL in a browser: https://accounts.google.com/o/oauth2/auth?client_id=947318989803-6bn6qk8qdgf4n4g3pfee6491hc0brc4i.apps.googleusercontent.com&redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob&scope=email%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fdocs.test%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fdrive%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fdrive.photos.readonly%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fpeopleapi.readonly&response_type=code

Enter your authorization code:
··········
Mounted at /content/drive

The youtube-dl python package is installed and the soundtrack from each of the videos is downloaded.

!pip install --upgrade youtube-dl
Collecting youtube-dl
  Downloading https://files.pythonhosted.org/packages/42/9c/9e13d8c2cb43dc158ede19e5dade9037fa5ee321e70494a3960d62f9242b/youtube_dl-2019.9.12.1-py2.py3-none-any.whl (1.8MB)
     |████████████████████████████████| 1.8MB 2.8MB/s 
Installing collected packages: youtube-dl
Successfully installed youtube-dl-2019.9.12.1
import youtube_dl
ydl = youtube_dl.YoutubeDL({'outtmpl': '%(id)s%(ext)s'})

ydl_opts = {
    'format': 'bestaudio/best',
    'postprocessors': [{
        'key': 'FFmpegExtractAudio',
        'preferredcodec': 'mp3',
        'preferredquality': '192',
    }],
}
with youtube_dl.YoutubeDL(ydl_opts) as ydl:
    ydl.download(['https://www.youtube.com/playlist?list=PL9R1Zswn-XPCh3A3bV9Vnf7ui9YCZWo9w'])

[youtube:playlist] PL9R1Zswn-XPCh3A3bV9Vnf7ui9YCZWo9w: Downloading webpage
[download] Downloading playlist: engine_normal
[youtube:playlist] playlist engine_normal: Downloading 15 videos
[download] Downloading video 1 of 15
[youtube] ho38ZYkQJxs: Downloading webpage
[youtube] ho38ZYkQJxs: Downloading video info webpage
[download] Destination: 2003 toyota corolla engine sound-ho38ZYkQJxs.webm
[download] 100% of 2.44MiB in 00:00
[ffmpeg] Destination: 2003 toyota corolla engine sound-ho38ZYkQJxs.mp3
Deleting original file 2003 toyota corolla engine sound-ho38ZYkQJxs.webm (pass -k to keep)
[download] Downloading video 2 of 15
[youtube] Eky3PMh76gY: Downloading webpage
[youtube] Eky3PMh76gY: Downloading video info webpage
[youtube] Eky3PMh76gY: Downloading MPD manifest
[dashsegments] Total fragments: 8
[download] Destination: 2017 Hyundai Elantra SE 2.0L 4 Cylinder - Normal Engine Running Noises-Eky3PMh76gY.webm
[download] 100% of 1.04MiB in 00:02
[ffmpeg] Destination: 2017 Hyundai Elantra SE 2.0L 4 Cylinder - Normal Engine Running Noises-Eky3PMh76gY.mp3
Deleting original file 2017 Hyundai Elantra SE 2.0L 4 Cylinder - Normal Engine Running Noises-Eky3PMh76gY.webm (pass -k to keep)
[download] Downloading video 3 of 15
[youtube] YiwsC_UlDFY: Downloading webpage
[youtube] YiwsC_UlDFY: Downloading video info webpage
[youtube] YiwsC_UlDFY: Downloading MPD manifest
[dashsegments] Total fragments: 3
[download] Destination: Nissan Frontier 4L v6 engine sound idle-YiwsC_UlDFY.webm
[download] 100% of 195.58KiB in 00:01
[ffmpeg] Destination: Nissan Frontier 4L v6 engine sound idle-YiwsC_UlDFY.mp3
Deleting original file Nissan Frontier 4L v6 engine sound idle-YiwsC_UlDFY.webm (pass -k to keep)
[download] Downloading video 4 of 15
[youtube] uumxLAHbDsE: Downloading webpage
[youtube] uumxLAHbDsE: Downloading video info webpage
[download] Destination: Volvo S60 2.0T - Normal engine sound-uumxLAHbDsE.webm
[download] 100% of 428.44KiB in 00:00
[ffmpeg] Destination: Volvo S60 2.0T - Normal engine sound-uumxLAHbDsE.mp3
Deleting original file Volvo S60 2.0T - Normal engine sound-uumxLAHbDsE.webm (pass -k to keep)
[download] Downloading video 5 of 15
[youtube] 8cXmy_U0_28: Downloading webpage
[youtube] 8cXmy_U0_28: Downloading video info webpage
[download] Destination: Mini R56S normal engine sound-8cXmy_U0_28.webm
[download] 100% of 526.86KiB in 00:00
[ffmpeg] Destination: Mini R56S normal engine sound-8cXmy_U0_28.mp3
Deleting original file Mini R56S normal engine sound-8cXmy_U0_28.webm (pass -k to keep)
[download] Downloading video 6 of 15
[youtube] nGQcC7giMkU: Downloading webpage
[youtube] nGQcC7giMkU: Downloading video info webpage
[download] Destination: 2016 Kia Rio 1.6L V4 Engine - Normal Running Noises _ Sounds-nGQcC7giMkU.m4a
[download] 100% of 1.05MiB in 00:00
[ffmpeg] Correcting container in "2016 Kia Rio 1.6L V4 Engine - Normal Running Noises _ Sounds-nGQcC7giMkU.m4a"
[ffmpeg] Destination: 2016 Kia Rio 1.6L V4 Engine - Normal Running Noises _ Sounds-nGQcC7giMkU.mp3
Deleting original file 2016 Kia Rio 1.6L V4 Engine - Normal Running Noises _ Sounds-nGQcC7giMkU.m4a (pass -k to keep)
[download] Downloading video 7 of 15
[youtube] 2EQcfJAU7IM: Downloading webpage
[youtube] 2EQcfJAU7IM: Downloading video info webpage
[youtube] 2EQcfJAU7IM: Downloading MPD manifest
[dashsegments] Total fragments: 8
[download] Destination: 2017 Kia Rio 1.6L 4 Cylinder GDI Engine - Normal Engine Sounds-2EQcfJAU7IM.webm
[download] 100% of 1.02MiB in 00:02
[ffmpeg] Destination: 2017 Kia Rio 1.6L 4 Cylinder GDI Engine - Normal Engine Sounds-2EQcfJAU7IM.mp3
Deleting original file 2017 Kia Rio 1.6L 4 Cylinder GDI Engine - Normal Engine Sounds-2EQcfJAU7IM.webm (pass -k to keep)
[download] Downloading video 8 of 15
[youtube] PRO0HgD9qx4: Downloading webpage
[youtube] PRO0HgD9qx4: Downloading video info webpage
[youtube] PRO0HgD9qx4: Downloading MPD manifest
[dashsegments] Total fragments: 14
[download] Destination: 2017 Nissan Versa Note - Normal Engine Running Noises - 1.6L Engine-PRO0HgD9qx4.m4a
[download] 100% of 949.79KiB in 00:01
[ffmpeg] Correcting container in "2017 Nissan Versa Note - Normal Engine Running Noises - 1.6L Engine-PRO0HgD9qx4.m4a"
[ffmpeg] Destination: 2017 Nissan Versa Note - Normal Engine Running Noises - 1.6L Engine-PRO0HgD9qx4.mp3
Deleting original file 2017 Nissan Versa Note - Normal Engine Running Noises - 1.6L Engine-PRO0HgD9qx4.m4a (pass -k to keep)
[download] Downloading video 9 of 15
[youtube] 6GPgodkLSkQ: Downloading webpage
[youtube] 6GPgodkLSkQ: Downloading video info webpage
[download] Destination: Listen Toyota 2.4 VVT-i engine sound, when engine is very OK. Years 2002 to 2015-6GPgodkLSkQ.webm
[download] 100% of 1.93MiB in 00:00
[ffmpeg] Destination: Listen Toyota 2.4 VVT-i engine sound, when engine is very OK. Years 2002 to 2015-6GPgodkLSkQ.mp3
Deleting original file Listen Toyota 2.4 VVT-i engine sound, when engine is very OK. Years 2002 to 2015-6GPgodkLSkQ.webm (pass -k to keep)
[download] Downloading video 10 of 15
[youtube] pLmX2ws7znE: Downloading webpage
[youtube] pLmX2ws7znE: Downloading video info webpage
[youtube] pLmX2ws7znE: Downloading MPD manifest
[dashsegments] Total fragments: 4
[download] Destination: 2018 Hyundai Tucson 2.0 GDI Nu Engine Sound Normal-pLmX2ws7znE.m4a
[download] 100% of 451.64KiB in 00:00
[ffmpeg] Correcting container in "2018 Hyundai Tucson 2.0 GDI Nu Engine Sound Normal-pLmX2ws7znE.m4a"
[ffmpeg] Destination: 2018 Hyundai Tucson 2.0 GDI Nu Engine Sound Normal-pLmX2ws7znE.mp3
Deleting original file 2018 Hyundai Tucson 2.0 GDI Nu Engine Sound Normal-pLmX2ws7znE.m4a (pass -k to keep)
[download] Downloading video 11 of 15
[youtube] mOFcfwLTNkY: Downloading webpage
[youtube] mOFcfwLTNkY: Downloading video info webpage
[download] Destination: 3.2 fsi engine sound cold (normal or not)-mOFcfwLTNkY.m4a
[download] 100% of 928.43KiB in 00:00
[ffmpeg] Correcting container in "3.2 fsi engine sound cold (normal or not)-mOFcfwLTNkY.m4a"
[ffmpeg] Destination: 3.2 fsi engine sound cold (normal or not)-mOFcfwLTNkY.mp3
Deleting original file 3.2 fsi engine sound cold (normal or not)-mOFcfwLTNkY.m4a (pass -k to keep)
[download] Downloading video 12 of 15
[youtube] 5q1uATQu8zg: Downloading webpage
[youtube] 5q1uATQu8zg: Downloading video info webpage
[youtube] 5q1uATQu8zg: Downloading MPD manifest
[dashsegments] Total fragments: 13
[download] Destination: Normal Engine Idle Sound Cold & Warm - 2006 Nissan Sentra-5q1uATQu8zg.webm
[download] 100% of 1.86MiB in 00:07
[ffmpeg] Destination: Normal Engine Idle Sound Cold & Warm - 2006 Nissan Sentra-5q1uATQu8zg.mp3
Deleting original file Normal Engine Idle Sound Cold & Warm - 2006 Nissan Sentra-5q1uATQu8zg.webm (pass -k to keep)
[download] Downloading video 13 of 15
[youtube] 8BOtWY3RobA: Downloading webpage
[youtube] 8BOtWY3RobA: Downloading video info webpage
[download] Destination: 1996 Subaru Outback, Normal Engine Sound-8BOtWY3RobA.webm
[download] 100% of 956.87KiB in 00:00
[ffmpeg] Destination: 1996 Subaru Outback, Normal Engine Sound-8BOtWY3RobA.mp3
Deleting original file 1996 Subaru Outback, Normal Engine Sound-8BOtWY3RobA.webm (pass -k to keep)
[download] Downloading video 14 of 15
[youtube] bkPtY1pW82Y: Downloading webpage
[youtube] bkPtY1pW82Y: Downloading video info webpage
[youtube] bkPtY1pW82Y: Downloading MPD manifest
[dashsegments] Total fragments: 15
[download] Destination: Bmw f30 Noisy Engine Sound-bkPtY1pW82Y.m4a
[download] 100% of 1.01MiB in 00:01
[ffmpeg] Correcting container in "Bmw f30 Noisy Engine Sound-bkPtY1pW82Y.m4a"
[ffmpeg] Destination: Bmw f30 Noisy Engine Sound-bkPtY1pW82Y.mp3
Deleting original file Bmw f30 Noisy Engine Sound-bkPtY1pW82Y.m4a (pass -k to keep)
[download] Downloading video 15 of 15
[youtube] nSB65kClSXM: Downloading webpage
[youtube] nSB65kClSXM: Downloading video info webpage
[youtube] nSB65kClSXM: Downloading MPD manifest
[dashsegments] Total fragments: 4
[download] Destination: 2016-2018 Toyota Tacoma Loud Engine sound is Normal-nSB65kClSXM.webm
[download] 100% of 382.73KiB in 00:01
[ffmpeg] Destination: 2016-2018 Toyota Tacoma Loud Engine sound is Normal-nSB65kClSXM.mp3
Deleting original file 2016-2018 Toyota Tacoma Loud Engine sound is Normal-nSB65kClSXM.webm (pass -k to keep)
[download] Finished downloading playlist: engine_normal

!rm -rf ./sample_data

Checking to see that all the expected files are present.

!ls *.mp3
'1996 Subaru Outback, Normal Engine Sound-8BOtWY3RobA.mp3'
'2003 toyota corolla engine sound-ho38ZYkQJxs.mp3'
'2016-2018 Toyota Tacoma Loud Engine sound is Normal-nSB65kClSXM.mp3'
'2016 Kia Rio 1.6L V4 Engine - Normal Running Noises _ Sounds-nGQcC7giMkU.mp3'
'2017 Hyundai Elantra SE 2.0L 4 Cylinder - Normal Engine Running Noises-Eky3PMh76gY.mp3'
'2017 Kia Rio 1.6L 4 Cylinder GDI Engine - Normal Engine Sounds-2EQcfJAU7IM.mp3'
'2017 Nissan Versa Note - Normal Engine Running Noises - 1.6L Engine-PRO0HgD9qx4.mp3'
'2018 Hyundai Tucson 2.0 GDI Nu Engine Sound Normal-pLmX2ws7znE.mp3'
'3.2 fsi engine sound cold (normal or not)-mOFcfwLTNkY.mp3'
'Bmw f30 Noisy Engine Sound-bkPtY1pW82Y.mp3'
'Listen Toyota 2.4 VVT-i engine sound, when engine is very OK. Years 2002 to 2015-6GPgodkLSkQ.mp3'
'Mini R56S normal engine sound-8cXmy_U0_28.mp3'
'Nissan Frontier 4L v6 engine sound idle-YiwsC_UlDFY.mp3'
'Normal Engine Idle Sound Cold & Warm - 2006 Nissan Sentra-5q1uATQu8zg.mp3'
'Volvo S60 2.0T - Normal engine sound-uumxLAHbDsE.mp3'

Moving the sound files from the Colab instance to a folder on Google Drive.

!mv *.mp3 /content/drive/My\ Drive/Colab\ Notebooks/fast.ai/KnockKnock/data/normal/

Rinse and repeat for the other playlist.

ydl_opts = {
    'format': 'bestaudio/best',
    'postprocessors': [{
        'key': 'FFmpegExtractAudio',
        'preferredcodec': 'mp3',
        'preferredquality': '192',
    }],
}
with youtube_dl.YoutubeDL(ydl_opts) as ydl:
    ydl.download(['https://www.youtube.com/playlist?list=PL9R1Zswn-XPCnpyXQLRPYVJr4BXJUYie8'])

[youtube:playlist] PL9R1Zswn-XPCnpyXQLRPYVJr4BXJUYie8: Downloading webpage
[download] Downloading playlist: engine_knocking
[youtube:playlist] playlist engine_knocking: Downloading 15 videos
[download] Downloading video 1 of 15
[youtube] JIOdS7XbHys: Downloading webpage
[youtube] JIOdS7XbHys: Downloading video info webpage
[download] Destination: How To Diagnose An Engine Knock.MP4-JIOdS7XbHys.webm
[download] 100% of 3.87MiB in 00:00
[ffmpeg] Destination: How To Diagnose An Engine Knock.MP4-JIOdS7XbHys.mp3
Deleting original file How To Diagnose An Engine Knock.MP4-JIOdS7XbHys.webm (pass -k to keep)
[download] Downloading video 2 of 15
[youtube] gBA1zC5duuI: Downloading webpage
[youtube] gBA1zC5duuI: Downloading video info webpage
[download] Destination: Engine Noise Diagnosis-Part 1-gBA1zC5duuI.webm
[download] 100% of 17.50MiB in 00:00
[ffmpeg] Destination: Engine Noise Diagnosis-Part 1-gBA1zC5duuI.mp3
Deleting original file Engine Noise Diagnosis-Part 1-gBA1zC5duuI.webm (pass -k to keep)
[download] Downloading video 3 of 15
[youtube] TjtNcBD4Uwk: Downloading webpage
[youtube] TjtNcBD4Uwk: Downloading video info webpage
[download] Destination: Engine Noise Diagnosis Part 2- The Answer Revealed!-TjtNcBD4Uwk.webm
[download] 100% of 8.50MiB in 00:00
[ffmpeg] Destination: Engine Noise Diagnosis Part 2- The Answer Revealed!-TjtNcBD4Uwk.mp3
Deleting original file Engine Noise Diagnosis Part 2- The Answer Revealed!-TjtNcBD4Uwk.webm (pass -k to keep)
[download] Downloading video 4 of 15
[youtube] wf8e_Ivi72Q: Downloading webpage
[youtube] wf8e_Ivi72Q: Downloading video info webpage
[download] Destination: Engine Knock Diagnosis-wf8e_Ivi72Q.webm
[download] 100% of 2.43MiB in 00:00
[ffmpeg] Destination: Engine Knock Diagnosis-wf8e_Ivi72Q.mp3
Deleting original file Engine Knock Diagnosis-wf8e_Ivi72Q.webm (pass -k to keep)
[download] Downloading video 5 of 15
[youtube] kBWXxWD7g30: Downloading webpage
[youtube] kBWXxWD7g30: Downloading video info webpage
[download] Destination: Engine knocking sounds-kBWXxWD7g30.webm
[download] 100% of 571.70KiB in 00:00
[ffmpeg] Destination: Engine knocking sounds-kBWXxWD7g30.mp3
Deleting original file Engine knocking sounds-kBWXxWD7g30.webm (pass -k to keep)
[download] Downloading video 6 of 15
[youtube] IRcZo89RJzI: Downloading webpage
[youtube] IRcZo89RJzI: Downloading video info webpage
[youtube] IRcZo89RJzI: Downloading MPD manifest
[dashsegments] Total fragments: 39
[download] Destination: Ticking or Knocking Engine-IRcZo89RJzI.m4a
[download] 100% of 2.83MiB in 00:03
[ffmpeg] Correcting container in "Ticking or Knocking Engine-IRcZo89RJzI.m4a"
[ffmpeg] Destination: Ticking or Knocking Engine-IRcZo89RJzI.mp3
Deleting original file Ticking or Knocking Engine-IRcZo89RJzI.m4a (pass -k to keep)
[download] Downloading video 7 of 15
[youtube] Zh8e9MGam8Q: Downloading webpage
[youtube] Zh8e9MGam8Q: Downloading video info webpage
[download] Destination: Engine Knocking-Zh8e9MGam8Q.m4a
[download] 100% of 1.01MiB in 00:00
[ffmpeg] Correcting container in "Engine Knocking-Zh8e9MGam8Q.m4a"
[ffmpeg] Destination: Engine Knocking-Zh8e9MGam8Q.mp3
Deleting original file Engine Knocking-Zh8e9MGam8Q.m4a (pass -k to keep)
[download] Downloading video 8 of 15
[youtube] lGC51mIQylk: Downloading webpage
[youtube] lGC51mIQylk: Downloading video info webpage
[download] Destination: What Does Detonation _ Spark Knock Sound Like-lGC51mIQylk.m4a
[download] 100% of 2.04MiB in 00:00
[ffmpeg] Correcting container in "What Does Detonation _ Spark Knock Sound Like-lGC51mIQylk.m4a"
[ffmpeg] Destination: What Does Detonation _ Spark Knock Sound Like-lGC51mIQylk.mp3
Deleting original file What Does Detonation _ Spark Knock Sound Like-lGC51mIQylk.m4a (pass -k to keep)
[download] Downloading video 9 of 15
[youtube] rk_iOIumShQ: Downloading webpage
[youtube] rk_iOIumShQ: Downloading video info webpage
[download] Destination: Engine knocking sound-rk_iOIumShQ.m4a
[download] 100% of 763.43KiB in 00:00
[ffmpeg] Correcting container in "Engine knocking sound-rk_iOIumShQ.m4a"
[ffmpeg] Destination: Engine knocking sound-rk_iOIumShQ.mp3
Deleting original file Engine knocking sound-rk_iOIumShQ.m4a (pass -k to keep)
[download] Downloading video 10 of 15
[youtube] n0jys2TEXDk: Downloading webpage
[youtube] n0jys2TEXDk: Downloading video info webpage
[download] Destination: Ford Vehicle Noises - #4 Tapping Knocking Noise 2.5L Engines-n0jys2TEXDk.webm
[download] 100% of 3.72MiB in 00:00
[ffmpeg] Destination: Ford Vehicle Noises - #4 Tapping Knocking Noise 2.5L Engines-n0jys2TEXDk.mp3
Deleting original file Ford Vehicle Noises - #4 Tapping Knocking Noise 2.5L Engines-n0jys2TEXDk.webm (pass -k to keep)
[download] Downloading video 11 of 15
[youtube] e79c_-_hVa8: Downloading webpage
[youtube] e79c_-_hVa8: Downloading video info webpage
[youtube] e79c_-_hVa8: Downloading MPD manifest
[dashsegments] Total fragments: 7
[download] Destination: Spun _ Knocking Rod Bearing Noise-e79c_-_hVa8.webm
[download] 100% of 1.02MiB in 00:00
[ffmpeg] Destination: Spun _ Knocking Rod Bearing Noise-e79c_-_hVa8.mp3
Deleting original file Spun _ Knocking Rod Bearing Noise-e79c_-_hVa8.webm (pass -k to keep)
[download] Downloading video 12 of 15
[youtube] rFuLwzb_VmE: Downloading webpage
[youtube] rFuLwzb_VmE: Downloading video info webpage
[download] Destination: Spark Knock or engine ping-rFuLwzb_VmE.m4a
[download] 100% of 365.87KiB in 00:00
[ffmpeg] Correcting container in "Spark Knock or engine ping-rFuLwzb_VmE.m4a"
[ffmpeg] Destination: Spark Knock or engine ping-rFuLwzb_VmE.mp3
Deleting original file Spark Knock or engine ping-rFuLwzb_VmE.m4a (pass -k to keep)
[download] Downloading video 13 of 15
[youtube] wmtBqNnnvrs: Downloading webpage
[youtube] wmtBqNnnvrs: Downloading video info webpage
[youtube] wmtBqNnnvrs: Downloading MPD manifest
[dashsegments] Total fragments: 20
[download] Destination: Ever Wonder What Rod Knock Sounds Like-wmtBqNnnvrs.webm
[download] 100% of 3.18MiB in 00:05
[ffmpeg] Destination: Ever Wonder What Rod Knock Sounds Like-wmtBqNnnvrs.mp3
Deleting original file Ever Wonder What Rod Knock Sounds Like-wmtBqNnnvrs.webm (pass -k to keep)
[download] Downloading video 14 of 15
[youtube] 8EZEwMqJj1U: Downloading webpage
[youtube] 8EZEwMqJj1U: Downloading video info webpage
[download] Destination: Engine knocking_Pinging sound at idle...-8EZEwMqJj1U.webm
[download] 100% of 1.35MiB in 00:00
[ffmpeg] Destination: Engine knocking_Pinging sound at idle...-8EZEwMqJj1U.mp3
Deleting original file Engine knocking_Pinging sound at idle...-8EZEwMqJj1U.webm (pass -k to keep)
[download] Downloading video 15 of 15
[youtube] uRtyPbyomxQ: Downloading webpage
[youtube] uRtyPbyomxQ: Downloading video info webpage
[download] Destination: HYUNDAI ELANTRA ENGINE KNOCK TICKING NOISE-uRtyPbyomxQ.webm
[download] 100% of 5.25MiB in 00:00
[ffmpeg] Destination: HYUNDAI ELANTRA ENGINE KNOCK TICKING NOISE-uRtyPbyomxQ.mp3
Deleting original file HYUNDAI ELANTRA ENGINE KNOCK TICKING NOISE-uRtyPbyomxQ.webm (pass -k to keep)
[download] Finished downloading playlist: engine_knocking

!mv *.mp3 /content/drive/My\ Drive/Colab\ Notebooks/fast.ai/KnockKnock/data/knocking/

Slicing audio files

The 15 mp3 files were then sliced into 10 second clips in Audacity. This could probably have been done programmatically but as trivial as the task initally may sound there would most likely have been complications. The videos do not only show the car running with the hood popped up. There's some talking, explaining and fumbling around in quite a few of them.