music-lens 0.1.4 → 0.1.5

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
@@ -127,7 +127,10 @@ $base = "C:\Users\86173\Documents\deepseek-harness\default-workspace\music-lens"
127
127
  4. **`initial_prompt` 会被复述成歌词**(模型对着音乐段"念提示词"),所以不要传提示词。
128
128
  5. **`--lang zh` 会把英文歌硬翻成中文**,出乱码。默认改成了 `auto`。
129
129
  6. VAD 在音乐上会把人声整段滤掉,所以默认关闭(语音场景再加 `--vad`)。
130
- 7. **Windows 上 npm 生成的 `music-lens.ps1` 会被执行策略拦住**,敲 `music-lens` 直接报
130
+ 7. **编造署名**:音乐最空的位置(前奏/间奏/尾奏)常冒出 `作词 李宗盛 作曲 李宗盛`、
131
+ `中文字幕组`、`字幕by索兰娅`、`Zither Harp`、`优优独播剧场` —— 全是训练数据里的高频碎片,
132
+ 不是它"认识这首歌"。0.1.4 起内置 18 条黑名单自动过滤,`--keep-hallucinations` 可关闭。
133
+ 8. **Windows 上 npm 生成的 `music-lens.ps1` 会被执行策略拦住**,敲 `music-lens` 直接报
131
134
  `禁止运行脚本`。两个办法:删掉那个 `.ps1`(PowerShell 会回落到 `.cmd`),或者
132
135
  `Set-ExecutionPolicy -Scope CurrentUser RemoteSigned`。**每次 `npm i -g` 之后都要处理一次。**
133
136
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "music-lens",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
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}")