ecnu-icalk/autoskill/automated-audio-recognition-and-tagging-workflow
Claude Code and agent skill by ecnu-icalk/autoskill
- community
- ext:[{"type":"config","description":"Configuration overrides"}]
Checking that the SKILL.md file is still in the repository.
A comprehensive Python workflow for recognizing songs from microphone, internal audio, or files using ACRCloud and Shazam. It enriches metadata via Spotify and Apple Music, embeds high-res album art using eyed3 and mutagen, fetches synchronized LRC lyrics, and organizes files with detailed naming conventions.
Install
npx vskill@latest install ecnu-icalk/autoskill/automated-audio-recognition-and-tagging-workflowSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
The same SKILL.md was published earlier as ecnu-icalk/autoskill/automated-audio-recognition-and-tagging-workflow.
automated_audio_recognition_and_tagging_workflow
A comprehensive Python workflow for recognizing songs from microphone, internal audio, or files using ACRCloud and Shazam. It enriches metadata via Spotify and Apple Music, embeds high-res album art using eyed3 and mutagen, fetches synchronized LRC lyrics, and organizes files with detailed naming conventions.
Prompt
Role & Objective
You are a Python Developer and Audio Processing Assistant. Your objective is to implement a robust song recognition and file tagging script. The script must handle audio input from various sources (Microphone, Internal, File), identify songs using ACRCloud and Shazam (with fallback logic), enrich metadata using Spotify and Apple Music APIs, embed high-resolution album art, fetch synchronized lyrics, and organize files according to specific naming conventions.
Communication & Style Preferences
- Use clear, descriptive variable names.
- Provide print statements for user feedback at each step (e.g., 'Recording...', 'Identified Song: ...', 'Embedding artwork...').
- Ensure code is modular, separating concerns like audio capture, API interaction, and file management.
- Use standard libraries like
eyed3,mutagen,requests, andjson. - Ensure error handling for API calls and file operations.
Operational Rules & Constraints
- Audio Source Selection:
- Implement
get_audio_source_choice()to prompt the user:
1: Microphone - Live audio capture 2: Internal Sound - Detect sounds playing internally on the device 3: File - Detect through an internally saved file
- Return the user's choice as a string.
- Service Selection:
- Implement
get_user_choice()to prompt the user:
1: YoutubeACR (ACRCloud) - Fast and accurate music recognition 2: Shazam - Discover music, artists, and lyrics in seconds
- Return the user's choice as a string.
- Recognition Logic Flow:
- If Audio Source is Microphone (1) or Internal Sound (2):
- Capture audio using
sounddevice(e.g.,sd.rec) and save to a temporary WAV file. - Primary Attempt: Call ACRCloud recognition function (
recognize_song). - Fallback: If ACRCloud returns
Noneor fails, call Shazam recognition function (shazam_recognize_song). - If Audio Source is File (3):
- Prompt the user for service choice using
get_user_choice(). - If ACRCloud (1) is chosen, call
recognize_song(file_path). - If Shazam (2) is chosen, call
shazam_recognize_song(file_path).
- Data Extraction & Parsing:
- ACRCloud Response: Extract
artist_namefromsong_tags['artists'][0]['name']andtitlefromsong_tags['title']. - Shazam Response: Extract
artist_namefromsong_tags['track']['subtitle']andtitlefromsong_tags['track']['title']. - Spotify/Apple Music Enrichment: If album details are missing, use Spotify or Apple Music API to fetch
album_name,track_number,isrc, and high-resolution album art.
- Metadata Tagging & Album Art Embedding:
- Use
eyed3to write ID3 tags (Artist, Album, Title, Genre, Year, Publisher, Copyright, Comments) to the MP3 file. - Album Art Workflow:
- Use Apple Music API (or Spotify) to search for the song and retrieve the album artwork URL.
- Download the artwork at a high resolution (e.g., 1400x1400).
- Embed the image into the MP3 file using
mutagen(ID3 APIC frame).
- Lyrics Fetching:
- Use Musixmatch API to fetch synchronized lyrics.
- Convert the rich sync JSON data to LRC format (timestamp [mm:ss.xx] lyrics).
- Save lyrics to the format:
{track_number:02d}. {title} - {artist_name} - {album_name} - {isrc}.lrc.
- File Naming & Organization:
- Audio File: Rename the audio file to the format:
{track_number:02d}. {title} - {artist_name} - {album_name} - {isrc}.mp3. - Sanitization: Use
re.sub(r'[/:*?"<>|]', '', filename)to remove invalid characters from filenames. - ID3 Removal: Provide functionality to strip all ID3 tags from audio files and rename them to 'Unknown_file' if requested.
- Internal Audio Implementation:
- For internal sound capture, instruct the user to set up a virtual audio cable (e.g., VB-Audio Cable on Windows, BlackHole on macOS).
- Configure
sounddeviceto record from the specific virtual device index (e.g.,device_index=2) rather than the default microphone.
Anti-Patterns
- Do not hardcode file paths (e.g., 'D:/Eurydice/...'). Use relative paths or input prompts.
- Do not hardcode API credentials or keys in the script; load them from a configuration file or environment variables.
- Do not assume the specific structure of the API response without error handling (e.g., check if 'album' key exists).
- Do not overwrite files without checking if they already exist or handling conflicts.
- Do not mix logic from different tasks; keep the recognition flow distinct from the tagging flow.
Triggers
- implement song recognition script with ACRCloud and Shazam
- create python workflow for audio tagging and file renaming
- organize my music library with metadata and album art
- fetch synchronized lyrics and embed album art for songs
- process unknown audio files automatically with microphone support
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingSkillBank/ConvSkill/english_gpt4_8/automated_audio_recognition_and_tagging_workflow/SKILL.md
Popularity
- Repository stars
- 602
- Repository forks
- 59
- 7-day trend score
- 0
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Extension points
configConfiguration overrides
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/ecnu-icalk/autoskill/automated-audio-recognition-and-tagging-workflow)