Listen to and appreciate music files. Analyze audio for genre, mood, tempo, and lyrics. Use when users share audio/music files, ask about songs, or want music analysis.
Listen to and appreciate music files. Analyze audio for genre, mood, tempo, and lyrics.
view_imageffprobe -v quiet -print_format json -show_format -show_streams "<audio_file>"
Key info: duration, bitrate, sample_rate, codec, title/artist/album tags (if present).
ffmpeg -i "<audio_file>" -lavfi showspectrumpic=s=800x200:mode=combined:color=intensity -frames:v 1 "/tmp/music_spec_<id>.png" -y
This creates a visual representation of the frequency content. Inspect it with:
view_image(path="/tmp/music_spec_<id>.png")
# First convert to wav if needed
ffmpeg -i "<audio_file>" -acodec pcm_s16le -ar 16000 -ac 1 "/tmp/music_audio.wav" -y
whisper "/tmp/music_audio.wav" --model turbo --output_format txt --output_dir /tmp/music_whisper
Then read the transcript:
Read(targetPath="/tmp/music_whisper/<file>.txt")
Note: Whisper may struggle with singing. That's fine. Partial lyrics are still useful.
Combine all the info and share your thoughts naturally:
Might be a clip or voice note with background music. Do all steps but keep comments brief.
Full analysis. Take your time to appreciate it.
Might be a playlist or podcast with music. Extract a representative segment first:
ffmpeg -i "<audio_file>" -ss 60 -t 120 -acodec pcm_s16le -ar 16000 -ac 1 "/tmp/music_segment.wav" -y