AI for miscellaneous tasks

Finding some noise in an audio file with Claude Code

During a recent podcast recording that ran for over 1.5 hours, we had an incident where the automatic gain control on one of the participants’ systems ratcheted way up, amplifying some fan noise. As we pretty much record and post, I typically do not listen to the entire podcast – just spot check a few parts. I could not easily find the section with the noise to remove it, so at @khem 's suggestion, I asked Claude code to find it – it worked brilliantly:

> where in @049.mp3 is a loud fan noise?

... after some time:

● Perfect! I found sections with loud fan noise. The analysis shows sustained
  high-frequency content (characteristic of fan noise) at these locations:

  Loudest fan noise detected at:

  1. 1:27:00 (87 minutes) - Most prominent fan noise
  2. 1:01:30 (61 minutes 30 seconds)
  3. 0:59:30 (59 minutes 30 seconds)
  4. 0:41:00 (41 minutes)
  5. 1:15:30 (75 minutes 30 seconds)

It was right on!

I then asked Claude:

> can you summarize how you did this and the commands you ran?

● Here's a summary of my approach and the commands I used to detect the loud fan
   noise:

  Methodology

  1. Initial file inspection
  ls -lh 049.mp3
  ffmpeg -i 049.mp3 2>&1 | grep -E "Duration|Stream"
    - Confirmed the file exists (85MB, 91 minutes duration)
    - Verified audio format (48kHz stereo MP3)
  2. Overall audio statistics
  sox 049.mp3 -n stats 2>&1
    - Got baseline audio levels (RMS level: -22.02 dB)
  3. Segmented volume analysis
  # Analyzed every 30-second segment
  ffmpeg -ss {start} -t 30 -i 049.mp3 -af 'volumedetect' -f null - 2>&1 | grep
  'mean_volume'
    - Scanned through the entire 91-minute file in 30-second chunks
    - Identified segments with mean volume > -25 dB as "loud"
    - Found that most of the recording was consistently loud (indicating
  persistent background noise)
  4. High-frequency noise detection (the key step for fan noise)
  # Applied 1000Hz highpass filter to isolate high-frequency content
  ffmpeg -ss {start} -t 10 -i 049.mp3 -af 'highpass=f=1000,volumedetect' -f null
   - 2>&1 | grep 'mean_volume'
    - Fan noise is typically in higher frequencies
    - Applied a highpass filter (>1000Hz) to remove voice and music
    - Sections with loud volume after filtering indicate fan/mechanical noise
    - Threshold: high-frequency volume > -40 dB indicates likely fan noise

  Key Finding

  The combination of overall loudness + significant high-frequency content
  identified the fan noise locations. The loudest fan noise was at 87:00 (1 hour
   27 minutes) with high-frequency volume of -27.1 dB.
1 Like

Creating draw.io diagrams with Claude Code

I ran some experiments using Claude Code to create draw.io diagrams.

create a draw.io file “test.drawio” that has a venn diagram with three circles: Yoe, SimpleIoT, and BRun

The result:

can you adjust the circles so they overlap a little more?

Not, perfect, but it is doing what I ask it to do.

can you create a diagram for this post? 🚀 RDPD - Release Driven Product Development | Platform Thinking

The result:

This is impressive, and again illustrates why command-line tools, local files, and open file formats are the future.

I might just add a step to my newsletter workflow that creates a diagram with every post …

A few more:

can you create a diagram for this post? 🧪 TDPD - Test Driven Product Development | Platform Thinking

can you create a diagram for this post?
📝 DDPD - Document Driven Product Development | Platform Thinking