music-lens 0.1.4 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -93,7 +93,11 @@ $base = "C:\Users\86173\Documents\deepseek-harness\default-workspace\music-lens"
93
93
  |---|---|
94
94
  | 纯语音(生涯幻游引导,6.8 分钟) | ✅ 40 句、707 字,几乎无错,**2 分钟左右出结果** |
95
95
  | 录音室歌曲(Deja Vu,4.6 分钟,英文) | ✅ 分轨后 26 句连贯歌词,verse/chorus/bridge 结构清晰 |
96
+ | 录音室歌曲(T-ara《Day by Day》,3.5 分钟,韩文) | ✅ **近乎满分**,48 句连英文夹唱都对 |
97
+ | 录音室歌曲(《リナリアが咲いて》,2.2 分钟,日文) | ✅ 30 句连贯,假名汉字基本正确,少量错词 |
98
+ | 现场版(T-ara 同一首,3.4 分钟,观众噪声) | ⚠️ 52 句,约六成;**BPM 与调性和录音室版分毫不差**(117.5 / F# minor) |
96
99
  | 合唱录音(西昌学院校歌,62 秒) | ❌ 文字基本不可用,且出现「作詞 李宗盛」这类字幕幻觉 |
100
+ | AI 合成人声(《晚风信箱》,3.2 分钟,中文) | ⚠️ 约六成,同音字错得多(“心”/“信”不分) |
97
101
 
98
102
  结论:**唱歌能做,但强依赖音源质量**。录音室作品分轨后可用;现场录音、合唱、混响重的,会退化成瞎猜。
99
103
 
@@ -127,7 +131,10 @@ $base = "C:\Users\86173\Documents\deepseek-harness\default-workspace\music-lens"
127
131
  4. **`initial_prompt` 会被复述成歌词**(模型对着音乐段"念提示词"),所以不要传提示词。
128
132
  5. **`--lang zh` 会把英文歌硬翻成中文**,出乱码。默认改成了 `auto`。
129
133
  6. VAD 在音乐上会把人声整段滤掉,所以默认关闭(语音场景再加 `--vad`)。
130
- 7. **Windows 上 npm 生成的 `music-lens.ps1` 会被执行策略拦住**,敲 `music-lens` 直接报
134
+ 7. **编造署名**:音乐最空的位置(前奏/间奏/尾奏)常冒出 `作词 李宗盛 作曲 李宗盛`、
135
+ `中文字幕组`、`字幕by索兰娅`、`Zither Harp`、`优优独播剧场` —— 全是训练数据里的高频碎片,
136
+ 不是它"认识这首歌"。0.1.4 起内置 18 条黑名单自动过滤,`--keep-hallucinations` 可关闭。
137
+ 8. **Windows 上 npm 生成的 `music-lens.ps1` 会被执行策略拦住**,敲 `music-lens` 直接报
131
138
  `禁止运行脚本`。两个办法:删掉那个 `.ps1`(PowerShell 会回落到 `.cmd`),或者
132
139
  `Set-ExecutionPolicy -Scope CurrentUser RemoteSigned`。**每次 `npm i -g` 之后都要处理一次。**
133
140
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "music-lens",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "description": "Let a text-only model read a song: lyrics + timestamps, loudness, brightness, key, tempo, sections. Local, no API keys.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -186,7 +186,10 @@ def main():
186
186
  for s in it:
187
187
  text = s.text.strip()
188
188
  if text:
189
- if _CC is not None:
189
+ # opencc t2s is for Chinese only -- it would mangle Japanese kanji
190
+ # (選->选, 関係->関系) and is pointless for other scripts.
191
+ detected = (getattr(info, "language", "") or "").lower()
192
+ if _CC is not None and ((lang or detected) == "zh"):
190
193
  text = _CC.convert(text)
191
194
  segments.append({"start": round(s.start, 2), "end": round(s.end, 2), "text": text})
192
195
  print(f" {s.start:7.1f}s {text}")