OpenParable
Skip to content
← Back to skills

Listen

Documents
listen

Listen is an Agent Skill for documents published in the Lingtai-AI/lingtai repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

Nested swiss-knife reference for local audio analysis — transcribe speech with Whisper, or extract musical features (tempo, key, dynamics, spectral profile) with librosa. Both run on the user's machine with no API key. Read this when the human asks you to transcribe a voice note, extract lyrics from singing, critique generated music, or analyze audio characteristics. For *creating* music or audio, use the sibling `minimax-cli` reference (or `dj` for journal-inspired music) instead.

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/Lingtai-AI/lingtai/blob/HEAD/tui/internal/preset/skills/swiss-knife/reference/listen/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/listen, but wait for my approval before writing files or running scripts.

Copying this prompt does not install or run the skill. Review third-party files before use.

listen

Nested swiss-knife reference for local-only audio analysis. No API key, no network. Two actions: transcribe (speech → text) or appreciate (music → numerical critique).

Two Actions

ActionBackendWhen
transcribefaster-whisper (local Whisper)Spoken word, voice notes, podcasts, lectures. Works on singing too but lyrics may be inaccurate.
appreciatelibrosa (signal processing)Music — tempo, key, frequency bands, dynamics. Returns numerical measurements, not subjective descriptions.

Both actions are wrappers around the bundled scripts. Run them with bash like any other command-line tool:

python3 <skill-path>/scripts/transcribe.py <audio-file>
python3 <skill-path>/scripts/appreciate.py <audio-file>

The scripts auto-install their dependencies via lingtai.venv_resolve.ensure_package on first run, so the first invocation may take ~30 s.

transcribe — speech to text

python3 <skill-path>/scripts/transcribe.py <audio-path> [--model base] [--device cpu]
FlagDefaultNotes
--modelbaseWhisper model size: tiny, base, small, medium, large-v2, large-v3. Larger = more accurate, slower, more RAM.
--devicecpuUse cuda if you have a GPU.
--compute-typeint8CTranslate2 compute type. int8 is the fastest CPU mode. Use float16 on GPU.

Output: a JSON document on stdout with:

{
  "text": "<full transcript>",
  "language": "en",
  "language_probability": 0.99,
  "duration": 42.3,
  "segments": [
    {"start": 0.0, "end": 4.2, "text": "..."},
    ...
  ]
}

Best for: Clear spoken word in any of Whisper's supported languages. Caveats: Singing lyrics often mistranscribed — Whisper is trained on speech, not singing. Background music degrades accuracy. For very noisy input, try --model medium or large-v3.

appreciate — music analysis

python3 <skill-path>/scripts/appreciate.py <audio-path>

No flags — purely analytical. Output: a JSON document with:

FieldMeaning
durationAudio length in seconds
tempo_bpmEstimated tempo
beat_regularity_stdStd-dev of inter-beat intervals — small (<0.05) = steady, large = rubato/free
keyEstimated key (e.g. D minor, G major)
key_confidence0–1, correlation with Krumhansl key profile
chroma_profilePer-pitch-class energy — useful for spotting modal mixture
spectral_centroid_hzBrightness — higher = brighter mix
spectral_bandwidth_hzSpread of spectrum
spectral_rolloff_hz85th-percentile frequency — "where the highs end"
zero_crossing_rateNoisiness measure
dynamic_range_dbLoud-vs-quiet contrast in dB
frequency_bands_pctPercentage of energy in sub_bass/bass/low_mid/mid/upper_mid/presence/brilliance
energy_contourRMS energy in 10 equal-time segments (loud-vs-quiet shape over time)
onset_density_per_secHow many note-onsets per second — proxy for "busyness"

These are measurements, not opinions. Your job is to translate the numbers into a critique:

  • "tempo_bpm: 84, beat_regularity_std: 0.012" → "steady mid-tempo, ballad pacing".
  • "spectral_centroid_hz: 3500, presence: 22%" → "bright, vocal-forward mix".
  • "energy_contour: monotonically increasing" → "builds throughout".

Best for: Music. Useless for speech — gives spectral data with no semantic content.

When to use which

InputAction
Voice note, lecture, podcasttranscribe
Music with vocals — want lyricstranscribe (warn human: lyrics may be wrong)
Music — want to know if it matches a briefappreciate
Generated music from the sibling minimax-cli reference or dj — QAappreciate
TTS output from the sibling minimax-cli reference — verify pronunciationtranscribe (round-trip QA)
Both (transcript + analysis)Run both scripts

Going Deeper

The bundled scripts are deliberately minimal. If you need:

  • Per-section analysis (verse vs chorus): segment the file with librosa.segment first, then run appreciate.py on each segment.
  • Multi-track separation: use demucs or spleeter (heavier deps — install on demand via pip).
  • Pitch tracking (melody extraction): use librosa.pyin or crepe.
  • Lyrics alignment: the Whisper segments give you word-level timing if you pass --word-timestamps.

You can write your own scripts using the same dependencies — librosa and faster-whisper are already installed once the bundled scripts have run.

When NOT to use this skill

  • Human asked you to create audio (music, speech, sound effect) — use the sibling minimax-cli reference; for journal-inspired music, use dj.
  • Human asked you to describe a video or image — use the sibling vision reference (../vision/SKILL.md).
  • You only need to play audio for the human — use an OS-native player; this reference only analyzes audio files.

Found a bug or issue? If you encounter any problems with this skill, load the lingtai-issue-report skill and follow its instructions to report it.