music-emotion

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

/music-emotion — Emotion & Style Analysis

/music-emotion — 情感与风格分析

Classify the emotional content of an audio file: primary mood, energy level, emotional valence, arousal, genre, and mood tags.
对音频文件的情感内容进行分类:主要情绪、能量等级、情感效价、唤醒度、流派以及情绪标签。

Usage

使用方法

/music-emotion <audio_file_path>
/music-emotion <audio_file_path>

Steps

步骤

  1. Validate the audio file path
  2. Run emotion analysis:
bash
python3 -m music_analyzer emotion "<audio_file_path>"
  1. Present results:
    • Primary Emotion: Dominant mood (happy, sad, calm, energetic, etc.)
    • Energy Level: 0-1 scale with curve across song segments
    • Valence: -1 (negative) to 1 (positive)
    • Genre: Detected genre
    • Mood Tags: Descriptive mood keywords
  1. 验证音频文件路径
  2. 运行情感分析:
bash
python3 -m music_analyzer emotion "<audio_file_path>"
  1. 展示结果:
    • 主要情绪:主导情绪(开心、悲伤、平静、充满活力等)
    • 能量等级:0-1的数值范围,包含歌曲各段落的变化曲线
    • 情感效价:-1(消极)到1(积极)
    • 流派:检测出的音乐流派
    • 情绪标签:描述性的情绪关键词

Detection Methods

检测方法

  • CLAP (full tier): AI-based emotion/genre classification using CLAP model
  • Heuristic (lite tier): Spectral features + rhythm + tonality-based rules
The method used is noted in the
method
field of the output.
  • CLAP(完整层级):基于CLAP模型的AI驱动情感/流派分类
  • 启发式(轻量层级):基于频谱特征+节奏+调性的规则
使用的方法会在输出的
method
字段中注明。

Output Fields

输出字段

FieldDescription
primary_emotion
Dominant emotion label
secondary_emotions
Additional emotion tags
overall_energy
Energy level 0-1
energy_curve
Energy values per segment
valence
Emotional valence -1 to 1
arousal
Arousal level 0-1
genre
Detected genre
mood_tags
Mood descriptor keywords
字段描述
primary_emotion
主导情绪标签
secondary_emotions
附加情绪标签
overall_energy
0-1范围的能量等级
energy_curve
各段落的能量值
valence
-1到1的情感效价
arousal
0-1范围的唤醒度
genre
检测出的流派
mood_tags
情绪描述关键词