Add SxCP Audio Wave + Segments: interactive waveform node (upload/play/click-segments)
New node with a JS widget (web/audio_wave.js): upload an audio clip, play it, and click the waveform to place segment boundaries (click add / drag move / dblclick note / shift|right-click delete). Boundaries+notes serialize to a hidden segments_json that drives Python segmentation (falls back to auto-split / notes syntax). Python node (nodes/audio_wave_segments.py) loads the file (torchaudio/soundfile/librosa), builds segments from the boundaries, and outputs waveform_image + audio_summary + AUDIO — same contract as Audio Prompt Guide, so it feeds chat mode the same way. _attach_notes now merges (keeps clicked notes). WEB_DIRECTORY re-enabled. JS is a first cut — needs testing in ComfyUI (console logs on error); the Python node works standalone via segments_json/notes. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -101,6 +101,16 @@ seg1: slow dreamy intro # by segment number (also "1:" or "S1:")
|
||||
cinematic, moody grade # no prefix = global (applies throughout)
|
||||
```
|
||||
|
||||
### Interactive: `SxCP Audio Wave + Segments`
|
||||
|
||||
Same outputs, but with an in-node waveform widget: **upload** an audio clip, **play** it,
|
||||
and **click the waveform** to place segment boundaries — click to add a split, drag to
|
||||
move, double-click a segment for its note, shift/right-click to delete. The boundaries +
|
||||
notes are saved to a hidden `segments_json` and drive the segmentation (falls back to
|
||||
auto-split / the `notes` syntax if none placed). Outputs `waveform_image`, `audio_summary`,
|
||||
and `audio`. Needs `torchaudio`/`soundfile`/`librosa` to load the file (torchaudio usually
|
||||
ships with torch).
|
||||
|
||||
## Performance / speed
|
||||
|
||||
This node runs models through **transformers `.generate()`** — the simplest path, but the
|
||||
|
||||
Reference in New Issue
Block a user